@ainecto/cli 0.8.1 → 0.9.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 +50 -21
- package/dist/bin/ainecto.js +244 -170
- package/dist/bin/ainecto.js.map +1 -1
- package/dist/bin/mcp.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
Published as `ainecto`, `@ainecto/mcp` and `@ainecto/cli` — the same code. Command: `ainecto`.
|
|
4
4
|
|
|
5
5
|
**Once per machine:** `npx -y ainecto@latest setup` — signs you in through the browser (once), checks the
|
|
6
|
-
connection, and connects Claude Code, Cursor, and Codex to AiNecto
|
|
6
|
+
connection, and connects Claude Code, Cursor, and Codex to the AiNecto server address
|
|
7
|
+
(`https://ainecto.com/mcp`). Each agent then signs in to AiNecto by itself the first time it connects.
|
|
7
8
|
|
|
8
9
|
Every AI session sees the same AiNecto tools. What a tool may change is decided by your AiNecto
|
|
9
10
|
permissions on the workspace, project, or document it touches — the server refuses the rest. There are
|
|
@@ -14,6 +15,10 @@ no session roles (Design / Development / Test / Validation were removed in 0.8.0
|
|
|
14
15
|
**Run `npx -y ainecto@latest setup` (use a long command timeout — at least 6 minutes: sign-in waits up
|
|
15
16
|
to 5 minutes for the user). Then run `npx -y ainecto@latest doctor` and do what it says.**
|
|
16
17
|
|
|
18
|
+
- `setup` registers the server address, so each agent signs in on its own the first time: Claude Code —
|
|
19
|
+
run `/mcp` in a session and sign in to `ainecto`; Cursor — sign in when `ainecto` asks in its MCP
|
|
20
|
+
settings; Codex — signs in while `setup` connects it (a browser tab opens and the sign-in link is
|
|
21
|
+
printed to stderr; if it did not finish, run `codex mcp login ainecto`).
|
|
17
22
|
- To add AiNecto's working rules to a repository, run `npx -y ainecto@latest init` from its root. It
|
|
18
23
|
does not ask for a role or a project.
|
|
19
24
|
- **A server added during a session is not available in that session.** Keep working through the CLI:
|
|
@@ -29,6 +34,7 @@ to 5 minutes for the user). Then run `npx -y ainecto@latest doctor` and do what
|
|
|
29
34
|
```bash
|
|
30
35
|
npx -y ainecto@latest setup # sign in, check, connect Claude Code · Cursor · Codex
|
|
31
36
|
npx -y ainecto@latest setup --dry-run # show what it would do — no sign-in, no changes
|
|
37
|
+
npx -y ainecto@latest setup --local # connect through the local relay instead (see below)
|
|
32
38
|
npx -y ainecto@latest setup --undo # remove the connections setup made (sign-in stays)
|
|
33
39
|
npx -y ainecto@latest status # who is signed in, your AiNecto role, what is connected
|
|
34
40
|
npx -y ainecto@latest doctor # what is missing, and the one command that fixes each item
|
|
@@ -38,19 +44,34 @@ npx -y ainecto@latest doctor # what is missing, and the one command
|
|
|
38
44
|
`ainecto` entry, left untouched), `not installed`, or `failed`; if any client fails it says «partial» and
|
|
39
45
|
exits 1:
|
|
40
46
|
|
|
41
|
-
- Claude Code — `claude mcp add -s user ainecto
|
|
42
|
-
|
|
43
|
-
-
|
|
47
|
+
- Claude Code — `claude mcp add --transport http -s user ainecto https://ainecto.com/mcp` (user scope).
|
|
48
|
+
Sign in with `/mcp` in a session.
|
|
49
|
+
- Cursor — merges `"ainecto": { "url": "https://ainecto.com/mcp" }` into `~/.cursor/mcp.json`, keeping
|
|
50
|
+
your other servers. Cursor asks you to sign in from its MCP settings.
|
|
51
|
+
- Codex — `codex mcp add ainecto --url https://ainecto.com/mcp`. Codex starts its sign-in right away
|
|
52
|
+
(a browser tab opens; `setup` passes Codex's output, with the sign-in link, through to stderr). If that
|
|
53
|
+
did not finish within 90 seconds, Codex shows as `failed` but stays connected — run
|
|
54
|
+
`codex mcp login ainecto` (re-running `setup` says the same).
|
|
44
55
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
56
|
+
With `--env dev` (or `--endpoint`) the address is that environment's. The server address has no version
|
|
57
|
+
to pin: a server update reaches every agent at once. Entries an older `setup` wrote
|
|
58
|
+
(`npx -y @ainecto/mcp@<version>`, with or without `--role`) are rewritten to the server address when you
|
|
59
|
+
re-run `setup`; `setup --undo` removes either kind.
|
|
60
|
+
|
|
61
|
+
`setup --local` registers the local relay instead — `npx -y @ainecto/mcp@<version>` (stdio, pinned to
|
|
62
|
+
the CLI version), which uses this machine's one `ainecto` sign-in for every agent. Use it only when an
|
|
63
|
+
agent cannot sign in to the server address by itself; running `setup` again without `--local` moves back
|
|
64
|
+
to the server address.
|
|
65
|
+
|
|
66
|
+
Your AiNecto role (your job, set in AiNecto's account settings) is shown by `setup` and `status`; AI uses
|
|
67
|
+
it to pitch explanations — it does not change permissions.
|
|
48
68
|
|
|
49
69
|
## Set up a repository (optional)
|
|
50
70
|
|
|
51
71
|
```bash
|
|
52
72
|
npx -y ainecto@latest init # .ainecto/HARNESS.md, an AGENTS.md block (and CLAUDE.md if present), .ainecto/config.json
|
|
53
|
-
npx -y ainecto@latest init --mcp # also .mcp.json (Claude Code) and .cursor/mcp.json (Cursor)
|
|
73
|
+
npx -y ainecto@latest init --mcp # also .mcp.json (Claude Code) and .cursor/mcp.json (Cursor), with the server address
|
|
74
|
+
npx -y ainecto@latest init --mcp --local # the same files with the local relay instead
|
|
54
75
|
npx -y ainecto@latest init --dry-run # the same plan, nothing written
|
|
55
76
|
npx -y ainecto@latest init --undo # remove what init wrote
|
|
56
77
|
```
|
|
@@ -60,11 +81,16 @@ npx -y ainecto@latest init --undo # remove what init wrote
|
|
|
60
81
|
- If this machine is not signed in yet, `init` opens the browser once (`--dry-run` never does). The
|
|
61
82
|
sign-in URL is printed first (with `--json`, as one JSON line on stderr: `{"event":"login_url","url":…}`).
|
|
62
83
|
- It stops when run from a sub-folder of a git repository, and tells you the root.
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
84
|
+
- `--mcp` writes the server address, like `setup`: `.mcp.json` gets
|
|
85
|
+
`"ainecto": { "type": "http", "url": "https://ainecto.com/mcp" }` (Claude Code needs the `type`) and
|
|
86
|
+
`.cursor/mcp.json` gets `"ainecto": { "url": "https://ainecto.com/mcp" }`. Each agent signs in by
|
|
87
|
+
itself the first time. `--local` writes the pinned local relay instead (see Connector Mode).
|
|
88
|
+
- **Repositories set up earlier** (`.mcp.json` with `npx -y @ainecto/mcp…`, with or without `--role`):
|
|
89
|
+
re-run `npx -y ainecto@latest init`. It rewrites the existing `ainecto` entry to the server address
|
|
90
|
+
(or, with `--local`, to the relay pinned to this version without `--role`), and drops the old
|
|
91
|
+
`project` field from `.ainecto/config.json` (unless you changed it). An `ainecto` entry pointing
|
|
92
|
+
somewhere else is left alone. Until then the old entry keeps working: `--role` is accepted and
|
|
93
|
+
ignored. Old flags (`--role`, `--project`, `--project-name`, `--yes`) are ignored with a one-line note.
|
|
68
94
|
|
|
69
95
|
## Commands
|
|
70
96
|
|
|
@@ -167,14 +193,15 @@ The package doubles as a stdio-to-HTTP proxy for the resolved `/mcp` endpoint. I
|
|
|
167
193
|
local file references. It uses this machine's one sign-in (`ainecto setup`, `ainecto auth login`, or
|
|
168
194
|
the sign-in `ainecto init` performs) and never opens a browser on its own.
|
|
169
195
|
|
|
170
|
-
This is the entry `setup` and `init --mcp` write — you normally do not add it by hand
|
|
196
|
+
This is the entry `setup --local` and `init --mcp --local` write — you normally do not add it by hand
|
|
197
|
+
(without `--local` they write the server address instead, as above):
|
|
171
198
|
|
|
172
199
|
```json
|
|
173
200
|
{
|
|
174
201
|
"mcpServers": {
|
|
175
202
|
"ainecto": {
|
|
176
203
|
"command": "npx",
|
|
177
|
-
"args": ["-y", "@ainecto/mcp@0.
|
|
204
|
+
"args": ["-y", "@ainecto/mcp@0.9.0"]
|
|
178
205
|
}
|
|
179
206
|
}
|
|
180
207
|
}
|
|
@@ -187,18 +214,20 @@ hiding it — `ainecto doctor` checks this.
|
|
|
187
214
|
|
|
188
215
|
### MCP Registry
|
|
189
216
|
|
|
190
|
-
`server.json` is the Registry entry `
|
|
191
|
-
lists
|
|
217
|
+
`server.json` is the Registry entry `com.ainecto/mcp` (same as `package.json#mcpName`). It
|
|
218
|
+
lists the server address `https://ainecto.com/mcp` (remote, streamable HTTP — what `setup` registers) and
|
|
219
|
+
the npm package `@ainecto/mcp` (the bridge `setup --local` and `init --mcp --local` write). Registry
|
|
192
220
|
publication requires the npm version it references to carry that `mcpName`, so publish npm first.
|
|
193
221
|
Registration is done by a person:
|
|
194
222
|
|
|
195
223
|
1. `npm run release -- --otp=<code>` (below) so that `@ainecto/mcp@<version>` is on npm.
|
|
196
|
-
2.
|
|
197
|
-
|
|
224
|
+
2. Domain login for `ainecto.com` (HTTP: `https://ainecto.com/.well-known/mcp-registry-auth` must
|
|
225
|
+
serve the public key; the private key is in the macOS keychain):
|
|
226
|
+
`mcp-publisher login http --domain ainecto.com --private-key "$(security find-generic-password -s codelive-mcp-registry -a ainecto.com -w)"`.
|
|
198
227
|
3. `mcp-publisher publish` from this folder.
|
|
199
228
|
|
|
200
|
-
|
|
201
|
-
|
|
229
|
+
Up to 0.8.1 the entry was `io.github.codelives/ainecto` (package only); it is marked deprecated after
|
|
230
|
+
the first `com.ainecto/mcp` publish. Details in `docs/mcp-registry-registration.md`.
|
|
202
231
|
|
|
203
232
|
## Development
|
|
204
233
|
|