Install in other ecosystems
Every package is on its ecosystem’s registry, at the same version. Pick yours. For a Node.js server, see Install. To type the commands on each stack, see commands per stack.
npm install --save-dev @seampact/cli @seampact/codegen-tsAdd the generators you use: the package map lists them.
Maven Central (Gradle and Maven)
Section titled “Maven Central (Gradle and Maven)”Gradle, in build.gradle.kts and settings.gradle.kts:
plugins { id("io.github.jubasse.seampact") version "1.0.0"}pluginManagement { repositories { gradlePluginPortal() mavenCentral() }}The Gradle Plugin Portal is still reviewing the plugin. Until it approves, Gradle loads the plugin from Maven Central, which mavenCentral() above already adds.
Maven, in pom.xml:
<plugin> <groupId>io.github.jubasse</groupId> <artifactId>seampact-maven-plugin</artifactId> <version>1.0.0</version></plugin>The runtime and the hooks are io.github.jubasse:seampact-spring-runtime and io.github.jubasse:seampact-hooks. The Spring Boot guide has the full build.
Composer (Packagist)
Section titled “Composer (Packagist)”For Laravel:
composer require seampact/laravel seampact/hooksFor Symfony:
composer require seampact/symfonyThe packages are read-only mirrors of this repository: report problems on GitHub, not on the mirror. Follow the Laravel or Symfony guide.
Python 3.12 or later, and a FastAPI, Django REST Framework or Django Ninja app.
pip install "seampact-fastapi[generate]"Use seampact-drf or seampact-ninja for Django REST Framework or Django Ninja. Set use: pypi:seampact-fastapi (or pypi:seampact-drf, pypi:seampact-ninja) in seampact.config.yaml, then run seampact generate. The steps are in the guide of your framework: FastAPI, Django REST Framework or Django Ninja.
The Python seampact command has generate and check only. It reads the contract as a bundle: a packed, versioned copy. Make it with seampact bundle, from the npm CLI or the compiler binary (see Sharing a contract). A path source or the OpenAPI documents need the compiler: install seampact-ir[compiler].
The compiler binary
Section titled “The compiler binary”The binary needs no Node.js, Java or PHP for compile, lint, diff, explain and bundle. Download the file for your system from the releases page, with SHA256SUMS.
sha256sum --check --ignore-missing SHA256SUMSchmod +x seampact-linux-x64The files are seampact-linux-x64, seampact-linux-arm64, seampact-darwin-x64, seampact-darwin-arm64 and seampact-win32-x64.exe. The macOS files carry an ad hoc signature only: if macOS blocks the file, allow it in System Settings, Privacy and Security.
From a checkout
Section titled “From a checkout”To work on seampact itself, or to try an unreleased change, install from your checkout. Replace ~/src/seampact with the path of your checkout and ~/src/notes-app with your app.
cd ~/src/seampact && pnpm install --frozen-lockfilenode ~/src/seampact/scripts/consumers/install-into.ts ~/src/notes-appcd ~/src/notes-app && pnpm installYou see install-into: 32 packages and packs in .../vendor/seampact, then pnpm installs them. Add vendor to the app’s .gitignore. For Python, build the wheels and install them:
sh ~/src/seampact/scripts/consumers/python/build-wheels.sh ~/src/seampact/python/distpip install --no-index --find-links ~/src/seampact/python/distNext: the guide of your framework, Spring Boot, Laravel, Symfony, FastAPI, Django REST Framework or Django Ninja.