Skip to content

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.

Terminal window
npm install --save-dev @seampact/cli @seampact/codegen-ts

Add the generators you use: the package map lists them.

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.

For Laravel:

Terminal window
composer require seampact/laravel seampact/hooks

For Symfony:

Terminal window
composer require seampact/symfony

The 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.

Terminal window
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 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.

Terminal window
sha256sum --check --ignore-missing SHA256SUMS
chmod +x seampact-linux-x64

The 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.

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.

Terminal window
cd ~/src/seampact && pnpm install --frozen-lockfile
node ~/src/seampact/scripts/consumers/install-into.ts ~/src/notes-app
cd ~/src/notes-app && pnpm install

You 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:

Terminal window
sh ~/src/seampact/scripts/consumers/python/build-wheels.sh ~/src/seampact/python/dist
pip install --no-index --find-links ~/src/seampact/python/dist

Next: the guide of your framework, Spring Boot, Laravel, Symfony, FastAPI, Django REST Framework or Django Ninja.