@uru-intelligence/cli 0.1.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/README.md +113 -0
- package/dist/uru.mjs +1605 -0
- package/package.json +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# @uru-intelligence/cli
|
|
2
|
+
|
|
3
|
+
Full-platform `uru` CLI. The package installs a `uru` binary and uses the same
|
|
4
|
+
registry-backed platform operations exposed through MCP and the web UI.
|
|
5
|
+
|
|
6
|
+
Do not publish a release until the registry, MCP proxy, generated docs, and
|
|
7
|
+
staging smoke gates are all green; run it from the repo with Bun while iterating.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cd apps/cli
|
|
11
|
+
bun src/index.ts login --token "$URU_TOKEN"
|
|
12
|
+
bun src/index.ts whoami --json
|
|
13
|
+
bun src/index.ts switch <workspace-id>
|
|
14
|
+
```
|
|
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.
|
|
17
|
+
|
|
18
|
+
## Current commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Link the current directory to a server-side Gem. Writes only .uru/project.json.
|
|
22
|
+
bun src/index.ts link --workspace <workspace-id> --path 'library/Golden Gems/My Gem.gem'
|
|
23
|
+
|
|
24
|
+
# Initialize and operate Gems through first-class Gem commands.
|
|
25
|
+
bun src/index.ts init 'library/Golden Gems/My Gem.gem' --file ./main.html
|
|
26
|
+
bun src/index.ts deploy 'library/Golden Gems/My Gem.gem'
|
|
27
|
+
bun src/index.ts status 'library/Golden Gems/My Gem.gem' --json
|
|
28
|
+
bun src/index.ts logs 'library/Golden Gems/My Gem.gem' --limit 100
|
|
29
|
+
bun src/index.ts open 'library/Golden Gems/My Gem.gem'
|
|
30
|
+
bun src/index.ts gems inspect 'library/Golden Gems/My Gem.gem'
|
|
31
|
+
bun src/index.ts gems validate 'library/Golden Gems/My Gem.gem'
|
|
32
|
+
bun src/index.ts gems build 'library/Golden Gems/My Gem.gem'
|
|
33
|
+
bun src/index.ts gems read 'library/Golden Gems/My Gem.gem' main.html
|
|
34
|
+
bun src/index.ts gems write 'library/Golden Gems/My Gem.gem' main.html --file ./main.html
|
|
35
|
+
|
|
36
|
+
# Library and dataset helpers over the platform tool surface.
|
|
37
|
+
bun src/index.ts library ls library
|
|
38
|
+
bun src/index.ts library search revenue
|
|
39
|
+
bun src/index.ts library mkdir 'library/Golden Gems'
|
|
40
|
+
bun src/index.ts datasets query revenue_rows --limit 50 --json
|
|
41
|
+
bun src/index.ts datasets get --params-json '{"dataset_id":"revenue_rows"}'
|
|
42
|
+
bun src/index.ts datasets rows-upsert --params-json '{"dataset_id":"revenue_rows","rows":[{"name":"Acme"}]}'
|
|
43
|
+
bun src/index.ts datasets manage-create --params-json '{"title":"Revenue Rows","data_schema":{"properties":[]}}'
|
|
44
|
+
|
|
45
|
+
# Raw platform-tool escape hatch for diagnostics and parity.
|
|
46
|
+
bun src/index.ts tools ls
|
|
47
|
+
bun src/index.ts tools schema gem_control_plane --json
|
|
48
|
+
bun src/index.ts tools run gem_control_plane --params-json '{"op":"inspect","path":"library/Golden Gems/My Gem.gem"}'
|
|
49
|
+
|
|
50
|
+
# Show and execute the generated operation registry.
|
|
51
|
+
bun src/index.ts operations ls
|
|
52
|
+
bun src/index.ts operations ls --family automations
|
|
53
|
+
bun src/index.ts operations run gem.inspect --params-json '{"path":"library/Golden Gems/My Gem.gem"}'
|
|
54
|
+
bun src/index.ts library search "client brief"
|
|
55
|
+
bun src/index.ts docs library_fs
|
|
56
|
+
bun src/index.ts api platform/tools/search_tools/execute -F query=gem
|
|
57
|
+
|
|
58
|
+
# MCP client config helper. Prefer a scoped API key for real installs.
|
|
59
|
+
bun src/index.ts mcp config --api-key "$URU_API_KEY"
|
|
60
|
+
bun src/index.ts mcp install --path ~/.config/claude-code/mcp.json --api-key "$URU_API_KEY"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The scaffold defaults to the production API (`https://api.uruintelligence.com`).
|
|
64
|
+
Use `--api-url`, `URU_API_BASE`, or `URU_API_URL` to point it at staging or a local backend:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
URU_API_BASE=https://api-staging.uruintelligence.com bun src/index.ts whoami --json
|
|
68
|
+
URU_API_BASE=http://127.0.0.1:8000 bun src/index.ts whoami --json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Auth and local state
|
|
72
|
+
|
|
73
|
+
Current auth remains token/API-key based:
|
|
74
|
+
|
|
75
|
+
- precedence: `--token` > `--token-file` > `--token-stdin` > `URU_TOKEN` > local config
|
|
76
|
+
- local config: `URU_CONFIG_HOME`, then XDG config home, then `~/.config/uru`
|
|
77
|
+
- config file permissions: `0600`
|
|
78
|
+
- linked project state: `.uru/project.json` with `{workspaceId, gemId, libraryPath}`
|
|
79
|
+
- 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.
|
|
84
|
+
|
|
85
|
+
## Install shape
|
|
86
|
+
|
|
87
|
+
The package name is `@uru-intelligence/cli`; the installed binary is `uru`:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm install -g @uru-intelligence/cli
|
|
91
|
+
uru login --token-file ~/.config/uru/token
|
|
92
|
+
uru whoami --json
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For one-off usage:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
printf '%s' "$URU_TOKEN" | npx @uru-intelligence/cli whoami --token-stdin --json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Release validation
|
|
102
|
+
|
|
103
|
+
Before publishing, run the full local CLI gate and the staging CLI/MCP smoke with a staging-scoped token. The smoke reads credentials from env or macOS Keychain and never prints the token. To avoid putting a token in shell history, store it as `uru_staging_smoke_token` with `security add-generic-password -a "$USER" -s uru_staging_smoke_token -w '<token>' -U`.
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
bun --filter=@uru-intelligence/cli run ci
|
|
107
|
+
URU_CLI_MCP_STAGING_SMOKE_TARGET=staging \
|
|
108
|
+
STAGING_AUTH_BEARER_TOKEN=... \
|
|
109
|
+
STAGING_WORKSPACE_ID=<workspace-id-if-needed> \
|
|
110
|
+
bun --filter=@uru-intelligence/cli run smoke:staging -- --json
|
|
111
|
+
```
|
|
112
|
+
|
|
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.
|