Installation
Quick Install (Linux / macOS)
curl -fsSL https://peria.ai/install.sh | bash
This downloads the latest release binary for your platform, verifies the SHA256 checksum, and places it in ~/.local/bin/.
After installation, initialize PRECC:
precc init
precc init registers the PreToolUse hook with Claude Code, creates the data directories, and initializes the skills database.
Install Options
SHA256 Verification
By default, the installer verifies the binary checksum against the published SHA256 sum. To skip verification (not recommended):
curl -fsSL https://peria.ai/install.sh | bash -s -- --no-verify
Custom Install Prefix
Install to a custom location:
curl -fsSL https://peria.ai/install.sh | bash -s -- --prefix /opt/precc
OpenCLI (–opencli) — WebFetch token savings
PRECC can also install OpenCLI, a third-party Node.js tool that turns ~148 websites (HackerNews, Reddit, arxiv, bilibili, zhihu, x.com, …) into structured-output commands. When installed, PRECC’s two built-in webfetch-opencli-* skills auto-rewrite raw curl/wget calls into the corresponding opencli <site> command for 5–50× smaller output.
precc init --opencli
This runs npm install -g @jackwener/opencli (requires Node.js 20+) and prints the URL for OpenCLI’s optional Chrome extension. The extension is only needed to reuse logged-in cookies on private pages; public sources work without it.
Skipping --opencli keeps PRECC fully self-contained — the auto-rewrite skill inlines a command -v opencli check that falls back to the original command when OpenCLI isn’t installed, so the skill is safe to ship default-on.
The Chrome extension requests broad permissions (debugger, <all_urls>, cookies). Operators should review them before installing it; --opencli only handles the npm package, not the extension.
Companion Tools (–extras)
PRECC ships with optional companion tools that increase token savings on real measured workloads — most importantly lean-ctx, the top-performing mode in live measurements (precc savings --all shows the per-mode breakdown for your own DB). Install them with --extras:
curl -fsSL https://peria.ai/install.sh | bash -s -- --extras
This installs:
| Tool | Purpose |
|---|---|
| RTK | Command rewriting toolkit |
| lean-ctx | Deep Bash output compression — top-performing mode in live measurements; biggest wins on verbose output (git status, find, head -100, etc.) |
| nushell | Structured shell for advanced pipelines |
| cocoindex-code | Code indexing for faster context resolution |
Windows (PowerShell)
irm https://peria.ai/install.ps1 | iex
Then initialize:
precc init
Manual Install
- Download the release binary for your platform from GitHub Releases.
- Verify the SHA256 checksum against the
.sha256file in the release. - Place the binary in a directory on your
PATH(e.g.,~/.local/bin/). - Run
precc init.
Updating
precc update
Force update to a specific version:
precc update --force --version 0.3.0
Enable automatic updates:
precc update --auto
Installing under OpenClaw / ClawHub
PRECC ships a plugin manifest at plugins/openclaw/openclaw.plugin.json (id precc-token-saver). When a public release is published, the GitHub Actions workflow clawhub-publish.yml pushes the skill bundle to the ClawHub registry, so end users can install PRECC through the ClawHub CLI rather than the curl installer:
# ClawHub CLI
clawhub install precc
# Or pin the plugin manifest (id: precc-token-saver) via OpenClaw's
# plugin marketplace UI or its CLI equivalent.
How savings surface under OpenClaw
Every PRECC reporting surface that works under Claude Code also works under OpenClaw — precc savings, precc savings --all, the localized status line (set PRECC_LANG=zh and the line renders in your language), and the local rewrite audit log all read from the same SQLCipher databases on your machine. A separate spec at docs/symposium-plan/openclaw-savings-reporting.md describes a future structured preccSavings field in every hook response plus a one-line session-end notification at a $0.05 default threshold; that piece is not yet shipped.
Verifying Installation
$ precc --version
precc 0.3.0
$ precc savings
Session savings: 0 tokens (no commands intercepted yet)
If precc is not found, ensure ~/.local/bin is on your PATH.