Flock

This page covers Flock beyond the Getting Started introduction — the manifest format, dependency resolution, and publishing.

The manifest

flock.toml lives at the project root. A typical one:

[package] name = "my-app" version = "0.1.0" description = "A short description" author = "you" license = "MIT" [dependencies] kestrel/quill = { version = "0.2.1" }

The [package] section declares identity and metadata. [dependencies] lists what the project depends on, with each entry specifying a version constraint. When you publish a library, [package] also needs an org — it pairs with name to form the package's org/name scope (see Publishing).

Dependencies

Add a dependency by editing flock.toml:

[dependencies] kestrel/quill = { version = "0.2.1" }

On the next build, Flock fetches the dependency and writes a flock.lock pinning the resolved version graph. Commit flock.lock for applications; libraries usually don't.

Publishing

Publishing a library to the registry needs two things: a token to authenticate, and an org to publish under.

Get a token. Sign in at the account page with GitHub — a personal org matching your username is created automatically. Create a token there (it's shown only once) and save it to ~/.flock/credentials, or export it as FLOCK_TOKEN.

Set your org in flock.toml. Together with name it forms the package's org/name scope:

[package] name = "my-lib" version = "0.1.0" org = "your-username" # your personal org, or a shared org you belong to description = "A short description" license = "MIT"

FLOCK_ORG overrides the manifest value for one-off or CI publishes.

Publish:

flock publish

Flock archives the project, generates API docs, and uploads it under your org. The package then appears at kestrel-lang.com/flock/<org>/<name>.

Versions follow semver. Once published, a version is immutable — bump the version and re-publish for fixes.