CLI reference
Every kryd command — auth, deploy, logs, rollback, and one-click data, storage, and AI.
Install with npm install -g @kryd/cli (or run any command zero-install via npx @kryd/cli …). Run kryd <command> --help for the full options of any command.
Project resolution
Every project-scoped command takes an explicit <project> id, or resolves it from the .kryd/project.json link that kryd init wrote — walking up from the current directory, like git finds .git. The precedence is:
explicit <project> argument → the nearest .kryd link → a clear "not linked — run kryd init" error.
So in a linked folder (or any subdirectory of it), the commands below work with no id.
Authentication
| Command | Description |
|---|---|
kryd login | Sign in via the browser and store a token in ~/.kryd. |
kryd whoami | Show the currently signed-in account. |
kryd logout | Clear the stored token. |
Deploy
| Command | Description |
|---|---|
kryd init | Link the current repo to a Kryd project, register the deploy webhook, and add a kryd git remote. |
kryd deploy [project] | Trigger a deploy of the production branch and follow it live. (Usually you just git push kryd <branch>.) |
kryd rollback [project] [deployment] | Roll back to a previous successful deploy — no rebuild. With no deployment, rolls back to the previous good one. |
Logs
| Command | Description |
|---|---|
kryd logs [target] | Follow a deploy's build/deploy log. With no target, follows the linked project's latest deploy. |
kryd logs <project> --runtime | Tail the live container's stdout/stderr instead of the build log. |
kryd logs <project> --runtime --since 30m | Backfill a window first (e.g. 90s, 30m, 2h, 1d; max 7d), then follow live. |
Runtime logs follow until you press Ctrl-C.
Data & storage
| Command | Description |
|---|---|
kryd db create [project] | Attach managed Postgres. --shared (default) provisions on the shared instance; --connection-string <url> stores an existing database (bring-your-own). Injects DATABASE_URL on the next deploy. |
kryd db detach [project] | Tear down the project's database and reclaim its credential. |
kryd storage create [project] | Create an S3-compatible object-storage bucket. Injects the AWS_* variables on the next deploy. |
kryd storage detach [project] | Tear down the project's object storage and reclaim its credentials. |
AI gateway
| Command | Description |
|---|---|
kryd ai enable [project] | Give the project an authenticated EU AI-gateway endpoint. Injects AI_GATEWAY_URL + AI_GATEWAY_TOKEN on the next deploy — your app holds no provider keys. |
Configuration
- The token and API URL live in
~/.kryd/config.json(the token is a credential — never printed or bundled). - The per-folder project link lives in
.kryd/project.json(public metadata: just the project id;kryd initgit-ignores it). - Override the API endpoint with
--api-url <url>on any command, or theKRYD_API_URLenvironment variable.