Same agent. Fewer tokens.
Fewer tokens per tool call in Codex and Claude Code: reads about β75%, greps about β27% on vercel/ai, pandas and tokio (per-call benchmark, not end to end). TS β60% Β· Python β63% Β· Rust β55% β measured on
vercel/ai,pandas, andtokio. 95% CI reported by the benchmark runner. Reproduce withbun run scripts/run-benchmark.ts --compare. (full methodology)
40 MCP tools that replace high-volume Read / Grep / Edit / Bash workflows with versions that return less without losing what matters. Claude Code gets automatic PreToolUse redirects (ASHLR_HOOK_MODE=redirect); Codex gets first-class plugin packaging, MCP, skills, and nudge-first hooks.
Requires Bun β₯ 1.3 β interactive installers can offer to install Bun; piped/non-interactive installs skip that prompt and rely on MCP bootstrap if Bun is missing. Verify with
bun --versionfirst.curl -fsSL https://bun.sh/install | bash
# macOS / Linux
curl -fsSL https://plugin.ashlr.ai/install.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/ashlrai/ashlr-plugin/main/docs/install.ps1 | iexThe npm package exposes ashlr-plugin for CLI workflows and ashlr-mcp for MCP hosts. It requires Bun. From v1.36.4, use ashlr-plugin stats, ashlr-plugin tools, and other Plugin commands in place of the former ashlr alias; ashlr remains available to Ashlr Hub. MCP server registration names and tool names are unchanged.
Landing page: plugin.ashlr.ai Β· Docs: plugin.ashlr.ai/docs Β· Core library: @ashlr/core-efficiency Β· License: MIT
Open-source and honestly benchmarked. The per-call figures are reproducible on your own code with
bun run scripts/run-benchmark.ts --compare(methodology). Every ashlr savings figure includes a 95% CI. Telemetry is off by default. Compare against closed, self-benchmarked alternatives with/ashlr-benchmark --compare.
Tested on: Ubuntu 22.04 Β· macOS 14 (Sonoma) Β· Windows Server 2022 Β· TypeScript hooks (no bash required)
- Tools act on your project β MCP tools resolve relative paths and default folders against the folder the host launched them in, not the plugin's install folder. Phantom fleet worktrees are no longer refused.
- Faster hooks β each SessionStart and PostToolUse event starts one
nodelauncher instead of one per hook (CPU per native Edit 712 β 319 ms in a Linux container), and SessionStart exits in about 0.6 s instead of 2.1 s. - Claude Code hooks detected correctly β hooks under Claude Code no longer run in Codex nudge mode.
- Works without Bun on PATH β the npm bins start under node and find or explain Bun instead of failing with
env: 'bun'. - Readable grep fallback β
ashlr__grepwithout a genome returns plainpath:line:textmatches, says when ripgrep stopped early, and is benchmarked against plainrg -n(about β27% per call). - Shorter edit replies β exact, unique
ashlr__editmatches return the header only. - New host ids β
ASHLR_MCP_HOST=gemini-cliandcursor.
See the CHANGELOG for the full list.
v1.36 highlights
- Codex-native plugin packaging β
.codex-plugin/plugin.json,.mcp.json, Codex workflow skills, Codex explorer/worker agent guidance, and portable Codex hooks ship in the same package as the Claude Code plugin. - Reliable Codex MCP launch β
ashlr-mcpstarts the router directly withASHLR_MCP_HOST=codex-cli, workspace-awarecwdbehavior, andASHLR_ALLOW_PROJECT_PATHSsupport for non-plugin launch directories. - Codex nudge-first hooks β Codex hooks now inject compact-tool guidance for Bash, apply_patch, Read/Grep/Glob, Edit/MultiEdit, Write, and high-value Ashlr MCP calls without forcing redirects by default.
- Host-neutral CLI workflows β
ashlr-plugin codex-doctor,ashlr-plugin codex-install --dry-run,ashlr-plugin codex-start,ashlr-plugin codex-resume,ashlr-plugin codex-end, andashlr-plugin genome-refreshgive Codex users the same operational surface without writing Claude config. - Four discipline skills β
/ashlr-search,/ashlr-lean-tools,/ashlr-genome-author,/ashlr-cost-refactor. Each enforces a specific anti-waste pattern; each persists in~/.ashlr/<name>.json. Toggle with/ashlr-<name> on/off. /ashlr-efficientβ output structure reshaper. Enforces answer-first (inverted pyramid), inline code for all identifiers, tables for 3+ item comparisons, and no transitional filler. Works standalone or alongside/ashlr-brief.- Two lifecycle hooks β
SubagentStoprolls up subagent savings to the session log and fires background genome consolidation;Stopfinalises session stats with an idempotency guard. (Re-orientation after context compaction is handled by theSessionStartcompact hook, the only event that can inject context.) - API-measured savings mode β when
ANTHROPIC_API_KEYis set, token counts upgrade from(est.)to(API-measured)once β₯10 calls have been verified via the Anthropic API. Fire-and-forget; SHA-256 cached; never blocks a tool call. - Benchmark transparency β
scripts/run-benchmark.tsnow reports a 95% bootstrap confidence interval alongside the headline. New flags:--compare(A/B table),--validate-tokenizer(API spot-check of the chars/4 heuristic). See benchmark methodology.
v1.33 highlights
- First-call savings projection β see your annual savings extrapolated on your very first ashlr call.
- Multi-host MCP β works in Codex, Claude Code, Cline, Claude Desktop, Cursor, Goose, and generic MCP hosts (
ASHLR_MCP_HOSTenv var). /ashlr-orchestrate-statusβ inspect past orchestration runs with per-node timings + tokens.- Orchestration retry + handoff budget β per-node retry-with-backoff; HANDOFF_PAYLOAD capped at 8KB.
- Orchestration central quota accounting β
orchestration_usagetable for Team-tier soft-throttle. - Bun β₯ 1.3 prereq surfaced + wizard restart enforcement β closes 2 fatal first-touch cliffs.
- Orchestrator overhead bench β per-node overhead and parallel speedup are measured by the orchestrator bench; no figure is published here until it is reproducible from this repo.
- Pre-existing tsc errors fixed + permanent dashboard date-drift fix via clock injection.
v1.32 highlights
/ashlr-orchestrateβ multi-agent task graphs with parallel execution, dry-run renderer, and tier-gated subprocess wiring./ashlr-orchestrate-statusβ inspect past orchestration runs with per-node telemetry.- Live genome β PR-aware + commit-aware sections via git post-commit hook and GitHub webhook delta sync.
- AI-Native discoveries β LLM synthesizes
discoverysections from your commit history automatically. - Predictive prefetch (Pro/Team) β background warm-cache on every
ashlr__readcuts repeat-hit latency. - PR + issue retrieval β
ashlr__grep --include-prs --include-issues --since-dayspulls live GitHub context. - Freshness badges in genome retrieval surface staleness so you trust the answer.
- Cross-language bench (per-call, not end to end): TS β61.3% Β· Python β63.1% Β· Rust β46.8%, about β57% averaged across tool calls. This is not a measured reduction in total session cost.
- Founder WAD-D dashboard at
/admin/wad-dβ daily-active records + segment breakdown + discovery propagation.
Works with Codex, Claude Code (default), Cline, Claude Desktop, Cursor, Goose, and generic MCP hosts. The 40 MCP tools, stats accounting, and genome retrieval are host-agnostic; savings and accounting apply when the host calls Ashlr MCP tools. Codex support is packaged through .codex-plugin/plugin.json, .mcp.json, Codex skills, and hooks/codex-hooks.json in nudge mode. Claude-only extras remain explicitly labeled: auto redirects, status line, slash commands, and OAuth bootstrap. See plugin.ashlr.ai/docs or docs/multi-host-mcp.md for setup snippets. For a fast Codex setup, see the Codex quickstart.
Run this once after install so Claude Code stops asking on every tool call:
/ashlr-allow
That adds ashlr MCP wildcards to permissions.allow in ~/.claude/settings.json. It is idempotent. Run /reload-plugins after changing permissions, or fully quit and restart Claude Code if reload is unavailable.
# 1. Install
curl -fsSL https://plugin.ashlr.ai/install.sh | bash
# Inside Claude Code:
/plugin marketplace add ashlrai/ashlr-plugin
/plugin install ashlr@ashlr-marketplace
# 2. Use β read a large file (raw would be ~8,400 tokens)
ashlr__read { "path": "src/server.ts" }
# Returns snipCompact view: head + tail, elided middle β ~1,700 tokens
# 3. Check savings
/ashlr-savings
Session savings Β· ashlr-plugin v1.36.0
ββββββββββββββββββββββββββββββββββββββββ
ashlr__read 6 calls β42,180 tok $0.13
ashlr__grep 3 calls β11,040 tok $0.03
ashlr__edit 2 calls β3,200 tok $0.01
βββββββββββββββββββββββββββββββββββββββββββββ
Session total β56,420 tok $0.17
Lifetime total β284,900 tok $0.86
7-day sparkline βββββ
ββ
Core efficiency tools (replace built-ins with lower-token equivalents):
| MCP tool | Description |
|---|---|
ashlr__read |
snipCompact + LLM summary on files > 16 KB (Anthropic Haiku 4.5 default, ONNX/local fallback). Mean β82.1% on the v1.22 bench. Line numbers preserved on code files. |
ashlr__grep |
Genome-aware RAG when .ashlrcode/genome/ or cloud genome exists; ripgrep fallback with LLM summary. |
ashlr__edit |
In-place search/replace β returns diff summary only, not the full file. Levenshtein candidates on miss. |
ashlr__edit_structural |
AST-aware rename (Unicode identifiers: cafΓ©, Ο, CJK) + cross-file rename with anchorFile + maxFiles + shadowing guard + dryRun + extract-function with return-value detection (0 / 1 / N outputs). .ts/.tsx/.js/.jsx. |
ashlr__multi_edit |
Batch multiple search/replace edits in one call. |
ashlr__savings |
Live token-savings dashboard: session + lifetime + per-tool breakdown. |
Shell, data, and web tools:
| MCP tool | Description |
|---|---|
ashlr__bash |
Shell with auto-compression + pluggable summarizer registry (servers/_bash-summarizers-registry.ts) covering git log/git diff/git show, ls, ps, npm ls, unified test-runner output, tsc, and npm/bun/yarn/pnpm installs. Long-running commands survive timeouts via process-group SIGKILL. |
ashlr__bash_start / _tail / _stop / _list |
Long-running background command control plane. |
ashlr__sql |
SQLite + Postgres one-shot. explain and schema modes. LLM summary on 100+ row results. |
ashlr__http |
HTTP fetch with readable-extract (HTML), array-elide (JSON), and private-host safety. |
ashlr__webfetch |
Fetch + extract web pages with token budget. LLM summarization kicks in at 4 KB (web content is denser than code), 100 KB hard cap. |
ashlr__logs |
Tail with level filter + dedupe + LLM summary. |
ashlr__diff |
Adaptive git diff (stat/summary/full) with LLM summary on big diffs. |
ashlr__diff_semantic |
Semantic diff with meaning-aware change grouping. |
ashlr__test |
Structured test-runner output parser β bun/vitest/jest/pytest/go test. Compresses runner noise into one failure block per failure. |
Codebase navigation:
| MCP tool | Description |
|---|---|
ashlr__tree |
gitignore-aware directory tree with per-dir truncation + size/LOC modes. |
ashlr__glob |
gitignore-aware file glob with size/LOC metadata. |
ashlr__ls |
Directory listing with size metadata. |
ashlr__orient |
Codebase orientation: entry points, key files, dependency graph. |
Genome + GitHub:
| MCP tool | Description |
|---|---|
ashlr__genome_propose / _consolidate / _status |
Active genome scribe loop β keeps .ashlrcode/genome/ current as you code. |
ashlr__issue / ashlr__pr |
GitHub issue and PR read ops. |
ashlr__issue_create / ashlr__issue_close |
GitHub issue write ops. Self-approval guard + ASHLR_REQUIRE_GH_CONFIRM=1 opt-in confirmation. |
ashlr__pr_comment / ashlr__pr_approve |
GitHub PR write ops. pr:"current" resolves via gh pr view. No destructive ops (no merge/close/delete). |
ashlr__ask |
Ask a question, get a structured answer with citations. |
See docs/architecture.md for the full tool registry and router layout.
ashlr Pro connects to a hosted backend at https://api.ashlr.ai, unlocking
features that require server-side state:
| Feature | What it does |
|---|---|
| Cross-machine stats | Aggregate token savings across all your machines. GET /v1/stats/aggregate returns machine_count + combined lifetime totals. |
| Hosted summarizer | POST https://api.ashlr.ai/llm/summarize β cloud inference via xAI Grok 4.3. Falls back to local summarization or snipCompact when unavailable. |
| Team genome | Encrypted genome sync across teammates. DEKs wrapped with X25519 β only key-holders can decrypt (/ashlr-genome-team-init). |
Privacy: telemetry is off by default and explicit opt-in only (ASHLR_TELEMETRY=on). The sessionId
is an opaque 16-char hex value per session β never your user identity β and
is stored server-side as a SHA-256 hash. File paths and content are never
sent. See plugin.ashlr.ai/docs for the full privacy
contract (internal: docs/telemetry.md).
Production URL: https://api.ashlr.ai
The /ashlr-doctor command includes a cloud check that pings
/healthz with a 3-second timeout and reports latency. Set
ASHLR_API_URL_DISABLE=1 to suppress it in offline environments.
The Claude Code status bar shows session savings, a 7-day sparkline, and optional context pressure. The examples below are representative; counters and optional badges depend on your session and settings.
βββββββββββββββββββββββββββββββββββββββββββββββ
β ashlr β0 tok $0.00 βββββββ idle β
βββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββ
β ashlr β12,480 tok $0.04 βββββ
ββ ββ β
βββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββ
β ashlr β48,200 tok $0.14 βββ
βββ βββ !! β
βββββββββββββββββββββββββββββββββββββββββββββββ
!! appears when context pressure is high. Install:
bun run ~/.claude/plugins/cache/ashlr-marketplace/ashlr/<version>/scripts/install-status-line.ts| Example output | Meaning |
|---|---|
ashlr Β· β¦ Β· βββββββ Β· session +0 β$0.00 |
No savings recorded in this session yet. |
ashlr Β· β Β· βββββ
ββ Β· session β+12.5K β$0.01 Β· lifetime +42K (est.) |
Session savings and estimated lifetime savings; β marks recent activity. |
ashlr Β· ctx: 92% Β· session +48.2K β$0.04 |
Context usage was available from Claude Code input. ctx: is omitted when no usable usage/limit pair is provided. |
The optional statusLine settings live under the ashlr key in ~/.claude/settings.json. Omitted booleans use the defaults shown here.
| Field | Default | Effect |
|---|---|---|
statusLine |
true |
Master switch; false hides the status line. |
statusLineSession |
true |
Show the current session's saved-token count and cost estimate. |
statusLineLifetime |
true |
Show lifetime saved-token count when it is greater than zero. |
statusLineTips |
true |
Add a rotating tip, or an eligible upgrade nudge, when it fits. |
statusLineSparkline |
true |
Show the 7-day activity sparkline and heartbeat. |
statusLineUpgradeNudge |
true |
Allow the free-tier 50K-session-savings upgrade nudge; set false to silence it. |
For example, to hide tips and lifetime totals while keeping session savings:
{
"ashlr": {
"statusLineTips": false,
"statusLineLifetime": false
}
}The status line is Claude Code-specific. Codex users can inspect savings with ashlr-plugin stats --json or the ashlr__savings MCP tool.
Prerequisites: Bun β₯ 1.3 and at least one supported host: Codex CLI, Claude Code, Cursor, Goose, or another MCP-capable client. Interactive installers can offer to install Bun; piped/non-interactive installs skip that prompt and rely on MCP bootstrap if Bun is missing. Verify with bun --version first, or install: curl -fsSL https://bun.sh/install | bash. No account, no API key.
# Claude Code one-liner
curl -fsSL https://plugin.ashlr.ai/install.sh | bashFor Codex:
git clone https://github.com/ashlrai/ashlr-plugin
cd ashlr-plugin && bun install
codex plugin marketplace add ashlrai/ashlr-plugin
codex plugin add ashlr@ashlr-marketplace
bun run scripts/cli.ts codex-doctor --jsonFor Claude Code:
/plugin marketplace add ashlrai/ashlr-plugin
/plugin install ashlr@ashlr-marketplace
/reload-plugins
Verify with /ashlr-status. If /reload-plugins is unavailable or /ashlr-status does not see the plugin, fully quit and restart Claude Code.
Manual install:
git clone https://github.com/ashlrai/ashlr-plugin \
~/.claude/plugins/cache/ashlr-marketplace/ashlr
cd ~/.claude/plugins/cache/ashlr-marketplace/ashlr && bun install
# Then inside Claude Code:
# /plugin marketplace add ashlrai/ashlr-plugin
# /plugin install ashlr@ashlr-marketplace
# /reload-pluginsThe plugin's own provider calls (the summarizer and token-count calls to Anthropic, the genome reachability probes for Anthropic and OpenAI, and the Ollama checks in /ashlr-ollama-setup and genome-init) read the usual environment variables and keep their old defaults when none is set:
| Variable | Default | Form |
|---|---|---|
ANTHROPIC_BASE_URL |
https://api.anthropic.com |
root, without /v1 |
OPENAI_BASE_URL |
https://api.openai.com/v1 |
includes /v1 |
OLLAMA_HOST |
http://localhost:11434 |
host, host:port, :port or a full URL |
Trailing slashes are trimmed. Pointing these at a gateway such as a LiteLLM proxy or a Phantom proxy is therefore possible, because the plugin just sends its requests to whatever URL you set. Only the URL handling is covered by tests here; the plugin has not been tested against any specific gateway, and what a gateway does with your keys and requests is documented by that gateway. Not covered: the Ollama probe in the session greeting and the optional ASHLR_EMBED_URL embedding endpoint, which keep their own settings.
/ashlr-doctor also lists whether the optional Phantom CLI is installed and which version. It runs only phantom --version and never reads or reveals secret values. To run tools with Phantom placeholder keys and base URLs, start them with phantom exec -- <cmd>.
Running the doctor and benchmark scripts under Phantom is supported only through phantom exec, for example phantom exec -- bun run scripts/doctor.ts or phantom exec -- bun run scripts/run-benchmark.ts --validate-tokenizer. Inside such a session the doctor's phantom exec line reports the proxy port, which provider keys hold phm_ placeholders and which base URLs point at the local proxy (with the session token redacted). It warns when a key is a phm_ placeholder outside a session, when a placeholder's base URL does not point at the proxy, or when a key is a phm: reference. The plugin never resolves phm: references, never runs phantom reveal and never prints key values; run-benchmark --validate-tokenizer skips the API sample when the key would not work from that process. Detection uses variable names, the phm prefixes and the base URL host and port only; it has not been tested against a live Phantom session here.
| Command | Description |
|---|---|
/ashlr-help |
List every ashlr slash command grouped by purpose (Onboarding / Token meter / Genome / Upgrade / Diagnostics) |
/ashlr-allow |
Auto-approve every ashlr MCP tool β covers canonical mcp__plugin_ashlr_ashlr__ashlr__* names, run once after install |
/ashlr-status |
Plugin health + MCP server reachability + genome detection |
/ashlr-savings |
Live dashboard: session + lifetime + per-tool + 7-day sparkline |
/ashlr-doctor |
11-check diagnostic β deps, MCP reachability, hooks, settings |
/ashlr-tour |
60-second guided walkthrough on your current project |
/ashlr-benchmark |
Token-savings benchmark against your current project |
/ashlr-genome-init |
Initialize .ashlrcode/genome/ for the genome-backed grep path |
/ashlr-ollama-setup |
Diagnose Ollama for --summarize; pull recommended 3B model |
/ashlr-settings |
View or change plugin toggles |
/ashlr-update |
git pull + bun install + report what changed |
The free tier is the product β 40 MCP tools, 34 slash commands, the full genome scribe loop, and every benchmark included. No account required.
Pro ($12/mo, 7-day trial) adds cloud infrastructure for developers who need it: cross-machine stats sync, hosted embedding retrieval, cloud LLM summarizer (no local Ollama required), and a live auto-updating savings badge. Team ($24/user/mo, min 3) adds shared encrypted team genome, org savings dashboard, policy packs, and SSO.
Run /ashlr-upgrade to upgrade, or see plugin.ashlr.ai/docs/pro/pricing for the full comparison.
See plugin.ashlr.ai/docs/contributing/architecture for how the tools, hooks, and genome scribe loop fit together. Internal notes: docs/architecture.md.
See CHANGELOG.md for version history.
The Ashlr plugin is one of the open-source tools from Ashlr, a forward-deployed engineering company. Its siblings: Lexicon, Locus, Phantom Secrets, Ashlr Stack, Ashlr Markdown.
Issues and PRs are welcome. Look for good first issue to get started, and read CONTRIBUTING.md. Report security problems privately per SECURITY.md.
MIT β LICENSE.