@kryd/cli 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +7 -5
  2. package/dist/index.js +748 -265
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -17,8 +17,7 @@ Requires Node.js ≥ 22 and git (the CLI shells out to git for `kryd init` and `
17
17
  ## Quickstart
18
18
 
19
19
  ```sh
20
- kryd login # sign in via the browser
21
- kryd init # link this folder to a Kryd project (+ a `kryd` git remote)
20
+ kryd init # link this folder to a Kryd project (+ a `kryd` git remote); not signed in? it asks, then signs you in via the browser
22
21
  kryd push # push the current branch → build → deploy → live, with live progress
23
22
  kryd logs # the full build log of the latest deploy (kryd push shows progress, not log lines)
24
23
  kryd logs <project> --runtime # tail the live app's stdout/stderr
@@ -31,8 +30,9 @@ Once you've run `kryd init` in a directory, the commands below work **arg-less**
31
30
 
32
31
  | Command | What it does |
33
32
  |---|---|
34
- | `kryd login` / `logout` / `whoami` | Authenticate the CLI (browser flow); the token is stored in `~/.kryd`. |
35
- | `kryd init` | Link the current repo to a Kryd project + register the deploy webhook + add a `kryd` git remote. |
33
+ | `kryd login` / `logout` / `whoami` | Authenticate the CLI (browser flow); the token is stored in `~/.kryd`. `whoami` shows the account commands run in, your role there, and your other accounts. |
34
+ | `kryd account list \| use <slug>` | You can belong to several accounts (your own, a customer's as a member). `list` shows them with your role in each, `*` marking the current one; `use` makes every following command run in that account. |
35
+ | `kryd init` | Link the current repo to a Kryd project + register the deploy webhook + add a `kryd` git remote. Not logged in and at a terminal? It asks, then runs the same browser login as `kryd login`; without a terminal it refuses (a deploy token, `KRYD_TOKEN`, cannot create a project). |
36
36
  | `kryd push [branch]` | Push to the `kryd` remote and follow the deploy it triggers (defaults to the current branch). Shows which step the deploy is on, how long it has taken and a progress bar; `--logs` streams the full build log instead. |
37
37
  | `kryd deploy [project]` | Re-deploy the production-branch HEAD already on the forge — no new commit. |
38
38
  | `kryd logs [target]` | Follow a deploy's build/deploy log **in full** — this is where the build output lives (`--runtime` tails the live container instead; `--worker` tails the project's workflow worker, also when it has a web app). |
@@ -43,7 +43,7 @@ Once you've run `kryd init` in a directory, the commands below work **arg-less**
43
43
  | `kryd ai add \| remove \| status [project]` | Give the project an authenticated EU AI-gateway endpoint (injected on the next deploy), take it away again, or show what it has. |
44
44
  | `kryd workflow add \| remove \| status [project]` | Give the project its own durable-workflow tenant — `HATCHET_CLIENT_TOKEN` is injected on the next deploy — revoke that token again, or show whether it has one and when it expires. `remove` keeps the tenant's history, crons and schedules until the project is deleted. |
45
45
  | `kryd workflow init --language <typescript\|python\|go>` | Scaffold a workflow worker here and link it as a new project. The worker ships with the small HTTP health listener Kryd's deploy gate needs — without it a deploy is torn down with "nothing listening yet" — plus a `kryd.json` that tells `kryd init` what this project is. `--no-link` writes the files only. |
46
- | `kryd token create \| list \| revoke` | Deploy tokens for CI and scripts. `create <name> [--expires 30\|90\|365\|never]` (default 90 days) prints the token once; it acts as you, inside your account, and cannot create tokens itself. Managing tokens needs `kryd login`. A token can do what you can on your projects — read env values and push — so after a leak, revoke it and also rotate the secrets it could read. |
46
+ | `kryd token create \| list \| revoke` | Deploy tokens for CI and scripts. `create <name> [--expires 30\|90\|365\|never]` (default 90 days) prints the token once; it acts as you, with your role in the **current account**, is bound to that one account for good, and cannot create tokens itself. Managing tokens needs `kryd login`. A token can do what you can on your projects — read env values and push — so after a leak, revoke it and also rotate the secrets it could read. |
47
47
  | `kryd support new \| list \| show \| reply` | Ask Kryd support a question, report a bug or a wish, and read the answer. Non-interactive (every input is a flag) and `--json` prints one JSON document on stdout — so an agent can use it too. In a linked folder, `new` adds the project and its last production deploy; when that deploy failed, the last lines of its log are sent to Kryd support too, with secret-looking values masked. `--no-context` leaves all of it out. |
48
48
 
49
49
  For an agent, for example:
@@ -60,6 +60,8 @@ kryd token create github-actions # prints kryd_… once — store it as the
60
60
  KRYD_TOKEN=kryd_… kryd deploy <project>
61
61
  ```
62
62
 
63
+ **Several accounts.** Every request names its account in a `Kryd-Account` header: the one chosen with `kryd account use <slug>` (stored in `~/.kryd/config.json`). With nothing chosen no header is sent and the API uses your only account; if you are in several it answers `account.required` and the CLI tells you to run `kryd account use`. `kryd login` chooses for you when you are in several — the account you own, else the first you joined — and says so. A deploy token never sends the header: it runs in the account it was created in, and `kryd token create` says which. When your role lacks something, the error names the missing permission (for example `deploy`).
64
+
63
65
  Run `kryd <command> --help` for options. Every project-scoped command accepts an explicit `<project>` id, or resolves it from the `.kryd` link (walking up from the current directory, git-style).
64
66
 
65
67
  ## Sovereignty