@topolo/cli 0.1.6 → 0.1.7
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 +25 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@ Command-line interface for the Topolo platform. Designed for both humans and
|
|
|
4
4
|
third-party agents (Claude Code, Codex, Cursor, etc.) that prefer to interact
|
|
5
5
|
via `stdin`/`stdout`.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Current scope
|
|
8
8
|
|
|
9
9
|
- API-key authentication (long-lived, service-scoped).
|
|
10
|
-
- Access-token authentication
|
|
11
|
-
-
|
|
12
|
-
-
|
|
10
|
+
- Access-token authentication via OAuth device flow when a CLI OAuth client id is configured.
|
|
11
|
+
- Stored access-token refresh when the config includes a refresh token and OAuth client id.
|
|
12
|
+
- Commands: `auth login/logout/status`, `whoami`, `services`, `crm contacts:list`, `crm contacts:get`, and generic `api` passthrough for SDK-registered services.
|
|
13
13
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
@@ -30,11 +30,16 @@ Credentials come from (in priority order):
|
|
|
30
30
|
For interactive use:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
topolo auth login
|
|
33
|
+
topolo auth login --client-id doac_... # device flow
|
|
34
|
+
topolo auth login --api-key topo_live_... # store API key directly
|
|
34
35
|
topolo auth status # shows which source is active
|
|
35
36
|
topolo auth logout # clears the stored credential
|
|
36
37
|
```
|
|
37
38
|
|
|
39
|
+
If no client id is configured, `topolo auth login` falls back to an API-key
|
|
40
|
+
prompt in an interactive terminal. Non-interactive sessions should pass
|
|
41
|
+
`--api-key` or set `TOPOLO_CLI_CLIENT_ID`.
|
|
42
|
+
|
|
38
43
|
## Cross-org isolation
|
|
39
44
|
|
|
40
45
|
The CLI **never accepts an `orgId` argument**. Every command is scoped to the
|
|
@@ -89,6 +94,14 @@ topolo crm contacts:list -q "acme" -p 2 -s 50 --json
|
|
|
89
94
|
topolo crm contacts:get contact_abc123
|
|
90
95
|
```
|
|
91
96
|
|
|
97
|
+
### `topolo services`
|
|
98
|
+
|
|
99
|
+
Lists every service id and effective URL known to the generated SDK registry.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
topolo services --json
|
|
103
|
+
```
|
|
104
|
+
|
|
92
105
|
### `topolo api <service> <method> <path>`
|
|
93
106
|
|
|
94
107
|
Escape hatch for endpoints without typed modules yet.
|
|
@@ -98,6 +111,9 @@ topolo api auth GET /api/me
|
|
|
98
111
|
topolo api crm POST /api/contacts --data '{"first":"Jane"}' --confirm
|
|
99
112
|
```
|
|
100
113
|
|
|
114
|
+
Use `topolo services --json` to discover valid service ids before calling a
|
|
115
|
+
service that does not have a typed command yet.
|
|
116
|
+
|
|
101
117
|
## Output modes
|
|
102
118
|
|
|
103
119
|
- Pretty when stdout is a TTY.
|
|
@@ -137,6 +153,10 @@ Both docs cover the same CLI surface: credential handling, the JSON invocation
|
|
|
137
153
|
contract, the write-safety `--confirm` guardrail, and the cross-org isolation
|
|
138
154
|
rules. Keep them in sync when adding new commands.
|
|
139
155
|
|
|
156
|
+
For agents that support MCP, also register `@topolo/mcp`; the skill/AGENTS
|
|
157
|
+
guidance still matters because it tells the agent when to prefer MCP tools,
|
|
158
|
+
when to fall back to shell commands, and how to handle writes.
|
|
159
|
+
|
|
140
160
|
## Debug output
|
|
141
161
|
|
|
142
162
|
Set `TOPOLO_DEBUG=1` to trace every SDK request to stderr (stdout stays clean
|
package/dist/index.js
CHANGED
package/package.json
CHANGED