{"_id":"@89omer/claude-x","_rev":"7-cfdb765382bf11f64d312cffd57be82e","name":"@89omer/claude-x","dist-tags":{"latest":"2.4.0"},"versions":{"2.0.0":{"name":"@89omer/claude-x","version":"2.0.0","keywords":["claude","claude-code","anthropic","ai","cli","developer-tools","productivity","roles","cost-tracking"],"author":"","license":"MIT","_id":"@89omer/claude-x@2.0.0","maintainers":[{"name":"89omer","email":"mohammad.omer.raza@gmail.com"}],"homepage":"https://github.com/89Omer/claudex#readme","bugs":{"url":"https://github.com/89Omer/claudex/issues"},"bin":{"claudex":"src/index.js","claude-x":"src/index.js"},"dist":{"shasum":"cc15bb70e683e084cf58eb3f0db640d660300601","tarball":"https://registry.npmjs.org/@89omer/claude-x/-/claude-x-2.0.0.tgz","fileCount":15,"integrity":"sha512-bbJJx6r8AqHunwdJD3WK5kSGlcM73t+sA0w4cQ5DkTWUG4ta7+PrG7zeybjbGNMRo1SreDsVoIAOG7FnwxAFxA==","signatures":[{"sig":"MEUCIQC0ifrwSR/tA8/Stm2WKM1GL9ESJsDqeMYTFWu5OP3jvQIgOacdIpu6BbJ/lvLZ5hiTsdBWWZ6M5PtylUh0yRhsrd0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68527},"type":"module","engines":{"node":">=18"},"gitHead":"fe5ff44f6ea99d2b8bc775daed20394ecf6e5a41","scripts":{"start":"node src/index.js"},"_npmUser":{"name":"89omer","email":"mohammad.omer.raza@gmail.com"},"repository":{"url":"git+https://github.com/89Omer/claudex.git","type":"git"},"_npmVersion":"10.5.0","description":"A supercharged Claude Code CLI wrapper with roles, model selection, cost tracking, and session history","directories":{},"_nodeVersion":"20.12.1","dependencies":{"conf":"^12.0.0","chalk":"^5.3.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/claude-x_2.0.0_1773784584545_0.741301665366914","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@89omer/claude-x","version":"2.0.3","keywords":["claude","claude-code","anthropic","ai","cli","developer-tools","productivity","roles","cost-tracking"],"author":"","license":"MIT","_id":"@89omer/claude-x@2.0.3","maintainers":[{"name":"89omer","email":"mohammad.omer.raza@gmail.com"}],"homepage":"https://github.com/89Omer/claudex#readme","bugs":{"url":"https://github.com/89Omer/claudex/issues"},"bin":{"claudex":"src/index.js","claude-x":"src/index.js"},"dist":{"shasum":"68866acfdb6f8e3fa5e5b2eb8e961c63449bc253","tarball":"https://registry.npmjs.org/@89omer/claude-x/-/claude-x-2.0.3.tgz","fileCount":19,"integrity":"sha512-NMAGW1ljySns8ukz99WySxunw7Oq367Mtm7nHQu4t0ZYW1cdRWNfUPkqdeM1/bLswwev9WgDAcG3A0Af+IJnDg==","signatures":[{"sig":"MEUCIQD4Uq69SJQsttM1vXcrKFtpizwruuBkCcnuIUWUhIUHmAIgBSMlabqrhtWxxSBi/rYy9faFe1d8kIXexToMennzrSE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":118037},"type":"module","engines":{"node":">=18"},"gitHead":"6ae56b64ac6f8f081ec292bdf9b12022a300744d","scripts":{"start":"node src/index.js"},"_npmUser":{"name":"89omer","email":"mohammad.omer.raza@gmail.com"},"repository":{"url":"git+https://github.com/89Omer/claudex.git","type":"git"},"_npmVersion":"10.5.0","description":"A supercharged Claude Code CLI wrapper with roles, model selection, cost tracking, and session history","directories":{},"_nodeVersion":"20.12.1","dependencies":{"conf":"^12.0.0","chalk":"^5.3.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/claude-x_2.0.3_1774440060418_0.4419114814390557","host":"s3://npm-registry-packages-npm-production"}},"2.0.4":{"name":"@89omer/claude-x","version":"2.0.4","keywords":["claude","claude-code","anthropic","ai","cli","developer-tools","productivity","roles","cost-tracking"],"author":"","license":"MIT","_id":"@89omer/claude-x@2.0.4","maintainers":[{"name":"89omer","email":"mohammad.omer.raza@gmail.com"}],"homepage":"https://github.com/89Omer/claudex#readme","bugs":{"url":"https://github.com/89Omer/claudex/issues"},"bin":{"claudex":"src/index.js","claude-x":"src/index.js"},"dist":{"shasum":"6db7a8610fb09bbcb127ef3c7bbca562f1af021a","tarball":"https://registry.npmjs.org/@89omer/claude-x/-/claude-x-2.0.4.tgz","fileCount":18,"integrity":"sha512-2S61D6bu9wX8keaavQoXEL2Gn8p220ASdrI96mOqfyDPQ1+Jg/3kCRgUZVaCkY2esIoeacZmPq+lC6525cH2nw==","signatures":[{"sig":"MEYCIQCYvlLLVmx8eU8BIo7Nm+JTZBXvUPE53RJUEc2LbNR4SgIhAI+RWPgTOv7EMSuwXrnUJziHN2Z0jRR85jWeqSb8cutE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":117541},"type":"module","engines":{"node":">=18"},"gitHead":"a3c63ed9a81072e7b0868aa345998c7bde2513ea","scripts":{"start":"node src/index.js"},"_npmUser":{"name":"89omer","email":"mohammad.omer.raza@gmail.com"},"repository":{"url":"git+https://github.com/89Omer/claudex.git","type":"git"},"_npmVersion":"10.5.0","description":"A supercharged Claude Code CLI wrapper with roles, model selection, cost tracking, and session history","directories":{},"_nodeVersion":"20.12.1","dependencies":{"conf":"^12.0.0","chalk":"^5.3.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/claude-x_2.0.4_1774440348925_0.9440447165588672","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@89omer/claude-x","version":"2.1.0","keywords":["claude","claude-code","anthropic","ai","cli","developer-tools","productivity","roles","cost-tracking"],"author":"","license":"MIT","_id":"@89omer/claude-x@2.1.0","maintainers":[{"name":"89omer","email":"mohammad.omer.raza@gmail.com"}],"homepage":"https://github.com/89Omer/claudex#readme","bugs":{"url":"https://github.com/89Omer/claudex/issues"},"bin":{"claudex":"src/index.js","claude-x":"src/index.js"},"dist":{"shasum":"4bdbdfa9543ca526be87f770469a1e6d0f78a2eb","tarball":"https://registry.npmjs.org/@89omer/claude-x/-/claude-x-2.1.0.tgz","fileCount":18,"integrity":"sha512-eUP/mZI66Y8/5A/Zjhzzl/0r9pK/P5MJ3WJJW/1yS31P9VKvGMP2CO5jJRAJFf3Jm1JGnQr/EkV2hDHiPhgsAQ==","signatures":[{"sig":"MEUCIQDHDFLBOnZ5gNafKO+pnFXC8QdRHoMNrB3+sMFATTlL6gIgAZfcpplZhBEHI9gtlLKvEB2vsRvVAnVMekhwXU0vSgU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":122457},"type":"module","engines":{"node":">=18"},"gitHead":"28a3f9e478bb88e817480fa1e5956de732818bcd","scripts":{"start":"node src/index.js"},"_npmUser":{"name":"89omer","email":"mohammad.omer.raza@gmail.com"},"repository":{"url":"git+https://github.com/89Omer/claudex.git","type":"git"},"_npmVersion":"10.5.0","description":"A supercharged Claude Code CLI wrapper with roles, model selection, cost tracking, and session history","directories":{},"_nodeVersion":"20.12.1","dependencies":{"conf":"^12.0.0","chalk":"^5.3.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/claude-x_2.1.0_1774900086832_0.9999597778535942","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@89omer/claude-x","version":"2.2.0","keywords":["claude","claude-code","anthropic","ai","cli","developer-tools","productivity","roles","cost-tracking"],"author":"","license":"MIT","_id":"@89omer/claude-x@2.2.0","maintainers":[{"name":"89omer","email":"mohammad.omer.raza@gmail.com"}],"homepage":"https://github.com/89Omer/claudex#readme","bugs":{"url":"https://github.com/89Omer/claudex/issues"},"bin":{"claudex":"src/index.js","claude-x":"src/index.js"},"dist":{"shasum":"38307578c1ab2beac40de3373df10c133b2e8c77","tarball":"https://registry.npmjs.org/@89omer/claude-x/-/claude-x-2.2.0.tgz","fileCount":19,"integrity":"sha512-5YLDnBBLjMW+vS/GOAOFTslHvcCFE6woHTqDWrHmjbL5a7uJ+qWDdT2Pv1fj26I3180e4e876AR5fHpoQrtrWw==","signatures":[{"sig":"MEUCIFA0k9ms94ch+KRpgkFtlg2Jp8xAjeqDjYq++mKmHnEeAiEAizmtNsLdkQTK1HxizBD5qBPr5hkqRZrJV3tjo77rtow=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":143285},"type":"module","engines":{"node":">=18"},"gitHead":"c4e30e52d282542372b434ff7a0026ecaafe6343","scripts":{"start":"node src/index.js"},"_npmUser":{"name":"89omer","email":"mohammad.omer.raza@gmail.com"},"repository":{"url":"git+https://github.com/89Omer/claudex.git","type":"git"},"_npmVersion":"10.5.0","description":"A supercharged Claude Code CLI wrapper with roles, model selection, cost tracking, and session history","directories":{},"_nodeVersion":"20.12.1","dependencies":{"conf":"^12.0.0","chalk":"^5.3.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/claude-x_2.2.0_1777307598098_0.740588402333697","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"@89omer/claude-x","version":"2.3.0","keywords":["claude","claude-code","anthropic","ai","cli","developer-tools","productivity","roles","designer","ui-ux","frontend","graphic-design","cost-tracking","repo-map"],"author":{"name":"Omer Raza"},"license":"MIT","_id":"@89omer/claude-x@2.3.0","maintainers":[{"name":"89omer","email":"mohammad.omer.raza@gmail.com"}],"homepage":"https://github.com/89Omer/claudex#readme","bugs":{"url":"https://github.com/89Omer/claudex/issues"},"bin":{"claudex":"src/index.js","claude-x":"src/index.js"},"dist":{"shasum":"498f5e56c56dbff6ec3719a88960009f859d0fa1","tarball":"https://registry.npmjs.org/@89omer/claude-x/-/claude-x-2.3.0.tgz","fileCount":19,"integrity":"sha512-idQI9KNsZ1dLGPur6q3D5QVs/hpiJof91/GchsZV7Mk7Q6Q0zY3Gnfh7Cl8QyPuy71RBOtVhKDnqI41UpNEgKA==","signatures":[{"sig":"MEUCIFWEWfvN9Mce8qGVERTXJUW2QgRDuq8GUe3O3Kg/ygvpAiEAlikLz09exw7CRBtndHWnlutjoVs/av2mWdL4Zc5sXMc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":164515},"type":"module","engines":{"node":">=18"},"gitHead":"1707091601cdf4317ddfd0501c4dedc51b94e4c9","scripts":{"start":"node src/index.js"},"_npmUser":{"name":"89omer","email":"mohammad.omer.raza@gmail.com"},"repository":{"url":"git+https://github.com/89Omer/claudex.git","type":"git"},"_npmVersion":"10.5.0","description":"A supercharged Claude Code CLI wrapper with opinionated roles (Developer, Designer, PM, Marketing), model selection, repo map, cost tracking, and session history","directories":{},"_nodeVersion":"20.12.1","dependencies":{"conf":"^12.0.0","chalk":"^5.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/claude-x_2.3.0_1778262421763_0.3272165111606906","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"@89omer/claude-x","version":"2.4.0","description":"A supercharged Claude Code CLI wrapper with opinionated roles (Developer, Designer, PM, Marketing), model selection, repo map, cost tracking, and session history","type":"module","bin":{"claudex":"src/index.js","claude-x":"src/index.js"},"scripts":{"start":"node src/index.js"},"keywords":["claude","claude-code","anthropic","ai","cli","developer-tools","productivity","roles","designer","ui-ux","frontend","graphic-design","cost-tracking","repo-map"],"author":{"name":"Omer Raza"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/89Omer/claudex.git"},"homepage":"https://github.com/89Omer/claudex#readme","bugs":{"url":"https://github.com/89Omer/claudex/issues"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"dependencies":{"chalk":"^5.3.0","conf":"^12.0.0"},"_id":"@89omer/claude-x@2.4.0","gitHead":"6d2fdbcde1719473d08fd42dcf182954c8ef8fbe","_nodeVersion":"20.12.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-bCViQdqjFVIkhjQBvV3bFxyenPVvtzE3yHqnTuZ14LmR00czPH9B5AXqzJRKc3eFNWdQL5ZBdex028sBI0IzPw==","shasum":"f3f3c234624dae98b325777d0831c8d41e8b7512","tarball":"https://registry.npmjs.org/@89omer/claude-x/-/claude-x-2.4.0.tgz","fileCount":19,"unpackedSize":170069,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGtevceWXbrmgMa81Tpm2ytQRbItEZtZB+nBYydfBh6EAiBmpUBY8vcNe4CdZOgGwvEo5SOZIDGcZbRlRTKt1v2DaA=="}]},"_npmUser":{"name":"89omer","email":"mohammad.omer.raza@gmail.com"},"directories":{},"maintainers":[{"name":"89omer","email":"mohammad.omer.raza@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/claude-x_2.4.0_1778330486582_0.7489130233936605"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-17T21:56:24.372Z","modified":"2026-05-09T12:41:26.888Z","2.0.0":"2026-03-17T21:56:24.681Z","2.0.3":"2026-03-25T12:01:00.563Z","2.0.4":"2026-03-25T12:05:49.115Z","2.1.0":"2026-03-30T19:48:06.989Z","2.2.0":"2026-04-27T16:33:18.265Z","2.3.0":"2026-05-08T17:47:01.911Z","2.4.0":"2026-05-09T12:41:26.754Z"},"bugs":{"url":"https://github.com/89Omer/claudex/issues"},"author":{"name":"Omer Raza"},"license":"MIT","homepage":"https://github.com/89Omer/claudex#readme","keywords":["claude","claude-code","anthropic","ai","cli","developer-tools","productivity","roles","designer","ui-ux","frontend","graphic-design","cost-tracking","repo-map"],"repository":{"type":"git","url":"git+https://github.com/89Omer/claudex.git"},"description":"A supercharged Claude Code CLI wrapper with opinionated roles (Developer, Designer, PM, Marketing), model selection, repo map, cost tracking, and session history","maintainers":[{"name":"89omer","email":"mohammad.omer.raza@gmail.com"}],"readme":"<div align=\"center\">\n\n```\n  ██████╗██╗      █████╗ ██╗   ██╗██████╗ ███████╗██╗  ██╗\n  ██╔════╝██║     ██╔══██╗██║   ██║██╔══██╗██╔════╝╚██╗██╔╝\n  ██║     ██║     ███████║██║   ██║██║  ██║█████╗   ╚███╔╝\n  ██║     ██║     ██╔══██║██║   ██║██║  ██║██╔══╝   ██╔██╗\n  ╚██████╗███████╗██║  ██║╚██████╔╝██████╔╝███████╗██╔╝ ██╗\n   ╚═════╝╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝  ╚═╝\n```\n\n**A supercharged Claude Code CLI wrapper**\n\nPick your role. Pick your model. Launch with context. Track your costs.\n\n[![npm version](https://img.shields.io/npm/v/claude-x?color=cyan)](https://www.npmjs.com/package/@89omer/claude-x)\n[![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n[![node](https://img.shields.io/badge/node-18%2B-brightgreen)](https://nodejs.org)\n[![platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)](#install)\n\n</div>\n\n---\n\n## What is claudex?\n\nClaude Code is powerful — but it starts every session as a blank slate with no context about what kind of work you're doing.\n\n**claudex fixes that.** It wraps Claude Code with:\n\n- 🗺️ **Repo Map** — Auto-generates a compact codebase visualization (file tree, exports, git context) so Claude knows where to look from the first prompt. Saves tokens by eliminating blind file exploration\n- 🎭 **Role system** — Developer, Designer, PM, or Marketing mode with tailored, opinionated system prompts (Designer mode refuses to ship generic, AI-looking interfaces)\n- 🤖 **Model picker** — Choose Opus 4.7, Opus 4.6, Sonnet 4.6, or Haiku 4.5 at launch\n- 💰 **Cost tracking** — See exactly what each session costs in USD (accurate token parsing)\n- 🚨 **Budget alerts** — Get warned at 80% and 100% of your session budget; prompted to update limit after sessions that exceed it\n- 📊 **Stats dashboard** — Total spend, usage by role and model\n- 📋 **Session history** — Every session logged, resumable\n- 📝 **Session notes** — Save notes after each session, auto-suggested in future sessions\n- ⚡ **Prompt templates** — Fire pre-built prompts for reviews, PRDs, refactors, and more\n- 🧠 **Project memory** — Remembers your last role and model per project\n- 🩺 **Diagnostics** — Inspect active context and validate your local setup with `doctor` and `context`\n\nYou run `claudex`. It sets up context and launches Claude Code for you.\n\n---\n\n## How it works\n\n```\nclaudex\n  │\n  ├── Auto-generates repo map (file tree, exports, git context, dependencies)\n  ├── You pick: role (Dev / Designer / PM / Marketing)\n  ├── You pick: model (Opus 4.7 / Opus 4.6 / Sonnet / Haiku)\n  ├── claudex writes role + repo map → CLAUDE.md\n  └── Claude Code launches with full codebase awareness from message one\n```\n\nWhen you exit, claudex shows a session summary and optionally saves notes:\n\n```\n  Role      🧑‍💻 Developer\n  Model     Sonnet 4.6\n  Repo Map  21 files | main | node | .js(15) .json(2) | ~847 tokens\n\n  Writing CLAUDE.md with repo map and launching...\n\n  ────────────────────────────────────────────\n  claudex — session ended\n  ────────────────────────────────────────────\n\n  Role      🧑‍💻 Developer\n  Model     Sonnet 4.6\n  Duration  14m 32s\n\n  Tokens    12,400 in / 3,200 out\n  Cost      $0.085\n\n  All-time  $2.34 across 28 sessions\n\n  ────────────────────────────────────────────\n```\n\nYour notes are stored and automatically suggested when you resume related sessions.\n\n---\n\n## Requirements\n\n- **Node.js 18+**\n- **Claude Code** installed (`npm install -g @anthropic-ai/claude-code`)\n- **Anthropic account** (free or paid) authenticated via `claude login`\n\n---\n\n## Install\n\n```bash\n# Clone the repo\ngit clone https://github.com/89Omer/claudex\ncd claudex\n\n# Install dependencies\nnpm install\n\n# Link globally — makes `claudex` available anywhere in your terminal\nnpm link\n```\n\n> **Windows:** Run PowerShell as Administrator when running `npm link`\n\nVerify:\n```bash\nclaudex --help\n```\n\n---\n\n## Quick Start\n\n```bash\n# 1. Run setup wizard (once)\nclaudex init\n\n# 2. Optional: inspect setup and active context\nclaudex doctor\nclaudex context\n\n# 3. Go to your project\ncd my-project\n\n# 4. Launch\nclaudex\n```\n\nOn a first run in a new project, claudex now prints a short guide explaining what it will do before Claude Code starts: pick a role/model, write context into `CLAUDE.md`, and save project memory for next time.\n\nYou'll see role and model pickers. Press Enter to accept defaults, or type a number:\n\n```\n  Choose a role:\n\n    1.  🧑‍💻  Developer            Clean, maintainable, production-ready code  ← last used\n    2.  🎨  Designer             Reject generic, AI-looking interfaces\n    3.  📋  Product Manager      User stories, acceptance criteria\n\n  Enter number [1]:\n\n  Choose a model:\n\n    1.  Opus 4.7        Latest flagship — fastest Opus, best reasoning & coding\n    2.  Opus 4.6        Prior flagship — coding, agents, 1M context\n    3.  Sonnet 4.6      Recommended — near-Opus performance, fast, 1M context     ← last used\n    4.  Haiku 4.5       Fastest & cheapest — quick tasks, high volume\n\n  Enter number [3]:\n```\n\n---\n\n## All Commands\n\n| Command | Description |\n|---|---|\n| `claudex` | Interactive launcher — pick role + model, auto-generates repo map |\n| `claudex map` | Preview the auto-generated repo map without launching |\n| `claudex doctor` | Check setup, config, supported models, and Claude Code availability |\n| `claudex context` | Show the active role/model for this project and where they came from |\n| `claudex watch` | Launch with a live stats side panel in `tmux` |\n| `claudex init` | First-time setup wizard |\n| `claudex models` | List all available models |\n| `claudex history` | Table of past sessions with cost + duration |\n| `claudex stats` | Full cost dashboard by role and model |\n| `claudex resume` | Pick a past Claude Code session to continue |\n| `claudex use` | Pick a prompt template, then launch |\n| `claudex install-commands` | Install `/dev`, `/design`, `/pm`, `/marketing`, `/use` as Claude Code slash commands |\n| `claudex --help` | Show help |\n\n### Skip pickers with flags\n\n```bash\nclaudex --role=design --model=opus    # launch directly, no prompts\nclaudex --role=dev                    # skip role picker only\nclaudex --model=haiku                 # skip model picker only\n```\n\n---\n\n## Roles\n\n### 🧑‍💻 Developer (`--role=dev`)\nDefault role. Focused on clean, production-ready code.\n\nCovers: design patterns, architecture, performance, security, testing, debugging.\n\nBest for: feature work, code reviews, refactoring, debugging, architecture.\n\n### 🎨 Designer (`--role=design`)\nOpinionated UI/UX, frontend, and graphic design. Refuses generic, AI-looking output.\n\nCovers: named visual styles (Swiss, Editorial, Brutalist, Bento, Glassmorphism, Y2K, Terminal, Memphis, Notion-minimal, etc.), UX heuristics (Fitts, Hick, Miller, Jakob, Doherty), WCAG 2.1 AA accessibility, design tokens, animation, and canvas / print / social graphic design (SVG + Figma-ready specs).\n\nBest for: building distinctive components, de-genericising existing UIs, landing-page hero design, accessibility audits, and poster / social / print artwork.\n\n### 📋 Product Manager (`--role=pm`)\nFocused on product thinking.\n\nCovers: user stories, PRDs, RICE/MoSCoW prioritization, roadmaps, KPIs, stakeholder comms.\n\nBest for: PRDs, user stories, feature briefs, prioritization, retros.\n\n### 📣 Marketing (`--role=marketing`)\nFocused on messaging, growth, and launch execution.\n\nCovers: copywriting, positioning, campaigns, SEO briefs, email sequences, ad creative, and content strategy.\n\nBest for: landing page copy, campaign plans, brand messaging, blog outlines, and marketing assets.\n\n---\n\n## Models\n\n| Model | Shorthand | Best for | Cost |\n|---|---|---|---|\n| Opus 4.7 | `opus4.7` | Latest flagship, fastest Opus, best reasoning | $5 / $25 per 1M tokens |\n| Opus 4.6 | `opus` | Complex reasoning, long tasks, agents | $5 / $25 per 1M tokens |\n| Sonnet 4.6 | `sonnet` | Everyday coding, near-Opus quality ⭐ | $3 / $15 per 1M tokens |\n| Haiku 4.5 | `haiku` | Quick tasks, high volume, cheapest | $0.80 / $4 per 1M tokens |\n\n```bash\nclaudex models    # see full list with descriptions\n```\n\n---\n\n## In-session slash commands\n\nclaudex installs five Claude Code slash commands so you can switch roles or apply templates **inside a running session** — no need to exit and relaunch.\n\n```bash\nclaudex install-commands\n```\n\n(`claudex init` will offer to do this for you on first run.)\n\nThis writes five files into `~/.claude/commands/`:\n\n| Command | Effect |\n|---|---|\n| `/dev` | Switch the active session to Developer mode |\n| `/design` | Switch to Designer mode (the opinionated one — refuses generic UIs) |\n| `/pm` | Switch to Product Manager mode |\n| `/marketing` | Switch to Marketing mode |\n| `/use <template> [content]` | Apply a template from the current role (prefix matching: `/use red` → `redesign`) |\n\nEach command embeds the role's full system prompt, so the role switch is real, not symbolic. Re-runs are idempotent — only files marked with the claudex `<!-- claudex-managed -->` header are overwritten. Pass `--force` to overwrite anything.\n\n> **Why this approach?** Once Claude Code is running, it owns the input prompt — claudex itself can't intercept slash commands. The fix is to register them as [Claude Code custom slash commands](https://code.claude.com/docs/en/slash-commands) so Claude Code routes them natively.\n\n---\n\n## Prompt Templates\n\nTemplates inject a pre-built, role-specific prompt. Two ways to use them:\n\n```bash\nclaudex use                       # interactive picker before launch\n```\n```text\n/use redesign <html>              # inside a Claude Code session (prefix match works)\n```\n\n**Developer templates:** Code Review, Refactor, Debug, Write Tests, Explain Code, Optimize, Write Docs\n\n**Designer templates:** UX Review, Build Component, Make Responsive, Accessibility Audit, Add Animation, Design Tokens, Pick Style, Canvas Design, Landing Hero, De-genericize\n\n**PM templates:** User Story, Write PRD, Prioritize (RICE), Project Brief, Retro, Define Metrics\n\n**Marketing templates:** Write Copy, Campaign Plan, Brand Positioning, SEO Brief, Email Sequence, Ad Creative, Blog Post\n\nAdd your own in `.claudex.json`:\n```json\n{\n  \"templates\": {\n    \"dev\": {\n      \"mytemplate\": {\n        \"label\": \"My Custom Template\",\n        \"prompt\": \"Do this specific thing to my code:\\n\\n\"\n      }\n    }\n  }\n}\n```\n\n---\n\n## Cost Tracking & Budget Alerts\n\nclaudex tracks every session automatically. No setup needed.\n\n```bash\nclaudex stats\n```\n\n```\n  claudex stats\n  ────────────────────────────────────────────\n\n  Overview\n\n  Total sessions    28\n  Total cost        $4.821\n  Total tokens      2.1M\n  Avg per session   $0.172\n\n  By Role\n\n  🧑‍💻 Developer        ████████░░░░   18 sessions   $3.201\n  🎨 Designer          ████░░░░░░░░    7 sessions   $1.124\n  📋 Product Manager   ██░░░░░░░░░░    3 sessions   $0.496\n\n  By Model\n\n  Sonnet 4.6           ████████████   22 sessions   $2.940\n  Opus 4.6             ████░░░░░░░░    4 sessions   $1.620\n  Haiku 4.5            ██░░░░░░░░░░    2 sessions   $0.261\n```\n\n```bash\nclaudex history    # full session log\n```\n\n### Budget alerts\n\nclaudex monitors spend during a session and notifies you in the terminal when you're approaching or over your limit.\n\n- **At 80%** — a warning appears in your terminal: `⚠  claudex: Budget 80% used ($4.00 / $5.00)`\n- **At 100%** — an urgent warning appears: `🚨 claudex: Budget limit reached!`\n- **After the session** — if you exceeded your budget, claudex prompts you to update the limit:\n\n```\n  🚨 Session cost $5.23 exceeded budget limit of $5.00\n\n  Update budget? Enter new limit or press Enter to keep $5.00: $\n```\n\nType a new number and press Enter to save it globally, or press Enter to keep the existing limit.\n\nThe default budget is **$5.00**. Change it via `claudex init` or by answering the post-session prompt.\n\n---\n\n## Session History & Resume\n\n```bash\nclaudex history      # list all sessions\nclaudex resume       # pick a past session to continue\n```\n\nResume opens a picker showing your recent Claude Code sessions. Select one to pick up exactly where you left off.\n\n---\n\n## Session Notes\n\nAfter each session ends, claudex offers a quick prompt to save notes:\n\n```\nSave session notes for next time? (Ctrl+D to finish, or press Enter to skip)\n>\n```\n\nType what you did, blockers, next steps, or anything you want to remember. Press Ctrl+D to save, or Enter to skip.\n\n**Your notes are automatically suggested in future sessions**, helping you jump back in without re-reading context. Great for:\n- Tracking blockers to tackle next\n- Documenting what was completed\n- Leaving yourself breadcrumbs for multi-day tasks\n- Building continuity across sessions\n\n---\n\n## Project Memory\n\nclaudex remembers your last role and model **per project folder**. Next time you run `claudex` in the same directory, it pre-selects what you used last (shown as `← last used`).\n\nOverride anytime by picking a different option.\n\n## Diagnostics & Context\n\nUse these commands when you want the user to understand exactly what claudex is doing:\n\n```bash\nclaudex doctor\nclaudex context\n```\n\n`claudex doctor` checks:\n- whether Claude Code is installed and discoverable\n- whether your saved config references supported roles/models\n- whether this project has `.claudex.json`, `CLAUDE.md`, and saved project memory\n- how many sessions and how much spend claudex has tracked\n\n`claudex context` explains:\n- the active role and model for the current project\n- whether they came from `CLAUDE.md`, project memory, `.claudex.json`, or global defaults\n- what prompt layers are available, including templates and any extra user content in `CLAUDE.md`\n\n---\n\n## Project Config\n\nCreate `.claudex.json` in any project to set per-project defaults:\n\n```json\n{\n  \"defaultRole\": \"design\",\n  \"defaultModel\": \"claude-opus-4-7\",\n  \"templates\": {\n    \"design\": {\n      \"brandreview\": {\n        \"label\": \"Brand Review\",\n        \"prompt\": \"Review this against our brand guidelines:\\n\\n\"\n      }\n    }\n  }\n}\n```\n\nCommit it to share defaults with your team, or add to `.gitignore` to keep it personal.\n\n## Testing\n\nThis repo does not include a formal automated test suite yet. The fastest smoke test is:\n\n```bash\nnode src/index.js --help\nnode src/index.js doctor\nnode src/index.js context\nnode src/index.js map\nnode --check src/index.js\nnode --check src/utils/doctor.js\nnode --check src/utils/init.js\nnode --check src/utils/repomap.js\n```\n\nFor manual verification of the interactive flow:\n\n```bash\nnode src/index.js\nnode src/index.js use\nnode src/index.js watch\n```\n\n---\n\n## Repo Map — The Killer Feature\n\nEvery time you run `claudex`, it auto-generates a compact repo map and injects it into `CLAUDE.md` alongside your role prompt. Claude sees the full codebase structure from the first message — no blind file exploration.\n\n```bash\nclaudex map    # preview the visual map without launching\n```\n\n### Visual Dashboard\n\n`claudex map` renders a full visual dashboard in your terminal:\n\n```\n  ╭──────────────────────────────────────────────────────────────────╮\n  │  🗺️  claudex map  @89omer/claude-x v2.4.0                       │\n  │  main  ·  node (module)  ·  21 files  ·  ~909 tokens            │\n  │  Deps: chalk, conf                                               │\n  │  Scripts: start                                                  │\n  ├──────────────────────────────────────────────────────────────────┤\n  │                                                                  │\n  │  Languages                                                       │\n  │  ████████████████████████████████████████████████████████████████ │\n  │  █ .js 16  █ .md 1  █ .json 1                                   │\n  │                                                                  │\n  ├──────────────────────────────────────────────────────────────────┤\n  │                                                                  │\n  │  File Tree                                                       │\n  │  ├── src/                                                        │\n  │  │   ├── components/                                             │\n  │  │   │   └── StatusBar.js  StatusBar(), HelpBar()                │\n  │  │   ├── roles/                                                  │\n  │  │   │   └── index.js      ROLES, DEFAULT_ROLE, getRole()        │\n  │  │   ├── utils/                                                  │\n  │  │   │   ├── config.js     MODELS, PRICING, getConfig()...       │\n  │  │   │   ├── cost.js       calcCost(), formatCost()...           │\n  │  │   │   ├── repomap.js    generateRepoMap()...                  │\n  │  │   │   └── + 10 more                                           │\n  │  │   └── index.js                                                │\n  │  ├── package.json                                                │\n  │  └── README.md                                                   │\n  │                                                                  │\n  ├──────────────────────────────────────────────────────────────────┤\n  │                                                                  │\n  │  Exports  15 modules scanned                                     │\n  │  src/utils/config.js      MODELS, PRICING, getConfig() +5 more   │\n  │  src/roles/index.js       ROLES, DEFAULT_ROLE, getRole()         │\n  │                                                                  │\n  ├──────────────────────────────────────────────────────────────────┤\n  │                                                                  │\n  │  Uncommitted  4 files                                            │\n  │  modified   src/index.js                                         │\n  │  untracked  .claude/                                             │\n  │                                                                  │\n  │  Recent Commits                                                  │\n  │  c4e30e5  feat: add repo map visualization                       │\n  │  28a3f9e  Here's what changed                                    │\n  │                                                                  │\n  ├──────────────────────────────────────────────────────────────────┤\n  │  ~909 tokens injected into CLAUDE.md on launch                   │\n  ╰──────────────────────────────────────────────────────────────────╯\n```\n\nThe visual map includes:\n\n- **Colored file tree** — box-drawing connectors, directories in cyan, files colored by language\n- **Inline signatures** — function/class/export names shown next to each file\n- **Language bar** — GitHub-style colored distribution bar showing your tech stack at a glance\n- **Exports summary** — top modules with their key exports, scannable at a glance\n- **Git context** — uncommitted files with colored status labels, recent commits with hashes\n- **Project metadata** — name, version, dependencies, scripts, framework detection\n- **Token estimate** — shows exactly how many tokens the map costs when injected\n\n### Pre-launch display\n\nWhen you run `claudex` normally, the pre-launch line includes a compact language bar:\n\n```\n  Repo Map  21 files | main | node | ~909 tokens\n           ███████████████████████  █ .js 16  █ .md 1  █ .json 1\n```\n\n### What Claude sees\n\nThe visual is for you. Claude gets a token-efficient plain-text version injected into `CLAUDE.md` — same data, no colors, no box drawing. This is what saves tokens: Claude reads one compact map instead of exploring dozens of files.\n\n### .claudexignore\n\nCreate a `.claudexignore` file in your project root to exclude paths from the repo map:\n\n```\n# Directories\ngenerated/\ncoverage/\n__snapshots__/\n\n# File patterns\n*.test.js\n*.spec.ts\n*.stories.tsx\n\n# Specific files\nscripts/migrate-legacy.js\n```\n\nPatterns support `dir/` (directory), `*.ext` (extension), and basic glob matching.\n\n---\n\n## How Role Injection Works\n\nclaudex writes your role's system prompt and repo map into `CLAUDE.md` in your project:\n\n```markdown\n# claudex — Active Role: Designer 🎨\n# Model: Sonnet 4.6 (claude-sonnet-4-6)\n\nYou are an elite UI/UX designer, frontend engineer, and graphic designer. You refuse to ship generic, \"AI-looking\" interfaces.\n\n- Reject generic, AI-looking interfaces — every project commits to a named, opinionated style\n- Pick the visual aesthetic BEFORE the font, colour, or component\n...\n\n# Repo Map\n> Auto-generated by claudex. Navigate with this map...\n(file tree, signatures, git context)\n\n<!-- claudex:role:design -->\n<!-- claudex:model:claude-sonnet-4-6 -->\n```\n\nClaude Code reads `CLAUDE.md` automatically on startup. Your role and repo map are active from message one.\n\n**Your existing `CLAUDE.md` is safe** — claudex preserves any content you've written below the role block.\n\n---\n\n## Troubleshooting\n\n**`claudex: command not found`**\n```bash\n# macOS / Linux\nsudo npm link\n\n# Windows — run PowerShell as Administrator\nnpm link\n\n# Or add npm global bin to PATH\n# Windows: $env:PATH += \";$env:APPDATA\\npm\"\n# macOS:   export PATH=\"$(npm root -g)/../bin:$PATH\"\n```\n\n**`✗ Claude Code not found`**\n\nclaudex will offer to install it automatically. Or manually:\n```bash\nnpm install -g @anthropic-ai/claude-code\nclaude login\n```\n\nOn Windows, restart PowerShell after installing so PATH updates take effect.\n\n**`✗ Failed to launch 'claude'`**\n\nClaude Code is installed but can't be spawned. Try:\n```bash\nclaude --version          # verify it works\nnpm install -g @anthropic-ai/claude-code   # reinstall\nclaude login              # re-authenticate\n```\n\n**Model flag not working**\n\nUse `=` not a space: `--model=sonnet` ✓ not `--model sonnet` ✗\n\n---\n\n## Updating\n\n```bash\ncd claudex\ngit pull\nnpm install\n```\n\nNo need to re-run `npm link` after pulling updates.\n\n---\n\n## Power Users — Pair with everything-claude-code\n\nclaudex handles the **launch layer** — role context, model selection, cost tracking.\n\nFor the **inside of your sessions** — skills, hooks, subagents, and slash commands — pair it with [everything-claude-code](https://github.com/affaan-m/everything-claude-code) by [@affaanmustafa](https://github.com/affaan-m).\n\n```\nclaudex                          → sets role, model, CLAUDE.md, tracks cost\n     ↓ launches Claude Code\neverything-claude-code plugin    → skills, hooks, subagents, /commands inside sessions\n```\n\nThey don't overlap. They stack.\n\n**Install everything-claude-code inside a Claude Code session:**\n\n```bash\n# Run these inside Claude Code after launching with claudex\n/plugin marketplace add affaan-m/everything-claude-code\n/plugin install everything-claude-code@everything-claude-code\n```\n\nYou get claudex's role system on top of a battle-tested skill and agent library. The best of both.\n\n---\n\n## Contributing\n\nPRs welcome. Ideas for next:\n\n- [ ] Custom roles via config\n- [ ] Tree-sitter based signatures (deeper than regex)\n- [ ] Export session history to CSV/markdown\n- [ ] `claudex ls` — list all project configs\n- [ ] Neovim / JetBrains integration\n\n---\n\n## License\n\nMIT — free to use, modify, and distribute.\n\n---\n\n<div align=\"center\">\nBuilt on top of <a href=\"https://github.com/anthropics/claude-code\">Claude Code</a> by Anthropic\n</div>\n","readmeFilename":"README.md"}