@agentage/cli 0.73.0 → 0.74.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 CHANGED
@@ -2,171 +2,113 @@
2
2
 
3
3
  ![Connect this machine to agentage from the terminal](https://github.com/agentage/cli/raw/master/docs/banner.svg)
4
4
 
5
- The agentage CLI connects each machine you use to your agentage account, a shared place for your
6
- AI tools. Use it from a terminal, a server or CI. It also installs extensions: npm packages that
7
- add commands to `agentage`. You need Node.js 22 or newer.
5
+ The `agentage` command connects each machine you use to your agentage account and runs
6
+ extensions on it. It is also the tool to make and release your own extension. Use it from a
7
+ terminal, a server or CI. You need Node.js 22 or newer.
8
8
 
9
9
  ```bash
10
- npm install -g @agentage/cli && agentage setup
10
+ npm i -g @agentage/cli
11
+ agentage setup # sign in in your browser, then start the local daemon
11
12
  ```
12
13
 
13
- ## What is this?
14
-
15
- The CLI stays **small**: sign-in, status, update and an extension manager. Sign-in uses OAuth 2.1
16
- with PKCE: you type nothing into the terminal. Everything else, memory included, arrives as an
17
- extension.
18
-
19
- ## Get started
20
-
21
- `agentage setup` opens your browser for sign-in. Check the session with `agentage status`.
22
- Installing and running extensions needs no sign-in. On a new machine, a signed-in `setup` installs
23
- the extensions of your account's profile once; after that each machine keeps its own list.
24
-
25
- ### On a server or in CI (no browser)
26
-
27
- `agentage setup --no-browser` prints the sign-in URL. Open it in a browser on this same machine,
28
- because sign-in returns to `localhost`. On a server, use a personal access token from the
29
- dashboard (**Settings**, then **API tokens**):
30
-
31
- ```bash
32
- AGENTAGE_TOKEN=aga_... agentage status
33
- ```
34
-
35
- More: [docs/reference.md](docs/reference.md#token-auth-ci-and-headless).
14
+ Status: before 1.0. Extensions run on the local daemon (`127.0.0.1:4243`) of each machine.
36
15
 
37
16
  ## Commands
38
17
 
39
- | Command | What it does |
40
- | ----------------------------- | ---------------------------------------------------------------------------------- |
41
- | `agentage setup` | Sign in, install your account's profile, show status, start the daemon |
42
- | `agentage setup --no-browser` | Print the sign-in URL instead of opening a browser |
43
- | `agentage setup --reauth` | Force a fresh sign-in |
44
- | `agentage setup --disconnect` | Sign out and remove local credentials |
45
- | `agentage status` | Version, update, target, sign-in, endpoint, then machine, profile, extensions |
46
- | `agentage update` | Install the latest published version (`--check` only reports) |
47
- | `agentage daemon status` | The local daemon on 127.0.0.1:4243 (`start`, `stop`, `restart`); `setup` starts it |
48
- | `agentage extension ...` | Manage extensions, see [Extensions](#extensions) |
49
- | any command with `--json` | One JSON object on stdout: `{ success, data }` or `{ success, error }` |
50
-
51
- More: [author commands](docs/extensions.md#author-commands) and
52
- [the lifecycle](docs/reference.md#extension-lifecycle).
53
-
54
- ## Extensions
55
-
56
- - A **profile** lists what your account wants: extensions, version ranges, and which are off
57
- per machine.
58
- - On a new machine, `setup` installs the profile's extensions through the daemon, once. No
59
- command pushes your changes back to the account: each machine keeps its own list.
60
- - `extension install`, `list`, `update`, `disable`, `enable`, `configure` and `remove` manage
61
- one extension in the local daemon (`127.0.0.1:4243`), which runs each as its own process.
62
- - Nothing installs on a timer: the machine changes only when you run a command.
63
-
64
- ```bash
65
- agentage extension install probe # the market's newest version, then it runs
66
- agentage extension configure probe echo.prefix=hey # settings, no daemon restart
67
- agentage extension list # id, version, source, state
68
- agentage probe ping # run a command by its extension id
69
- agentage extension remove probe # take it out again; --purge also deletes its data
70
- ```
71
-
72
- Extensions run with your privileges, in the daemon and in the CLI process, so install only ones
73
- you trust. npm runs with `--ignore-scripts`. The account token leaves the environment before
74
- extension code loads.
75
-
76
- More: [docs/profiles.md](docs/profiles.md).
77
-
78
- ### Write and run your own extension
79
-
80
- `create` needs git and network. `build --container`, `up --docker` and `release` also need
81
- Docker and a committed tree; `release` needs the `gh` CLI.
18
+ Each command has `--help`. The full reference is [docs/reference.md](docs/reference.md).
19
+
20
+ | Command | What it does |
21
+ | ------------------------------ | ------------------------------------------------------------------------ |
22
+ | `agentage setup` | Sign in and connect this machine to your account; start the daemon |
23
+ | `agentage status` | Show the cli, account, endpoint, machine, profile and extension status |
24
+ | `agentage update` | Update `@agentage/cli` to the latest published version |
25
+ | `agentage daemon` | Start, show, stop or restart the local daemon that runs extensions |
26
+ | `extension install <name>` | Install an extension (`<id>`, `<id>@<version>` or a folder) and run it |
27
+ | `extension list` | Show each installed extension: id, version, source, state |
28
+ | `extension update [id]` | Move each market extension, or one, to its newest version |
29
+ | `extension disable <id>` | Stop an extension, keep its data |
30
+ | `extension enable <id>` | Run a disabled extension again |
31
+ | `extension configure <id> k=v` | Set settings (or `--secret` secrets) of an extension, no restart |
32
+ | `extension remove <id>` | Stop and remove an extension; its data stays unless `--purge` |
33
+ | `extension doctor` | Load every extension once and refresh its state: ok or failed |
34
+ | `extension create <id>` | Create `./extension-<id>` from the extension template |
35
+ | `extension check [dir]` | Check that an extension package conforms, as every build does first |
36
+ | `extension build` | Build the extension package; `--container` builds one image of all parts |
37
+ | `extension release` | Release an extension in CI; `--changed` releases each changed extension |
38
+ | `extension up` | Run the working copy on the daemon and reload each change |
39
+ | `extension down` | Stop what `extension up` started here |
40
+ | `extension token` | Print a token from the dev issuer that `extension up --docker` started |
41
+
42
+ `extension ...` means `agentage extension ...`. Add `--json` to most commands for one JSON object
43
+ on stdout: `{ success, data }` or `{ success: false, error }`. On a server with no browser, use a
44
+ personal access token: `AGENTAGE_TOKEN=aga_... agentage status`.
45
+
46
+ ## Make your first extension
47
+
48
+ ![Make your first extension: create, verify, check, merge, released](https://github.com/agentage/cli/raw/master/docs/first-extension.svg)
49
+
50
+ You need git and network. Run these in an empty folder:
82
51
 
83
52
  ```bash
84
- agentage extension create example api # makes ./extension-example with the api part
85
- cd extension-example && npm ci # installs the pinned cli
86
- npx agentage extension up # runs it on the daemon, reloads each saved change
87
- npx agentage extension down # removes the row up added (its data stays)
53
+ agentage extension create my-ext
54
+ cd extension-my-ext
55
+ npm ci
56
+ npm run verify
57
+ npx agentage extension check # PASS my-ext 0.1.2 conforms (6 rules)
58
+ git init -b master && git add -A && git commit -m "feat: my-ext extension"
88
59
  ```
89
60
 
90
- In the extension folder, use `npx agentage`: the project's pinned cli and the global one can differ.
91
-
92
- More: [docs/extensions.md](docs/extensions.md#run-it-locally).
93
-
94
- ## Where things live
61
+ `create` copies the template from `agentage/kit:template` and writes your id into every file. In
62
+ the folder, use `npx agentage`: it runs the cli version that the folder pins. The guide of the new
63
+ folder is its own `README.md`. `check` may end with an `update available` line when the cli that
64
+ runs it is older than the newest on npm.
95
65
 
96
- Everything lives in the config directory, `~/.agentage` by default:
66
+ `create` builds the folder and gives it to the local daemon, so it runs at once. Add `--no-install`
67
+ to only create the files: CI and agents always do. Two more commands change the local daemon:
68
+ `npx agentage extension up` runs the folder there and reloads each change, and
69
+ `agentage extension install ./extension-my-ext` installs it there.
97
70
 
98
- | Path | What |
99
- | ------------------------------- | ----------------------------------------------------- |
100
- | `~/.agentage/auth.json` | your sign-in, owner-only |
101
- | `~/.agentage/profile.json` | the profile: what this account wants |
102
- | `~/.agentage/machine.json` | this machine's id, name, dev extensions and account |
103
- | `~/.agentage/installation.json` | this machine's extension list, written by the daemon |
104
- | `~/.agentage/daemon.json` | the running daemon: pid, port, host token; owner-only |
105
- | `~/.agentage/extensions/` | installed extensions, one tree per id and version |
106
- | `~/.agentage/state/` | the last run of each extension |
107
- | `~/.agentage/commands.json` | cli 0.51's command holders; read, never written |
108
- | `~/.agentage/secrets.json` | extension secrets, owner-only |
109
- | `~/.agentage/data/<id>/` | what each extension keeps |
110
- | `~/.agentage/logs/` | `daemon.log` and each extension's log |
71
+ ## How an extension is released
111
72
 
112
- `status` writes `machine.json` even before you sign in.
73
+ Push the repo to GitHub. A release runs in CI in one of two modes:
113
74
 
114
- To uninstall, run `agentage setup --disconnect`, then `npm uninstall -g @agentage/cli`, then
115
- delete `~/.agentage`.
75
+ - A repo with one or several extensions: each merge to master runs `agentage extension release --changed`. This is what a new repo from `create` does.
76
+ - A repo with one extension can instead release by a pushed tag `v<version>`: `agentage extension release`.
116
77
 
117
- ## How it works
78
+ With `--changed`, a changed extension gets a date version
79
+ `YYYY.MDD.N` (for example `2026.1122.1`), the tag `<id>@<version>`, its images and its records on
80
+ the GitHub release. A change only in a root `*.md` file, `docs/` or `.github/` releases nothing.
81
+ A `.release-ignore` file adds more patterns. The new package is private: it goes to npm only when
82
+ you remove `"private": true`. The rule in full: [docs/reference.md](docs/reference.md#extension-release).
118
83
 
119
- - `setup` registers a one-off OAuth client and waits for the browser on a localhost callback.
120
- - Tokens land in `~/.agentage/auth.json` (owner-only) and refresh automatically.
121
- - `status` checks the session against the account's introspection endpoint.
122
- - The daemon is the only background process. It starts when a command needs it and runs until
123
- `agentage daemon stop`. Nothing installs on a timer.
124
-
125
- ## Configuration
126
-
127
- | Env | Default | Purpose |
128
- | ------------------------- | --------------------- | -------------------------------------------------- |
129
- | `AGENTAGE_SITE_FQDN` | `agentage.io` | Target host |
130
- | `AGENTAGE_CONFIG_DIR` | `~/.agentage` | Config and credentials directory |
131
- | `AGENTAGE_TOKEN` | - | Personal access token for CI and headless machines |
132
- | `AGENTAGE_EXTENSIONS_DIR` | `<config>/extensions` | Where extensions are installed |
133
- | `AGENTAGE_DAEMON_PORT` | `4243` | The daemon's port on 127.0.0.1 |
134
- | `NO_COLOR` | - | Disable colored output |
135
-
136
- ## Develop
84
+ ## How to work on this repo
137
85
 
138
86
  ```bash
139
87
  npm ci
140
- npm run verify
141
- npm run build && npm run test:e2e -- --grep @offline
88
+ npm run verify # type-check, lint, format, test, build
89
+ npm run build && npm run test:e2e -- --grep @offline # e2e with a loopback npm registry
142
90
  ```
143
91
 
144
- Each e2e title under `e2e/core/` names a command and what must hold. The tests use a loopback
145
- npm registry that serves `fixtures/`.
92
+ ## How a change is released
146
93
 
147
- ## Release
94
+ A merge of a normal change releases nothing. The `chore(release): X.Y.Z` PR from
95
+ `prepare-release.yml` changes `package.json`; its merge runs `release.yml`, which publishes to npm
96
+ with OIDC trusted publishing and pushes the tag `vX.Y.Z`. Details: [docs/release.md](docs/release.md).
148
97
 
149
- Dispatch `prepare-release.yml` (a weekly schedule also dispatches it). It opens a
150
- `chore(release): X.Y.Z` PR and arms auto-merge. On the merge, `release.yml` runs verify and the
151
- agentage/e2e cli tier on the packed cli, then publishes to npm with OIDC trusted publishing and
152
- provenance, and pushes the tag `vX.Y.Z`. It skips a version already on npm.
98
+ ## For agents
153
99
 
154
- - The publish worked but the tag push failed: push the tag by hand on the release commit
155
- (`git tag vX.Y.Z <release commit> && git push origin vX.Y.Z`); never publish again.
156
- - The cli tier failed: fix the cli or the e2e test, then dispatch `release.yml` again.
157
- - `release.yml` runs only the `@smoke` tests of the agentage/e2e cli tier on the candidate. The
158
- lifecycle, execution and reload tests of agentage/e2e run on its own PRs against the published
159
- cli.
160
- - Before the release PR merges, check: the PR checks of the release commit are green, and the cli
161
- project of agentage/e2e passes in full against the packed tarball of that commit
162
- (`AGENTAGE_CLI_TARBALL=<tgz> npm run test:cli -- --retries=0`).
100
+ - Read [AGENTS.md](AGENTS.md) (the same file as `CLAUDE.md`): commands, layout and where each fact lives.
101
+ - Never run `setup`, `update`, `extension up` or `extension install` on a shared machine, and always add `--no-install` to `extension create`.
102
+ - Never publish to npm by hand: only `release.yml` publishes.
163
103
 
164
- ## Documentation
104
+ ## Links
165
105
 
166
- - [docs/reference.md](docs/reference.md): every flag, exit code and environment variable.
167
- - [docs/profiles.md](docs/profiles.md): profiles, extension states, the plan and updates.
106
+ - [docs/reference.md](docs/reference.md): every flag, exit code, environment variable and file.
168
107
  - [docs/extensions.md](docs/extensions.md): write, check and run your own extension.
108
+ - [docs/profiles.md](docs/profiles.md): profiles, extension states, the plan and updates.
109
+ - [agentage/kit](https://github.com/agentage/kit): the kit and the extension template.
110
+ - [agentage/examples](https://github.com/agentage/examples): the probe and fixture extensions.
169
111
 
170
112
  ## License
171
113
 
172
- MIT - see [LICENSE](./LICENSE).
114
+ MIT. See [LICENSE](LICENSE).
@@ -52,7 +52,7 @@ export const runRelease = async (opts = {}, deps = defaultDeps) => {
52
52
  export const addRelease = (group, release) => {
53
53
  addJson(group
54
54
  .command('release')
55
- .description('Release an extension from its v* tag in CI: guard, images, one image, records, npm package')
55
+ .description('Release an extension in CI: from its v* tag, or with --changed each changed one on a merge')
56
56
  .option('--dir <path>', 'the extension package folder (default: the current folder)')
57
57
  .option('--timeout <seconds>', 'bound on each git, GitHub and npm check (default: 60; npm publish: 300)', Number)
58
58
  .option('--changed', 'each extension (root or extensions/*) whose folder changed since its last <id>@* tag; root docs/**, root *.md, .github/** and repo config (plus .release-ignore patterns) never trigger a release, package.json, the lock, src/** and Dockerfile* always do; a private repo skips npm unless the package opts in')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentage/cli",
3
- "version": "0.73.0",
3
+ "version": "0.74.0",
4
4
  "description": "The agentage CLI - connect this machine to agentage from the terminal",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -54,8 +54,8 @@
54
54
  "prepublishOnly": "npm run verify"
55
55
  },
56
56
  "dependencies": {
57
- "@agentage/apphost": "0.4.0",
58
- "@agentage/extension": "0.22.0",
57
+ "@agentage/apphost": "0.5.0",
58
+ "@agentage/extension": "0.23.0",
59
59
  "@electric-sql/pglite": "^0.5.16",
60
60
  "@tailwindcss/postcss": "^4.3.5",
61
61
  "chalk": "^6.0.0",