@use-aistack/cli 0.21.0 → 0.22.1

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
@@ -1,6 +1,6 @@
1
1
  # @use-aistack/cli
2
2
 
3
- Measure and share your AI stack. The CLI scans local history from Claude Code, Codex, Cursor, Grok Build, opencode and Pi, shows you exactly what would go up, and publishes only after you approve in your terminal.
3
+ Measure and share your AI stack. The CLI scans local history from Claude Code, Codex, Cursor, Grok Build, opencode, Pi and Antigravity, shows you exactly what would go up, and publishes only after you approve in your terminal.
4
4
 
5
5
  Run on-demand with `npx` - no install required:
6
6
 
@@ -29,9 +29,9 @@ After a manual sync, the CLI offers auto-sync with three choices: Enable, Maybe
29
29
 
30
30
  #### Multiple Claude Code accounts
31
31
 
32
- Sync combines the local histories of your Claude Code profiles into one Claude Code reading. It discovers `~/.claude*` folders, `claude*` folders under `XDG_CONFIG_HOME` (default `~/.config`), nested `profiles/` and `accounts/` folders, and Claude Swap session profiles under `~/.claude-swap-backup` or `$XDG_DATA_HOME/claude-swap` (default `~/.local/share/claude-swap`). A profile contributes only its `projects/` transcripts. Discovery does not open credentials, and the published aggregates do not include account names.
32
+ Sync combines the local histories of your Claude Code profiles into one Claude Code reading. It discovers `~/.claude*` folders, `claude*` folders under `XDG_CONFIG_HOME` (default `~/.config`), nested `profiles/` and `accounts/` folders, Claude Swap session profiles under `~/.claude-swap-backup` or `$XDG_DATA_HOME/claude-swap` (default `~/.local/share/claude-swap`), cc-switch accounts under `~/.cc-switch/claude-accounts/*/config`, and CCS accounts. CCS keeps each account in `instances/<name>` and shared transcripts in `shared/context-groups/<group>` inside its own folder: `$CCS_DIR`, else `$CCS_HOME/.ccs`, else `~/.ccs`. A profile contributes only its `projects/` transcripts. Discovery does not open credentials, and the published aggregates do not include account names.
33
33
 
34
- `CLAUDE_CONFIG_DIR` can add custom locations as a comma-separated list. The default and discovered profiles still count when this variable is set, so running sync from an account-specific shell keeps the other accounts included. Linked transcript roots and copied records with the same Claude record UUID are counted once. A profile discovery error marks the reading as partial so previously published evidence is retained.
34
+ `CLAUDE_CONFIG_DIR` can add custom locations as a comma-separated list. The default and discovered profiles still count when this variable is set, so running sync from an account-specific shell keeps the other accounts included. A folder from `CLAUDE_CONFIG_DIR`, `CCS_DIR` or `CCS_HOME` that the names above do not reach, such as a shell alias that sets `CLAUDE_CONFIG_DIR=~/work/claude`, is remembered in `~/.config/aistack/harness-homes.json` the first time a sync sees it. Later syncs and auto-sync hooks from any shell read it too. The file stays on this machine. Linked transcript roots and copied records with the same Claude record UUID are counted once. A profile discovery error marks the reading as partial so previously published evidence is retained.
35
35
 
36
36
  #### Multiple accounts in other harnesses
37
37
 
@@ -42,6 +42,8 @@ The other harnesses keep one account per data folder, and sync reads every folde
42
42
  * **pi**: `~/.pi/agent/sessions`, `$PI_CODING_AGENT_DIR/sessions`, and `$PI_CODING_AGENT_SESSION_DIR`. Entries copied between folders count once.
43
43
  * **opencode**: `~/.local/share/opencode`, `$XDG_DATA_HOME/opencode`, and `$OPENCODE_DB`. A relative `OPENCODE_DB` resolves under the data folder, as opencode does. A message stored in two databases counts once.
44
44
 
45
+ * **Antigravity**: every `antigravity*` folder under `~/.gemini`, such as `antigravity-cli` for the `agy` CLI and `antigravity` for the editor. `$ANTIGRAVITY_GEMINI_DIR` adds another Gemini folder and `$ANTIGRAVITY_APP_DATA_DIR` another folder name. Antigravity keeps every signed-in account in the same folder. A conversation copied into a second folder counts once.
46
+
45
47
  The environment variables add a folder and never hide the default one. Auto-sync runs inside one harness session, where the variable may point at a single account, and it still reads the other accounts. A folder outside these names, such as `CODEX_HOME=~/work/codex`, is remembered in `~/.config/aistack/harness-homes.json` the first time a sync runs with the variable set. Later syncs from any shell read it too. The file stays on this machine.
46
48
 
47
49
  #### Multiple Cursor accounts
@@ -61,6 +63,12 @@ npx @use-aistack/cli@latest cursor-folders list
61
63
  npx @use-aistack/cli@latest cursor-folders remove ~/cursor-work
62
64
  ```
63
65
 
66
+ #### What Antigravity sync reads
67
+
68
+ Antigravity stores each conversation as its own SQLite file, `conversations/<id>.db`, with protobuf records inside. Sync reads the metadata of each step: when it was created, the model, the token counts (input, output, cache read, cache write and thinking), the tool name, the workspace folder, and the parent conversation of a subagent. It never reads step contents, which hold your prompts, tool output and file contents. A `run_command` call's command line is read on this machine to classify the phase and is never sent. Checkpoint steps count as compactions.
69
+
70
+ Models that Antigravity calls through Google's endpoints are priced under the `google:` provider. A Gemini model gets Google's rate. A Claude or OpenAI model that Google Vertex AI serves stays unpriced until the price table holds a `google` rate for it, as with any gateway. Older Antigravity editor builds wrote encrypted `<id>.pb` files instead. Sync cannot read those, so a reading that contains one written inside the window is marked partial.
71
+
64
72
  The list is stored in `~/.config/aistack/harness-homes.json`. A folder found through `CURSOR_DATA_PATH` or a running instance is saved there too, so auto-sync keeps reading it after that shell or instance closes. A folder that keeps coming back after you remove it is still set in `CURSOR_DATA_PATH` or still running. To turn off process detection, set `AISTACK_CURSOR_PROC_DIR` to an empty value.
65
73
 
66
74
  Each folder keeps its own account lookup and cache. A chat that appears in two folders, for example after you copied a folder, counts once, from the copy with the most messages. A folder that can't be read marks the Cursor reading as partial, so previously published evidence is retained. Folder paths stay on this machine.
@@ -90,7 +98,7 @@ A partial Claude Code scan defers workspace aliases for legacy folders that lack
90
98
 
91
99
  ### `npx @use-aistack/cli@latest sync --auto on` / `off` / `status`
92
100
 
93
- Optional: keep your stack fresh without manual syncs. `on` asks your stack for permission, then writes hooks for the harnesses you actually use. The `SessionStart` paths, shown for the default folders, are: `~/.claude/settings.json` for Claude Code, `~/.codex/hooks.json` for Codex, and `$GROK_HOME/hooks/aistack.json` (default `~/.grok/hooks/aistack.json`) for Grok Build. Cursor uses a user-level `stop` hook in `~/.cursor/hooks.json` and reloads that configuration automatically. Its trigger runs when the agent finishes a turn. The other hooks run when a session starts. All triggers share one silent sync throttle, at most once every 6 hours. Existing user hooks are preserved. Grok Build needs a new session or hook reload after installation. `off` disables local publication first, removes the owned hooks, then takes the remote permission back. If removal fails, the disabled local gate still prevents publication and the next interactive sync can retry reconciliation.
101
+ Optional: keep your stack fresh without manual syncs. `on` asks your stack for permission, then writes hooks for the harnesses you actually use. The `SessionStart` paths, shown for the default folders, are: `~/.claude/settings.json` for Claude Code, `~/.codex/hooks.json` for Codex, `$GROK_HOME/hooks/aistack.json` (default `~/.grok/hooks/aistack.json`) for Grok Build, and the `aistack` entry in `~/.gemini/config/hooks.json` for Antigravity. Antigravity keeps one hooks file for every account, and other tools' entries in it stay as they are. Cursor uses a user-level `stop` hook in `~/.cursor/hooks.json` and reloads that configuration automatically. Its trigger runs when the agent finishes a turn. The other hooks run when a session starts. All triggers share one silent sync throttle, at most once every 6 hours. Existing user hooks are preserved. Grok Build needs a new session or hook reload after installation. `off` disables local publication first, removes the owned hooks, then takes the remote permission back. If removal fails, the disabled local gate still prevents publication and the next interactive sync can retry reconciliation.
94
102
 
95
103
  ```sh
96
104
  npx @use-aistack/cli@latest sync --auto on # enable, default every 6h
@@ -99,7 +107,7 @@ npx @use-aistack/cli@latest sync --auto off # revoke
99
107
  npx @use-aistack/cli@latest sync --auto status # each folder's hook
100
108
  ```
101
109
 
102
- **Every account gets its own hook.** If you run several accounts of one harness, each account keeps its own folder, and `on` writes the hook into every one of them. A session in any account then triggers the sync. The folders are the same ones a sync reads: every Claude Code profile (`~/.claude*`, `CLAUDE_CONFIG_DIR`, and profiles folders), every Codex home (`~/.codex*` and `CODEX_HOME`), and every Grok Build home (`~/.grok*` and `GROK_HOME`). The interactive sync adds the hook to an account folder that appears later. `off` removes the hook from every folder this machine wrote it into, including a folder that only an environment variable in another shell names. The CLI records those folders in `~/.config/aistack/settings.json`, which stays on this machine.
110
+ **Every account gets its own hook.** If you run several accounts of one harness, each account keeps its own folder, and `on` writes the hook into every one of them. A session in any account then triggers the sync. The folders are the same ones a sync reads: every Claude Code profile (`~/.claude*`, `CLAUDE_CONFIG_DIR`, remembered folders, profiles folders, and CCS and cc-switch accounts), every Codex home (`~/.codex*` and `CODEX_HOME`), and every Grok Build home (`~/.grok*` and `GROK_HOME`). The interactive sync adds the hook to an account folder that appears later. `off` removes the hook from every folder this machine wrote it into, including a folder that only an environment variable in another shell names. The CLI records those folders in `~/.config/aistack/settings.json`, which stays on this machine.
103
111
 
104
112
  The hook text is identical in every folder and across CLI versions. Codex pins each hook by its file and its exact text, so **every newly hooked Codex home needs a one-time approval**: open Codex with that account and run `/hooks`. The CLI names each home that still needs it when it writes the hook, and the interactive sync repeats the reminder until Codex trusts it.
105
113