@topolo/cli 0.1.6 → 0.1.8
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 +57 -5
- package/dist/index.js +2216 -21
- 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`, `apps`, `apps scaffold`, `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,46 @@ 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
|
+
|
|
105
|
+
### `topolo apps`
|
|
106
|
+
|
|
107
|
+
Lists every Topolo application known to the generated SDK catalog, including
|
|
108
|
+
pages-only applications that do not expose a callable API service.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
topolo apps --json
|
|
112
|
+
topolo apps get mail --json
|
|
113
|
+
topolo apps requirements mail --json
|
|
114
|
+
topolo apps audit mail --json
|
|
115
|
+
topolo apps audit mail --local --repo-root /Users/ashes/Projects/topolo --fail-on needs_review --json
|
|
116
|
+
topolo apps scaffold insights --json
|
|
117
|
+
topolo apps scaffold insights --workflow-only --no-json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Agents should call `topolo apps requirements <app> --json` before creating or
|
|
121
|
+
expanding a Topolo app. The output is the versioned platform contract for app
|
|
122
|
+
metadata, canonical docs, shared auth, shared shell, service registration,
|
|
123
|
+
deployment metadata, agent surfaces, observability, and verification.
|
|
124
|
+
`topolo apps audit --json` turns the same contract into per-app scores and a
|
|
125
|
+
catalog-backed migration queue. Add `--local --repo-root <topolo-checkout>` to
|
|
126
|
+
include filesystem evidence from the app repo, CloudControl metadata, and
|
|
127
|
+
TopoloDocs. Add `--fail-on needs_review` for the default new-work gate, or
|
|
128
|
+
`--fail-on partial` for strict release readiness.
|
|
129
|
+
|
|
130
|
+
`topolo apps scaffold <app>` generates the required new-application scaffold
|
|
131
|
+
manifest, including expected package/auth/shell/docs/CloudControl files and a
|
|
132
|
+
`topolo-conformance.yml` GitHub Actions workflow. The generated workflow checks
|
|
133
|
+
out the app under `PlatformApplications/<AppDir>`, checks out `Topolo-io/docs`,
|
|
134
|
+
`Topolo-io/topolo-sdk`, and `Topolo-io/TopoloCli`, builds the current CLI from
|
|
135
|
+
source, then runs the local conformance audit with `--fail-on needs_review`.
|
|
136
|
+
|
|
92
137
|
### `topolo api <service> <method> <path>`
|
|
93
138
|
|
|
94
139
|
Escape hatch for endpoints without typed modules yet.
|
|
@@ -98,6 +143,9 @@ topolo api auth GET /api/me
|
|
|
98
143
|
topolo api crm POST /api/contacts --data '{"first":"Jane"}' --confirm
|
|
99
144
|
```
|
|
100
145
|
|
|
146
|
+
Use `topolo services --json` to discover valid service ids before calling a
|
|
147
|
+
service that does not have a typed command yet.
|
|
148
|
+
|
|
101
149
|
## Output modes
|
|
102
150
|
|
|
103
151
|
- Pretty when stdout is a TTY.
|
|
@@ -137,6 +185,10 @@ Both docs cover the same CLI surface: credential handling, the JSON invocation
|
|
|
137
185
|
contract, the write-safety `--confirm` guardrail, and the cross-org isolation
|
|
138
186
|
rules. Keep them in sync when adding new commands.
|
|
139
187
|
|
|
188
|
+
For agents that support MCP, also register `@topolo/mcp`; the skill/AGENTS
|
|
189
|
+
guidance still matters because it tells the agent when to prefer MCP tools,
|
|
190
|
+
when to fall back to shell commands, and how to handle writes.
|
|
191
|
+
|
|
140
192
|
## Debug output
|
|
141
193
|
|
|
142
194
|
Set `TOPOLO_DEBUG=1` to trace every SDK request to stderr (stdout stays clean
|