Publishing
Publishing puts the generated SDK where your users already look: npm install, pip install, go get. Connect each registry account once, and Octri publishes each release under your own name.
Publishing from SDK Studio starts a new build. What happens next depends on your Publishing settings:
| Auto-publish | What happens |
|---|---|
| On | Each version goes to its linked registries as soon as the build is ready. Languages with no linked account stay downloadable |
| Off | Builds wait for you. Open one under Builds and choose Publish to registries |
Auto-publish is available on every plan.
Registries
| Registry | Languages |
|---|---|
| npm | TypeScript |
| PyPI | Python |
| Maven Central | Java, Kotlin |
| crates.io | Rust |
| RubyGems | Ruby |
| pub.dev | Dart |
Connect an account under Publishing, by pasting an API token from that registry. Octri stores it against the registry and reuses it for every release.
Maven Central is the exception: it takes a Central Portal user token, pasted as username:password.
From the CLI, use octri sdk publish, with --mode pack for a dry run.
Go, PHP and Swift publish by git tag
Go modules and Swift Package Manager resolve straight from a git repository, and Packagist mirrors one. There is no account to paste a token for here: Octri publishes by pushing a tagged commit, which needs the GitHub App connected.
- Connect the GitHub App
Required so Octri can push to the repository.
- Set the repository per language
Each language's SDK usually lives in its own repo (
acme-node,acme-python,acme-go). Set Repository per language. - Release
Octri pushes the generated code and a version tag.
go getand SPM resolve it from there.
Go derives the module path from the repo URL and writes it into go.mod. github.com/acme/acme-go means users write import "github.com/acme/acme-go". Changing the repo later changes every import statement your users have written, which is a breaking change with no deprecation path.
Pick the Go repo name once, deliberately. See Go.
Staging and production repositories
Each language can have a pair of repositories. Generated source goes to staging, where quality checks run. Promotion then pushes that exact commit to production.
| Repository | What writes to it |
|---|---|
| Staging | Every generated snapshot. SDK Quality runs here |
| Production | Only promotion. Generation never writes here |
Promotion requires staging quality to pass. See builds and quality.
For custom hand-written code in those repositories, see hooks.
Package names
Package name can be set once for the project, or per language. Per language is usually what you want, because naming conventions differ: @acme/api on npm, acme-api on PyPI, com.acme:api on Maven.
Leave it empty and the package takes your project's name plus "sdk". The first release pins that name, so renaming the project later never renames a published package.
Some languages adjust the name to fit their rules. For a package named acme-api:
| Language | Package | Import |
|---|---|---|
| TypeScript | acme-api | from "acme-api" |
| Python | acme_api | from acme_api import |
| Rust | acme_api | use acme_api:: |
| Ruby | acme_api | require "acme_api", module AcmeApi |
| Dart | acme_api | package:acme_api/ |
| PHP | acme-api/ | use acme_api\ |
| Java, Kotlin | acmeapi:acmeapi | import acmeapi.* |
Registries do not let you rename a package after publishing, and most block reusing a version number even after a delete. npm and PyPI both refuse to re-publish a deleted version.
Confirm the name is the one you want before the first release. This is the least reversible thing in the whole pipeline.
Repository metadata
Repository is written into the generated package manifest, so the registry page links back to the source. Stored as the repo picker writes it (github.com/owner/repo); a bare slug, an https URL, or an SSH remote all work.
Leave it empty and the manifests carry no repository metadata, which makes your package look abandoned on npm.
README
The README setting is shipped as the package's README.md and is what people see on the registry page. Leave it empty and the generator emits a default.
When a GitHub repo is linked for a language, the README is kept in sync with the repo's own README, so you write it once.