@agentcentral/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/LICENSE +21 -0
- package/README.md +112 -0
- package/dist/index.js +1801 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Christian Verhoeven
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# agentcentral CLI
|
|
2
|
+
|
|
3
|
+
Command-line access to the agentcentral hosted MCP server. List and call the key-scoped tool surface,
|
|
4
|
+
run a transparent stdio bridge for local MCP clients, and diagnose connectivity — all over the same
|
|
5
|
+
stateless Streamable HTTP transport an MCP client uses.
|
|
6
|
+
|
|
7
|
+
## Install (from the monorepo)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm install
|
|
11
|
+
pnpm --filter @agent-central/cli build
|
|
12
|
+
# run the built bin
|
|
13
|
+
node packages/cli/dist/index.js --help
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Once published the `agentcentral` bin is on `PATH`; the examples below use that name.
|
|
17
|
+
|
|
18
|
+
## Authentication
|
|
19
|
+
|
|
20
|
+
The CLI resolves an `ac_live_...` API key with this precedence (highest first):
|
|
21
|
+
|
|
22
|
+
1. `--api-key-stdin` (key piped on stdin — never an argv value)
|
|
23
|
+
2. `--profile <name>` (a stored profile)
|
|
24
|
+
3. `AGENT_CENTRAL_API_KEY` environment variable
|
|
25
|
+
4. `AGENTCENTRAL_API_KEY` (deprecated alias; warns once)
|
|
26
|
+
5. the active profile, then a lone stored profile
|
|
27
|
+
|
|
28
|
+
The fastest path is the environment variable:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
export AGENT_CENTRAL_API_KEY=ac_live_xxxxxxxxxxxx
|
|
32
|
+
agentcentral account info
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Keys are single-marketplace bound and are only ever echoed redacted (`ac_live_***1234`).
|
|
36
|
+
|
|
37
|
+
### Stored profiles
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
agentcentral auth login # prompt + store under the "default" profile
|
|
41
|
+
agentcentral profiles add ca # store a named profile (key read from stdin)
|
|
42
|
+
agentcentral profiles use ca # set the active profile
|
|
43
|
+
agentcentral profiles list # show stored profiles (keys redacted)
|
|
44
|
+
agentcentral auth status # show the currently-resolved key + endpoint
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The config lives at `${XDG_CONFIG_HOME:-~/.config}/agentcentral/config.json`, written `0600`.
|
|
48
|
+
|
|
49
|
+
## Common commands
|
|
50
|
+
|
|
51
|
+
### Inspect and call tools
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
agentcentral tools list # key-scoped tools (json)
|
|
55
|
+
agentcentral tools list --format table # aligned table
|
|
56
|
+
agentcentral tools describe get_orders # full descriptor
|
|
57
|
+
agentcentral tools schema get_orders # raw JSON Schema
|
|
58
|
+
|
|
59
|
+
# Call a read tool with inline JSON, an @file, or "-" (stdin):
|
|
60
|
+
agentcentral tools call get_orders '{"limit":5}'
|
|
61
|
+
agentcentral tools call get_orders @args.json
|
|
62
|
+
echo '{"limit":5}' | agentcentral tools call get_orders -
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Write tools default to a non-mutating **preview**. To submit, pass `--yes` and an `--idempotency-key`:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
agentcentral tools call update_keyword_bids @bids.json \
|
|
69
|
+
--yes --idempotency-key "$(uuidgen)"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Run the stdio MCP bridge
|
|
73
|
+
|
|
74
|
+
`mcp serve` relays newline-delimited JSON-RPC between a local MCP client and the hosted server. stdout
|
|
75
|
+
carries JSON-RPC only — every diagnostic goes to stderr.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
agentcentral mcp serve # transparent bridge
|
|
79
|
+
agentcentral mcp serve --read-only # advisory: hide write tools from tools/list
|
|
80
|
+
agentcentral mcp serve --domain ads,inventory
|
|
81
|
+
|
|
82
|
+
agentcentral mcp config claude # print client config (Claude/Cursor/OpenClaw/Hermes)
|
|
83
|
+
agentcentral mcp test # check hosted-server reachability
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Diagnose
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
agentcentral doctor # CLI/runtime versions, auth (redacted), /health, account resolution
|
|
90
|
+
agentcentral doctor --format markdown
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Global flags
|
|
94
|
+
|
|
95
|
+
Every command accepts: `--format/-f json|ndjson|table`, `--output/-o <path>`, `--profile/-p <name>`,
|
|
96
|
+
`--timeout <ms>`, `--limit <n>`, `--quiet/-q`, `--no-color`, `--verbose`, `--request-id <id>`,
|
|
97
|
+
`--yes/-y`, `--idempotency-key <key>`, `--api-key-stdin`.
|
|
98
|
+
|
|
99
|
+
## Exit codes
|
|
100
|
+
|
|
101
|
+
| Code | Name | Meaning |
|
|
102
|
+
|------|------|---------|
|
|
103
|
+
| 0 | Success | command completed |
|
|
104
|
+
| 1 | GeneralFailure | unclassified error |
|
|
105
|
+
| 2 | UsageError | bad flags / non-tabular result requested as `--format table` |
|
|
106
|
+
| 3 | AuthError | HTTP 401, invalid connector token, or missing API key |
|
|
107
|
+
| 4 | PermissionDenied | key-scope denial or tenant lifecycle status |
|
|
108
|
+
| 5 | ValidationFailed | input/tool validation (`-32602`, write `validation_error`) |
|
|
109
|
+
| 6 | TransportFailure | network failure or 429 after retries exhausted |
|
|
110
|
+
| 7 | ToolExecutionFailed | tool executed but errored |
|
|
111
|
+
| 8 | Timeout | request timed out |
|
|
112
|
+
| 9 | PartialWrite | a write partially succeeded |
|