@uru-intelligence/cli 0.1.0 → 0.3.54

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 +84 -14
  2. package/dist/uru.mjs +4951 -935
  3. package/package.json +8 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @uru-intelligence/cli
1
+ # uru
2
2
 
3
3
  Full-platform `uru` CLI. The package installs a `uru` binary and uses the same
4
4
  registry-backed platform operations exposed through MCP and the web UI.
@@ -8,12 +8,17 @@ staging smoke gates are all green; run it from the repo with Bun while iterating
8
8
 
9
9
  ```bash
10
10
  cd apps/cli
11
- bun src/index.ts login --token "$URU_TOKEN"
11
+ bun src/index.ts login
12
12
  bun src/index.ts whoami --json
13
13
  bun src/index.ts switch <workspace-id>
14
14
  ```
15
15
 
16
- The CLI is registry-backed. Dedicated Gem/Library/Dataset commands are thin adapters over the same platform tools used by MCP and the web UI; broader workspace, automation, prompt/persona/context, sharing, web/file, business SQL, secret/env/token operations are exposed through the generated operation registry while dedicated UX commands continue to mature. The CLI does **not** reimplement Gem lifecycle sequencing client-side.
16
+ The CLI is registry-backed. Dedicated Gem/Library/Dataset/Automation commands
17
+ are thin adapters over the same platform tools used by MCP and the web UI;
18
+ broader workspace, prompt/persona/context, sharing, web/file, business SQL,
19
+ secret/env/token operations remain exposed through the generated operation
20
+ registry while dedicated UX commands continue to mature. The CLI does **not**
21
+ reimplement Gem lifecycle sequencing client-side.
17
22
 
18
23
  ## Current commands
19
24
 
@@ -23,13 +28,25 @@ bun src/index.ts link --workspace <workspace-id> --path 'library/Golden Gems/My
23
28
 
24
29
  # Initialize and operate Gems through first-class Gem commands.
25
30
  bun src/index.ts init 'library/Golden Gems/My Gem.gem' --file ./main.html
31
+ bun src/index.ts build 'library/Golden Gems/My Gem.gem' --dry-run --outdir ./dist/uru
26
32
  bun src/index.ts deploy 'library/Golden Gems/My Gem.gem'
33
+ bun src/index.ts deploy 'library/Golden Gems/My Gem.gem' --skip-promote --no-wait
34
+ bun src/index.ts deploy 'library/Golden Gems/My Gem.gem' --prod --skip-promote --no-wait
35
+ bun src/index.ts promote <version-id> --link-id <link-id>
36
+ bun src/index.ts rollback <version-id> --link-id <link-id> --yes
27
37
  bun src/index.ts status 'library/Golden Gems/My Gem.gem' --json
28
38
  bun src/index.ts logs 'library/Golden Gems/My Gem.gem' --limit 100
39
+ bun src/index.ts logs 'library/Golden Gems/My Gem.gem' --follow
40
+ bun src/index.ts --output-format stream-json logs 'library/Golden Gems/My Gem.gem' --follow
29
41
  bun src/index.ts open 'library/Golden Gems/My Gem.gem'
30
42
  bun src/index.ts gems inspect 'library/Golden Gems/My Gem.gem'
31
43
  bun src/index.ts gems validate 'library/Golden Gems/My Gem.gem'
32
44
  bun src/index.ts gems build 'library/Golden Gems/My Gem.gem'
45
+ bun src/index.ts gems versions upload 'library/Golden Gems/My Gem.gem' --message "ready"
46
+ bun src/index.ts gems versions deploy <version-id> 'library/Golden Gems/My Gem.gem'
47
+ bun src/index.ts gems checks <version-id> 'library/Golden Gems/My Gem.gem'
48
+ bun src/index.ts gems checks run security 'library/Golden Gems/My Gem.gem' --deployment-id <deployment-id> --blocking --deep
49
+ bun src/index.ts gems checks run browser 'library/Golden Gems/My Gem.gem' --deployment-id <deployment-id> --blocking
33
50
  bun src/index.ts gems read 'library/Golden Gems/My Gem.gem' main.html
34
51
  bun src/index.ts gems write 'library/Golden Gems/My Gem.gem' main.html --file ./main.html
35
52
 
@@ -37,11 +54,21 @@ bun src/index.ts gems write 'library/Golden Gems/My Gem.gem' main.html --file ./
37
54
  bun src/index.ts library ls library
38
55
  bun src/index.ts library search revenue
39
56
  bun src/index.ts library mkdir 'library/Golden Gems'
40
- bun src/index.ts datasets query revenue_rows --limit 50 --json
57
+ bun src/index.ts datasets query revenue_rows --limit 50 --response-format concise --json
41
58
  bun src/index.ts datasets get --params-json '{"dataset_id":"revenue_rows"}'
42
59
  bun src/index.ts datasets rows-upsert --params-json '{"dataset_id":"revenue_rows","rows":[{"name":"Acme"}]}'
43
60
  bun src/index.ts datasets manage-create --params-json '{"title":"Revenue Rows","data_schema":{"properties":[]}}'
44
61
 
62
+ # Automation helpers over the platform tool surface.
63
+ bun src/index.ts automations ls --status active --view summary
64
+ bun src/index.ts automations get <automation-id>
65
+ bun src/index.ts automations create "Daily revenue digest" --status draft
66
+ bun src/index.ts automations enable <automation-id>
67
+ bun src/index.ts automations trigger <automation-id> --input-message "Run now"
68
+ bun src/index.ts automations runs ls <automation-id> --scope workspace --limit 20
69
+ bun src/index.ts automations runs tail <run-id> --level warn
70
+ bun src/index.ts automations runs cancel <run-id> --yes
71
+
45
72
  # Raw platform-tool escape hatch for diagnostics and parity.
46
73
  bun src/index.ts tools ls
47
74
  bun src/index.ts tools schema gem_control_plane --json
@@ -58,8 +85,21 @@ bun src/index.ts api platform/tools/search_tools/execute -F query=gem
58
85
  # MCP client config helper. Prefer a scoped API key for real installs.
59
86
  bun src/index.ts mcp config --api-key "$URU_API_KEY"
60
87
  bun src/index.ts mcp install --path ~/.config/claude-code/mcp.json --api-key "$URU_API_KEY"
88
+
89
+ # Local shell integration.
90
+ bun src/index.ts complete bash
91
+ bun src/index.ts complete zsh
92
+ bun src/index.ts complete fish
61
93
  ```
62
94
 
95
+ Gem version commands create immutable, build-backed versions through
96
+ `gem_control_plane` `op=version_upload`, then deploy those version ids through
97
+ `op=version_deploy`. Provider-internal flags such as `--runtime-provider` are
98
+ not accepted: runtime routing is compiled server-side from the Gem contract.
99
+ Non-100 rollout percentages are accepted only with `--skip-promote` to stage
100
+ rollout intent; live promote/rollback remains fail-closed until weighted link
101
+ routing is enabled.
102
+
63
103
  The scaffold defaults to the production API (`https://api.uruintelligence.com`).
64
104
  Use `--api-url`, `URU_API_BASE`, or `URU_API_URL` to point it at staging or a local backend:
65
105
 
@@ -70,25 +110,40 @@ URU_API_BASE=http://127.0.0.1:8000 bun src/index.ts whoami --json
70
110
 
71
111
  ## Auth and local state
72
112
 
73
- Current auth remains token/API-key based:
74
-
75
- - precedence: `--token` > `--token-file` > `--token-stdin` > `URU_TOKEN` > local config
113
+ The default login path is browser OAuth with PKCE and OS-keychain storage.
114
+ Headless environments can use device login or explicit token/API-key paths:
115
+
116
+ - `uru login` opens browser OAuth and stores the exchanged CLI session token in the OS keychain
117
+ - `uru login --device` prints a device-code URL for SSH/headless environments
118
+ - `uru login --token ...` stores the token in OS credential storage when available: macOS Keychain, Linux `secret-tool`/libsecret, or Windows Credential Manager via PowerShell
119
+ - `uru login --token ... --insecure-storage` is the explicit plaintext fallback
120
+ - Linux token storage requires `secret-tool` (often installed as `libsecret-tools`); Windows token storage requires PowerShell access to Credential Manager. If the OS store is unavailable, login fails closed with an actionable `--insecure-storage` fallback message.
121
+ - interactive commands with no stored token start browser login and then retry the command without printing login success text to stdout
122
+ - `--no-input` disables implicit login and exits `4` when authentication is missing
123
+ - precedence: `--token` / `--token-file` / `--token-stdin` > `URU_TOKEN` > OS keychain > `--insecure-storage` local config
76
124
  - local config: `URU_CONFIG_HOME`, then XDG config home, then `~/.config/uru`
77
125
  - config file permissions: `0600`
78
126
  - linked project state: `.uru/project.json` with `{workspaceId, gemId, libraryPath}`
79
127
  - no credentials are written to `.uru/project.json`
80
-
81
- Target auth from `docs/plans/uru-mcp-cli-design-standards.md` is still pending:
82
- browser OAuth + PKCE, device-code fallback, OS keychain storage, and Gem-scoped
83
- deploy tokens for CI.
128
+ - Gem-scoped deploy tokens for CI use `uru tokens create|ls|revoke`
129
+ - `uru tokens create` requires `--name` plus exactly one lifetime flag:
130
+ `--expiry <duration>` or `--expires-at <iso timestamp>`
131
+ - created tokens default to the server-enforced `gem:deploy` scope
132
+ - custom `--scope`/`--scopes` values must include `gem:deploy` before the token
133
+ can operate Gem deploy/query/control routes
134
+ - Gem secrets use `uru secrets put|ls|rm`; values are write-only
135
+ - `uru env pull` writes a metadata-only template, never downloads remote secret
136
+ values, and clamps the output file to `0600` even when overwriting an existing
137
+ file
138
+ - `uru env run -- <cmd>` overlays local values and redacts all non-empty values from captured output
84
139
 
85
140
  ## Install shape
86
141
 
87
- The package name is `@uru-intelligence/cli`; the installed binary is `uru`:
142
+ The package name is `@uru-intelligence/cli`; the installed binary is still `uru`:
88
143
 
89
144
  ```bash
90
145
  npm install -g @uru-intelligence/cli
91
- uru login --token-file ~/.config/uru/token
146
+ uru login --token "$URU_TOKEN"
92
147
  uru whoami --json
93
148
  ```
94
149
 
@@ -110,4 +165,19 @@ URU_CLI_MCP_STAGING_SMOKE_TARGET=staging \
110
165
  bun --filter=@uru-intelligence/cli run smoke:staging -- --json
111
166
  ```
112
167
 
113
- Remaining after the first npm release: OAuth/device auth, OS keychain storage, shell completions, compiled binaries, and fully-live secret/env/token backend capabilities where product scope requires them.
168
+ The npm package remains the canonical install path. Release builds can also
169
+ produce standalone Bun-compiled binaries for the planned macOS/Linux/Windows
170
+ matrix:
171
+
172
+ ```bash
173
+ bun --filter=@uru-intelligence/cli run build:binaries # current platform
174
+ bun --filter=@uru-intelligence/cli run build:binaries:matrix # planned release matrix
175
+ bun --filter=@uru-intelligence/cli run smoke:binaries # dry-run matrix planner
176
+ ```
177
+
178
+ The updater command is intentionally conservative: `uru update` prints the exact
179
+ `npm install -g @uru-intelligence/cli@latest` command instead of self-mutating
180
+ the installation. Interactive text-mode commands also perform a bounded
181
+ once-per-24h npm version check and write a single stderr notice when a newer CLI
182
+ is available. The notifier is disabled for JSON/streaming output, CI,
183
+ `NO_UPDATE_NOTIFIER`, and `URU_NO_UPDATE_NOTIFIER`.