@topolo/cli 0.1.32 → 0.2.1
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 +61 -20
- package/dist/index.js +2616 -1781
- package/package.json +8 -3
- package/skills/codex/AGENTS.md +155 -0
- package/skills/topolo/SKILL.md +248 -0
package/README.md
CHANGED
|
@@ -7,10 +7,12 @@ via `stdin`/`stdout`.
|
|
|
7
7
|
## Current scope
|
|
8
8
|
|
|
9
9
|
- API-key authentication (long-lived, service-scoped).
|
|
10
|
-
-
|
|
11
|
-
- Stored access-token refresh
|
|
12
|
-
- First-class `production` and `
|
|
13
|
-
-
|
|
10
|
+
- OAuth device-flow sign-in with a **built-in first-party client** — `topolo auth login` needs no client id; any Topolo user can sign in.
|
|
11
|
+
- Stored access-token refresh; the `@topolo/mcp` server reads the same credential, so agents need no API-key plumbing.
|
|
12
|
+
- First-class `production`, `staging`, `development`, and `local` environments with separate stored credentials and service URL overrides.
|
|
13
|
+
- **Per-context credentials** — hold and switch between your personal space and multiple organizations with `topolo context`.
|
|
14
|
+
- **One-command agent setup** — `topolo skills install` wires the skill + MCP into Claude Code / Codex.
|
|
15
|
+
- Commands: `auth`, `whoami`, `context`, `skills`, `apps`, `services`, credential-scoped `actions`, generic `api` passthrough, and internal `platform` scaffolding.
|
|
14
16
|
|
|
15
17
|
## Install
|
|
16
18
|
|
|
@@ -32,7 +34,7 @@ Production is the default. Select staging with `--env staging` anywhere in the c
|
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
36
|
topolo auth status --env staging --json
|
|
35
|
-
topolo auth login --env staging
|
|
37
|
+
topolo auth login --env staging
|
|
36
38
|
topolo platform apps scaffold home --env staging --write --json
|
|
37
39
|
```
|
|
38
40
|
|
|
@@ -41,21 +43,47 @@ The staging profile uses `auth.stg.topolo.us`, `developers.stg.topolo.us`, and `
|
|
|
41
43
|
For interactive use:
|
|
42
44
|
|
|
43
45
|
```bash
|
|
44
|
-
topolo auth login
|
|
45
|
-
topolo auth login --api-key topo_live_...
|
|
46
|
-
topolo auth status
|
|
47
|
-
topolo auth logout
|
|
46
|
+
topolo auth login # OAuth device flow — no client id needed; approve in the browser
|
|
47
|
+
topolo auth login --api-key topo_live_... # or store an API key directly (headless/service)
|
|
48
|
+
topolo auth status # shows which source is active
|
|
49
|
+
topolo auth logout # clears the stored credential
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
`--
|
|
53
|
-
`
|
|
52
|
+
`topolo auth login` uses a **built-in first-party OAuth client per environment**,
|
|
53
|
+
so any Topolo user can sign in without registering a client — what they can do
|
|
54
|
+
is decided by their permissions. `--client-id doac_...` (or
|
|
55
|
+
`TOPOLO_CLI_CLIENT_ID` / `TOPOLO_<ENV>_CLI_CLIENT_ID`) is only for advanced /
|
|
56
|
+
self-hosted setups. Headless installs use `--api-key`.
|
|
57
|
+
|
|
58
|
+
### Contexts
|
|
59
|
+
|
|
60
|
+
A user can act in their personal space or any organization they belong to. Each
|
|
61
|
+
context has its own credential; the CLI (and the MCP) run in the active one.
|
|
62
|
+
These credentials are independent from the shared web preference: switching a
|
|
63
|
+
CLI/MCP context never moves the browser session, and a web switch never changes
|
|
64
|
+
an already-issued CLI/MCP token or its refresh chain.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
topolo context ls # personal + your orgs, and which is active
|
|
68
|
+
topolo context use <organization|personal> # switch (validated + a fresh token minted server-side)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Wire into Claude Code / Codex
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
topolo skills install # copies the skill + registers the `topolo` MCP server, credential-free
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The MCP reads the same credential `topolo auth login` writes — no API key to paste.
|
|
54
78
|
|
|
55
79
|
## Cross-org isolation
|
|
56
80
|
|
|
57
81
|
The CLI **never accepts an `orgId` argument**. Every command is scoped to the
|
|
58
|
-
|
|
82
|
+
active context embedded in the credential (personal or a specific org); to act
|
|
83
|
+
in a different organization you switch context with `topolo context use`, which
|
|
84
|
+
mints a new context-scoped credential — you can never target another org by
|
|
85
|
+
passing an id. The context remains bound through refresh rotation and is not
|
|
86
|
+
re-hydrated from the user's current web selection. This is enforced in two places:
|
|
59
87
|
|
|
60
88
|
1. The SDK does not expose any `orgId` parameter on any public method.
|
|
61
89
|
2. Each Topolo backend app re-derives `orgId` from the credential on every request and binds it to SQL query filters.
|
|
@@ -80,7 +108,7 @@ request. Dynamic action calls and the generic `topolo api` passthrough enforce
|
|
|
80
108
|
this too:
|
|
81
109
|
|
|
82
110
|
```bash
|
|
83
|
-
topolo actions call
|
|
111
|
+
topolo actions call app_topolo_mail.messages.send --data '{"mailboxId":"primary","subject":"Hello"}' --confirm
|
|
84
112
|
topolo api mail POST /api/mail/mailboxes/primary/messages --data '{"subject":"Hello"}' --confirm
|
|
85
113
|
```
|
|
86
114
|
|
|
@@ -114,16 +142,15 @@ organization and credential the relevant permissions.
|
|
|
114
142
|
|
|
115
143
|
### `topolo actions`
|
|
116
144
|
|
|
117
|
-
|
|
145
|
+
Searches one application's callable actions for the current credential. Applications
|
|
118
146
|
publish actions through Topolo Developers, Auth filters them by the same
|
|
119
147
|
service permissions already used by API keys, launchers, and backend services,
|
|
120
148
|
and the CLI calls them through the shared SDK.
|
|
121
149
|
|
|
122
150
|
```bash
|
|
123
|
-
topolo actions --json
|
|
124
151
|
topolo actions --service mail --json
|
|
125
|
-
topolo actions get
|
|
126
|
-
topolo actions call
|
|
152
|
+
topolo actions get app_topolo_mail.messages.send --json
|
|
153
|
+
topolo actions call app_topolo_mail.messages.send \
|
|
127
154
|
--data '{"mailboxId":"primary","subject":"Hello","text":"..."}' \
|
|
128
155
|
--confirm --json
|
|
129
156
|
```
|
|
@@ -132,6 +159,20 @@ Use `topolo actions` before `topolo api` when an app has published a machine
|
|
|
132
159
|
contract for the operation. `topolo api` remains the escape hatch for endpoints
|
|
133
160
|
that are not yet in the action catalog.
|
|
134
161
|
|
|
162
|
+
Workspace-scoped actions carry resource context independently from the active
|
|
163
|
+
personal/organization credential and independently from the browser session:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
topolo actions call app_topolo_inventory.dashboard.get \
|
|
167
|
+
--resource-type workspace \
|
|
168
|
+
--resource-id <workspace_id> \
|
|
169
|
+
--data '{}' --json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Both resource flags are required together. This supports concurrent agent
|
|
173
|
+
operations across many app-local workspaces without changing the CLI/MCP org
|
|
174
|
+
context or the user's web switcher.
|
|
175
|
+
|
|
135
176
|
### `topolo apps`
|
|
136
177
|
|
|
137
178
|
Lists launchable Topolo applications available to the current credential. This
|
|
@@ -223,7 +264,7 @@ topolo api auth GET /api/me
|
|
|
223
264
|
topolo api mail POST /api/mail/mailboxes/primary/messages --data '{"subject":"Hello"}' --confirm
|
|
224
265
|
```
|
|
225
266
|
|
|
226
|
-
Use `topolo services --json` to discover
|
|
267
|
+
Use `topolo services --json` to discover app ids permitted for the current
|
|
227
268
|
credential before calling a service that does not have a typed command yet.
|
|
228
269
|
|
|
229
270
|
## Output modes
|