@getappz/agentflare-darwin-arm64 1.0.2

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.
Files changed (3) hide show
  1. package/README.md +208 -0
  2. package/bin/agentflare +0 -0
  3. package/package.json +19 -0
package/README.md ADDED
@@ -0,0 +1,208 @@
1
+ <div align="center">
2
+
3
+ # agentflare
4
+
5
+ **Optimize AI CLI agents for cost and performance. A single Rust binary, no
6
+ Node, no runtime dependencies — across Claude Code, Codex, Cursor, Windsurf,
7
+ VS Code, Cline, and Continue.**
8
+
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
10
+
11
+ </div>
12
+
13
+ ---
14
+
15
+ ## What this is
16
+
17
+ Two non-overlapping layers, plus two Claude-Code-only companions:
18
+
19
+ | Layer | What it compresses | Tool |
20
+ |---|---|---|
21
+ | **lean-ctx** | tool I/O *within* a session — reads, shell output, search, up to 99% | [yvgude/lean-ctx](https://github.com/yvgude/lean-ctx) |
22
+ | **engram** | knowledge *across* sessions — decisions, facts, preferences that survive a session ending | [Gentleman-Programming/engram](https://github.com/Gentleman-Programming/engram) |
23
+ | **Caveman** (Claude Code only) | conversation verbosity, ~65% | companion plugin |
24
+ | **Ponytail** (Claude Code only) | code-writing over-engineering | companion plugin |
25
+
26
+ lean-ctx and engram aren't substitutes for each other — one saves tokens inside a
27
+ session, the other saves the re-explaining tax across sessions.
28
+
29
+ **Why Rust, not Node:** Claude Code doesn't bundle or require Node.js — it's a
30
+ standalone compiled binary. A plugin whose hooks shell out to `node` breaks on
31
+ any machine that installed Claude Code without separately installing Node.
32
+ agentflare is a single static binary; the only runtime dependency is agentflare
33
+ itself.
34
+
35
+ **No plugin marketplace for Claude Code or Cursor** — `agentflare init --agent X`
36
+ writes the hook config directly into the target's own settings file (Claude
37
+ Code's `~/.claude/settings.json`, Cursor's `.cursor/hooks.json`). Codex is the
38
+ one exception: its hook system only activates through its plugin loader, so
39
+ that wiring ships as a small `.codex-plugin/` manifest instead.
40
+
41
+ ## Metrics
42
+
43
+ Numbers below are each project's own published, reproducible benchmarks — attributed,
44
+ not blended into a fake combined total, and not accepted on faith. Where a claim had no
45
+ supporting evidence in its own repo, it's flagged instead of repeated.
46
+
47
+ | Tool | Published claim | Methodology | Confidence |
48
+ |---|---|---|---|
49
+ | lean-ctx | 98.1% compression (`map` mode), 96.7% (`signatures`), ~99.99% cached re-read | CI-gated, reproducible via `lean-ctx benchmark report .`, measured on a 50-file repo with the GPT-4o tokenizer | High — real, reproducible, methodology named |
50
+ | Caveman | 65% avg output-token reduction (range 22–87%, 10 prompts) | Committed in `benchmarks/`/`evals/` — and its own docs flag the failure mode: ~1–1.5k input-token overhead per turn can make it net-negative on already-terse workloads (`docs/HONEST-NUMBERS.md`) | High — reproducible, unusually transparent about limits |
51
+ | Ponytail | ~54% less code (94% ceiling on best task), ~20% cheaper, ~27% faster, 100% safe | 12 real feature tasks on a FastAPI+React repo, Haiku 4.5, n=4 — self-corrected an earlier overgeneralized single-shot figure | High — reproducible, self-corrected once already |
52
+ | engram | "95.8% accuracy on LongMemEval-S — #1 globally" | **Not citing this.** No benchmark directory, results file, or harness exists anywhere in the repo, despite being listed as a shipped feature. | Unverifiable — flagged, not repeated |
53
+
54
+ ### Real usage, one live project
55
+
56
+ Not a demo — pulled live from the maintainer's own project while building this repo,
57
+ for a sense of scale. Not a controlled benchmark; one data point, your mileage varies.
58
+
59
+ ```
60
+ lean-ctx 34.2M tokens saved 92% compression $88.45 saved (lifetime; lean-ctx gain)
61
+ caveman 1.16M tokens saved (~65%) (single session; caveman-stats hook)
62
+ ponytail 23 `ponytail:` shortcut markers logged, no token figure (ponytail doesn't measure per-repo savings)
63
+ engram 2 sessions, 11 observations tracked, across 2 projects (engram stats)
64
+ ```
65
+
66
+ Check your own: `lean-ctx gain` · `/caveman-stats` (Claude Code) · `ponytail-debt` skill ·
67
+ `engram stats`. Don't trust this table blindly either — re-run those commands yourself.
68
+
69
+ ---
70
+
71
+ ## Install the CLI
72
+
73
+ **Linux/macOS** (downloads a prebuilt binary, checksum-verified; builds from
74
+ source instead if run from inside a clone):
75
+ ```bash
76
+ curl -fsSL https://raw.githubusercontent.com/getappz/agentflare/master/install.sh | sh
77
+ ```
78
+
79
+ **Homebrew:**
80
+ ```bash
81
+ brew tap getappz/agentflare
82
+ brew install agentflare
83
+ ```
84
+
85
+ **Windows, build from source** (no unsigned prebuilt binary to trip an AV
86
+ heuristic):
87
+ ```powershell
88
+ git clone https://github.com/getappz/agentflare
89
+ cd agentflare
90
+ .\install.ps1
91
+ ```
92
+
93
+ **Windows, Scoop** (prebuilt binary — unsigned, like most small Rust CLIs;
94
+ Defender/SmartScreen false-positives are possible, report an issue if hit):
95
+ ```powershell
96
+ scoop bucket add agentflare https://github.com/getappz/agentflare
97
+ scoop install agentflare
98
+ ```
99
+
100
+ **Any platform with Rust, no clone needed:**
101
+ ```bash
102
+ cargo install --git https://github.com/getappz/agentflare
103
+ ```
104
+
105
+ **Uninstall:**
106
+ ```bash
107
+ curl -fsSL https://raw.githubusercontent.com/getappz/agentflare/master/install.sh | sh -s -- --uninstall
108
+ ```
109
+
110
+ ## Set up an agent
111
+
112
+ One command per tool, run once. Running it is the consent — installs happen
113
+ immediately, no separate confirm step.
114
+
115
+ ```bash
116
+ agentflare init --agent claude-code # writes ~/.claude/settings.json hooks directly, no marketplace
117
+ agentflare init --agent cursor # writes .cursor/hooks.json directly, no marketplace
118
+ agentflare init --agent windsurf
119
+ agentflare init --agent vscode-copilot
120
+ agentflare init --agent cline
121
+ agentflare init --agent continue
122
+ ```
123
+
124
+ **Codex** is the one exception — its hook system only activates through its own
125
+ plugin loader:
126
+ ```
127
+ codex plugin marketplace add getappz/agentflare
128
+ codex plugin install agentflare
129
+ ```
130
+ then `agentflare init --agent codex` for the rules/lean-ctx/engram setup (Codex's
131
+ hook wiring itself comes from the plugin manifest, not `init`).
132
+
133
+ Each run: writes rule files (if absent), installs lean-ctx (`npm install -g
134
+ lean-ctx-bin && lean-ctx onboard`) and engram (`go install`/`brew`, never the
135
+ prebuilt Windows binary — see below) if missing, wires hooks/MCP where the host
136
+ supports it. Detection-first — already-satisfied components are skipped, nothing
137
+ gets clobbered.
138
+
139
+ **engram's install safety**: the project's own docs say prebuilt Windows binaries
140
+ get flagged as AV false positives, and explicitly recommend `go install` or
141
+ Homebrew instead. `agentflare init` only auto-installs engram through one of those
142
+ two paths; if neither is available, it prints the exact command instead of
143
+ downloading something that might trip your AV.
144
+
145
+ ## Docs-only fallback (Aider, other AGENTS.md readers)
146
+
147
+ ```bash
148
+ curl -sL https://raw.githubusercontent.com/getappz/agentflare/master/AGENTS.md > AGENTS.md
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Architecture
154
+
155
+ ```
156
+ src/
157
+ ├── paths.rs # home-dir resolution (AGENTFLARE_HOME_OVERRIDE for tests —
158
+ │ # dirs::home_dir() ignores HOME/USERPROFILE overrides on
159
+ │ # Windows, learned the hard way)
160
+ ├── state.rs # ~/.agentflare/state.json — on/off flag for the hooks
161
+ ├── rule_text.rs # shared rule copy (Exa, git, lean-ctx, engram usage)
162
+ ├── engram_install.rs # engram's safe-install logic (go install/brew only)
163
+ ├── components.rs # registry: each entry checks + fixes itself, host-aware
164
+ ├── init.rs # `agentflare init --agent X` — runs every component,
165
+ │ # wires hooks directly for claude-code/cursor
166
+ ├── hook.rs # `agentflare hook session-start|prompt-submit --agent X`
167
+ └── main.rs # clap CLI, dispatch
168
+
169
+ .codex-plugin/ # Codex only — its hooks require the plugin loader
170
+ install.sh, install.ps1 # installers (checksum-verified download / local build)
171
+ .github/workflows/ # ci.yml (build+test), release.yml (cross-compile on tag)
172
+ ```
173
+
174
+ Adding a new managed component means adding one entry to `components.rs` — neither
175
+ `init` nor `hook` hardcodes per-tool logic.
176
+
177
+ ---
178
+
179
+ ## What Gets Created
180
+
181
+ **Claude Code**: `~/.claude/rules/{exa,git,lean-ctx,engram}.md`, `~/.claude/settings.json` hooks section, `~/.config/{caveman,ponytail}/config.json`, `~/.agentflare/`.
182
+
183
+ **Codex**: project-local `AGENTS.md` (only if absent), `~/.agentflare/`.
184
+
185
+ **Cursor**: project-local `.cursor/rules/agentflare.mdc`, `.cursor/hooks.json`, `~/.cursor/mcp.json`, `~/.agentflare/`.
186
+
187
+ **Windsurf/VS Code/Cline**: project-local rules file (see table above), MCP config for lean-ctx/engram.
188
+
189
+ **Continue**: `.continue/mcpServers/{agentflare,engram}.json`.
190
+
191
+ Nothing is created if it already exists.
192
+
193
+ ---
194
+
195
+ ## Uninstall
196
+
197
+ Remove the binary (see Install section above), then remove whatever `init`
198
+ wrote for the hosts you set up — see "What Gets Created" above. Ponytail/
199
+ Caveman/engram plugins themselves stay installed (uninstall separately if
200
+ wanted).
201
+
202
+ ---
203
+
204
+ <div align="center">
205
+
206
+ MIT License
207
+
208
+ </div>
package/bin/agentflare ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@getappz/agentflare-darwin-arm64",
3
+ "version": "1.0.2",
4
+ "description": "Optimize AI CLI agents for cost and performance",
5
+ "bin": {
6
+ "agentflare": "bin/agentflare"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/getappz/agentflare"
11
+ },
12
+ "files": [
13
+ "bin",
14
+ "README.md"
15
+ ],
16
+ "license": "MIT",
17
+ "os": ["darwin"],
18
+ "cpu": ["arm64"]
19
+ }