cytostack/openwolf
OpenWolf is open-source middleware for Claude Code that adds project intelligence and token tracking through invisible hook scripts wired into Claude Code's lifecycle. It gives the AI assistant a persistent second brain — combining a file index with descriptions and token estimates (anatomy.md), a learning memory that accumulates project preferences and prevents repeated mistakes (cerebrum.md), a token ledger tracking lifetime usage and per-session history, and a searchable bug memory (buglog.json) for persistent fix documentation. The middleware claims roughly 65–80% token reduction without changing the developer's workflow — install globally, run openwolf init in a project, then keep using claude as usual. Six lifecycle hooks operate in the background, while optional features cover design QC for evaluating UI screenshots, framework migration assistance (Reframe) with a curated knowledge base, a real-time dashboard, and background task scheduling. Token tracking is estimation-based using a character-to-token ratio (accurate to within ~15%) rather than exact API counts. Built in TypeScript and licensed under AGPL-3.0, OpenWolf requires Node.js 20+ and the Claude Code CLI, with optional PM2 and Puppeteer Core for advanced features. Runs on Windows, macOS, and Linux.
git clone https://github.com/cytostack/openwolf.git
Quick Start Example
# Install globally
npm install -g openwolf
# Initialize in your project
cd your-project
openwolf init
# Use Claude Code normally — OpenWolf runs invisibly via hooks
claude