Reference
A quick reference for the pieces you touch when publishing.
flock.toml — [package]
| Field | Required | Meaning |
|---|---|---|
name | yes | package name; with org forms the org/name scope |
version | yes | semantic version, e.g. "0.2.0" |
org | to publish | the namespace you publish under |
description | no | one-line summary, shown on the registry |
author | no | author name |
license | no | license identifier, e.g. "MIT" |
repository | no | source repository URL |
website | no | project URL |
documentation | no | docs URL |
source | no | source directory; defaults to src |
[dependencies]
[dependencies]
your-org/widget = { version = "0.2.0" } # from the registry, keyed by org/name
local-lib = { path = "../local-lib" } # a local path, keyed by name
Building writes a flock.lock pinning the resolved graph. Commit it for applications; libraries usually don't.
[registry]
[registry]
url = "https://registry.kestrel-lang.com" # override the default registry
Credentials & environment
| Thing | Where |
|---|---|
| Auth token | ~/.kestrel/credentials, or the FLOCK_TOKEN env var |
| Org override | FLOCK_ORG — overrides [package] org (handy for CI / one-offs) |
The token is whatever the registry's account page issues you (flock_…). Treat it like a password.
Commands
| Command | What it does |
|---|---|
flock init | create a flock.toml and src/ in the current directory |
flock build | compile (applications) |
flock run | build and run (applications) |
flock check | type-check without building — use this for libraries |
flock publish | package, generate docs, and upload to the registry |
flock update | re-resolve dependencies and rewrite flock.lock |
Publishing rules
- Versions are immutable. A published
org/name@versioncan never be overwritten — bump the version to ship a change. - No unpublish/yank yet. Publish deliberately; what goes up stays up.
- Membership is enforced. You can only publish under your personal org or an org you belong to.
Troubleshooting
Flock prints the registry's raw response, so failures appear as a short message or JSON:
| You see | Meaning | Fix |
|---|---|---|
No auth token found. | no credentials | save a token to ~/.kestrel/credentials, or set FLOCK_TOKEN |
No org specified. | no namespace | add org to [package], or set FLOCK_ORG |
{"error":"Invalid token"} | token wrong or revoked | mint a new one on the account page |
{"error":"Not a member of this organization"} | you're not in that org | publish under your own org, or get added |
{"error":"Version already exists"} | that version is taken | bump version |
← Back to the guide overview.