@astralbeam/cli 0.16.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralbeam/cli",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Command-line interface for AstralBeam organization admins and their coding agents",
5
5
  "homepage": "https://astralbeam.ai/docs/cli/getting-started",
6
6
  "bugs": "https://github.com/AstralBeamAI/astralbeam/issues",
@@ -35,7 +35,7 @@
35
35
  "knip:fix": "knip --fix --allow-remove-files && knip --fix --allow-remove-files && deno install --frozen",
36
36
  "lint": "oxlint",
37
37
  "lint:fix": "oxlint --fix",
38
- "ready": "deno task check && deno task test && deno task build && deno task count-lines",
38
+ "ready": "deno run --allow-env=CI --allow-run=deno ../scripts/ready.ts check test build count-lines",
39
39
  "test": "vitest run",
40
40
  "typecheck": "tsc --noEmit"
41
41
  },
@@ -7,15 +7,15 @@ description: Manage an AstralBeam organization from the terminal with the `astra
7
7
 
8
8
  `astralbeam` calls an AstralBeam organization's public API with an organization API key. Tenants are the organization's customers, and TenantUsers are those customers' users who talk to the embedded agent.
9
9
 
10
- If `astralbeam` is not on the PATH, run it as `npx -y @astralbeam/cli` instead.
10
+ If `astralbeam` is not on the PATH, run it as `deno run -A npm:@astralbeam/cli` or `npx -y @astralbeam/cli`, as allowed by the current project's runtime policy.
11
11
 
12
12
  ## Rules
13
13
 
14
14
  - Pass `--json` on every command whose output you will read. Records and pages go to stdout. Stderr then holds exactly one JSON object: `{"context": {...}}` on success, or `{"error": {...}, "context": {...}}` on failure, where `error` carries the API's `status`, `detail`, and optional `issues`. `context` is `{"organization": {"id", "name", "slug"}, "bound_directory": <path or null>}`, or `null` when the command uses no credentials or failed before resolving them.
15
- - Exit code 0 means success, 1 means the API or runtime failed, and 2 means the command line was invalid. Read `astralbeam <command> --help` before guessing flags. To diagnose an unexpected failure, rerun it without `--json` and with `--debug`, which logs each HTTP request and the stack trace to stderr.
15
+ - Exit code 0 means success, 1 means the API or runtime failed, and 2 means the command line was invalid. Read `astralbeam <command> --help` before guessing flags. To diagnose an unexpected failure, check the outcome of any write before rerunning it without `--json` and with `--debug`, which logs each HTTP request and the stack trace to stderr.
16
16
  - Never print, log, or echo an API key. Never pass a key as a command-line argument. Credentials come from `ASTRALBEAM_API_KEY`, or from the nearest directory at or above the working directory where someone ran `astralbeam auth login`. Run commands from the project directory the user means, because a different directory can select a different organization.
17
17
  - Before any write, run `astralbeam auth status --json` from the same directory and confirm `organization` is the one the user means. Stop if it is not. Without `--json`, keyed commands print the organization first on stderr as `▸ Acme (acme) · org <id> · bound at ~/work/acme`.
18
- - Never run `astralbeam auth login` yourself unless the user supplies the key through stdin or the environment. It prompts for a secret.
18
+ - Never run `astralbeam auth login` yourself unless the user supplies the key through stdin. It prompts for a secret. Use `ASTRALBEAM_API_KEY` directly for environment credentials without login.
19
19
  - Path IDs are internal UUIDs returned by the API. External IDs are the organization's own identifiers and are passed with `--external-id`, `--tenant`, or `--user`.
20
20
  - Creates are not idempotent. A duplicate external ID returns HTTP 409. After a timeout or a 409, look the record up with `list --external-id <id>` before retrying.
21
21
  - `--metadata` replaces the whole stored object and must be a JSON object.