caveman
AI Coding ToolsA plugin that makes AI coding agents answer in ultraβconcise "caveman" language, reducing output token usage by up toβ―65% while preserving technical accuracy.
Features
- Compresses AI responses into short "caveman" phrasing (ββ―65% fewer tokens)
- Works across 30+ agents (Claude Code, Codex, Gemini, Cursor, etc.)
- Provides adjustable compression levels (lite, full, ultra, wenyan)
- Offers commands for commit messages, PR reviews, and tokenβusage stats
- Preserves byteβforβbyte code/command fidelity β no loss of technical detail
Recent releases
View all 16 releases βFixed install script errors when using curl|bash with set -u and npx flag handling.
Full changelog
Hotfix for v1.8.0 β curl|bash one-liner
The headline install command in v1.8.0 was broken at first contact:
$ curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.sh | bash -s -- --only openclaw
bash: line 39: BASH_SOURCE[0]: unbound variable
error: unknown flag: --
Two regressions β neither caught by CI because both are stdin-pipe-only.
What broke
set -u+${BASH_SOURCE[0]}is fatal under curl|bash. When bash reads from stdin,BASH_SOURCEis unset; the strict-mode shell trapped on the first reference.--separator survivednpx.install.shandinstall.ps1passednpx -y "github:..." -- "$@"and modern npx forwards the literal--to the package, whichparseArgsrejected asunknown flag: --.
What this release fixes
install.shdefaultsBASH_SOURCE[0]to empty so the curl-pipe path falls through cleanly underset -u.install.sh+install.ps1no longer pass--between npx and the package β npm 7+ npx forwards trailing args correctly without it.bin/install.jsparseArgsnow accepts a bare--as a no-op (POSIX end-of-options marker). Future shim drift can't re-break this.- New regression test asserts
--is accepted.
Upgrade
curl -fsSL https://raw.githubusercontent.com/JuliusBrussee/caveman/main/install.sh | bash -s -- --only openclaw
If you tried v1.8.0 and got the error above, just re-run this command. No state was written on the failed install.
What's unchanged from v1.8.0
Everything else β OpenClaw, opencode, the installer fixes, the test bump (now 51 tests). See v1.8.0 release notes for the full feature list.
- v1.8.0's `curl|bash` one-liner is broken (BASH_SOURCE unbound + stray `--`); requires upgrade to v1.8.1
Full changelog
β οΈ v1.8.0's curl|bash one-liner was broken (BASH_SOURCE unbound + stray
--to parseArgs). Use v1.8.1 instead β same release contents plus the hotfix.
Brain still big. Two more mouths now small.
This release teaches caveman to two new agents: OpenClaw (the lobster) and opencode (the TUI). Both now grunt fluent caveman from message one β no /caveman per session, no setup nag.
Plus a stack of installer fixes from a top-to-bottom review of bin/install.js.
What's new
π¦ OpenClaw β first-class always-on target
npx -y github:JuliusBrussee/caveman -- --only openclaw and the lobster talks like a caveman every turn.
Two tiny writes do the work:
- Skill drop at
~/.openclaw/workspace/skills/caveman/SKILL.mdβ spec-correct frontmatter (version,always: true), discoverable byopenclaw skills list. - SOUL.md nudge β marker-fenced bootstrap block at
~/.openclaw/workspace/SOUL.md, auto-injected each turn under "Project Context". Stays well under OpenClaw's 12K-per-file cap.
Idempotent on both writes. Uninstall strips the skill folder + the marker block, leaves your other workspace content alone. Custom workspace via OPENCLAW_WORKSPACE.
See README's Lobster, Meet Rock section for the longer pitch.
π€ opencode β native plugin replaces npx-skills fallback
opencode goes from "manual /caveman per session" to always-on. The installer drops:
- A real opencode plugin (
~/.config/opencode/plugins/caveman/) usingsession.createdandtui.prompt.appendlifecycle hooks - Six slash-command prompt templates (
/caveman,/caveman-{commit,review,compress,stats,help}) - Three cavecrew subagents
- Seven skill folders (caveman, caveman-commit/review/help/stats/compress, cavecrew)
- A Tier-3 always-on ruleset in
AGENTS.md, fenced with<!-- caveman-begin -->/<!-- caveman-end -->markers (clean uninstall later)
opencode.json gets patched with the plugin entry plus the caveman-shrink MCP server (when --with-mcp-shrink is on, which is the default).
opencode reaches Tier-1 minus the statusline (opencode's TUI exposes no plugin-writable badge).
π οΈ Installer rewrite + correctness fixes
The unified bin/install.js got reviewed end-to-end. What changed in this release:
Bug fixes (high-severity)
downloadToPromise was unawaited on the https fallback path β silent partial install ifcurlwas missing. Now properly awaited.--only <typo>used to exit0with no work done. Now validates against the provider matrix and exits2witherror: unknown agent: <id>..bakfiles were silently overwritten on every reinstall, destroying recovery. Now preserved on first install only.- opencode plugin payload (
plugin.js,package.json,caveman-config.cjs) used to be rewritten on every reinstall, wiping user edits. Now honors the same!--forceskip the rest of the payload uses. --config-dirhelp text now discloses scope honestly: it does not sandboxclaude plugin install,gemini extensions install, opencode (XDG_CONFIG_HOME), or openclaw (OPENCLAW_WORKSPACE).
Idempotency / hygiene
- Uninstall now probes
claude plugin list/gemini extensions listbefore firing the uninstaller β no more "Plugin not installed" stderr noise on cold uninstalls. - Uninstall now also runs
claude mcp remove caveman-shrink(when the subcommand exists). - opencode AGENTS.md is now fenced with
<!-- caveman-begin -->/<!-- caveman-end -->. Uninstall strips just the fenced block, preserving any user content above and below it. --config-dirvalue is now~-expanded.removeCavemanHooksno longer crashes on malformed pre-existingsettings.hooks(e.g. when a user hand-edited and broke things).
π§Ή Repo layout consolidated
hooks/, rules/, tools/, mcp-servers/ all moved under src/. Sources of truth are at the top of the tree; distribution mirrors live below. See CLAUDE.md for the new map.
Tests
50/50 passing (npm test). Up from 43 in v1.7.0 β seven new tests cover:
--onlytypo validation--config-dir ~expansion--helpdiscloses--config-dirscoperemoveCavemanHooksmalformed-input safety- AGENTS.md fence assertion
- opencode plugin.js hand-edit survives reinstall (without
--force) - AGENTS.md fenced uninstall preserves user prefix and suffix
Verify after upgrade
node bin/install.js --list # 34 providers; OpenClaw + opencode visible
node bin/install.js --help # --config-dir scope is now spelled out
For the lobster: npx -y github:JuliusBrussee/caveman -- --only openclaw.
For opencode: npx -y github:JuliusBrussee/caveman -- --only opencode (needs a local clone or npx-extracted repo for the native plugin payload).
Upgrade
Existing users:
npx -y github:JuliusBrussee/caveman
Auto-detects everything you already had + picks up OpenClaw and opencode if present. Safe to re-run.
Behavior changes worth knowing
- opencode plugin payload no longer overwrites on reinstall. If you've edited
~/.config/opencode/plugins/caveman/plugin.jsand want the new version, pass--force. Without--force, your edits stay. - opencode
AGENTS.mdfrom v1.7.x and earlier was un-fenced. Reinstall won't replace a legacy block by default; pass--forceto rewrite with the fenced version. Uninstall still removes legacy blocks correctly.
Caveman ecosystem
- caveman (you here) β output compression
- cavemem β cross-agent memory
- cavekit β spec-driven build loop
One rock. Two rock. Three rock. That it.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.