{"_id":"@alidhibi/ccto","name":"@alidhibi/ccto","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@alidhibi/ccto","version":"0.1.0","description":"Claude Code Token Optimizer — reduce token usage by 60–80% with local semantic indexing and MCP tools","keywords":["claude","claude-code","mcp","token-optimizer","semantic-search","ai-tools","developer-tools"],"author":{"name":"alidhibi"},"license":"MIT","homepage":"https://github.com/alidhibi/ccto#readme","repository":{"type":"git","url":"git+https://github.com/alidhibi/ccto.git","directory":"packages/cli"},"bugs":{"url":"https://github.com/alidhibi/ccto/issues"},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"bin":{"ccto":"dist/index.js"},"main":"./dist/index.js","scripts":{"build":"tsup src/index.ts","dev":"tsup src/index.ts --watch","typecheck":"tsc --noEmit","clean":"rimraf dist tsconfig.tsbuildinfo"},"dependencies":{"better-sqlite3":"^11.7.0","@huggingface/transformers":"^3.3.3","web-tree-sitter":"^0.24.7"},"devDependencies":{"@ccto/core":"workspace:*","@ccto/mcp-server":"workspace:*","@ccto/shared":"workspace:*","chalk":"^5.4.1","commander":"^13.1.0","ink":"^5.1.0","react":"^18.3.1","@types/better-sqlite3":"^7.6.12","@types/node":"^22.0.0","@types/react":"^18.3.18","rimraf":"^6.0.1","tsup":"^8.3.5","typescript":"^5.7.3"},"gitHead":"e6699dc61399c76027126bbcae8e61cb8002533e","_id":"@alidhibi/ccto@0.1.0","_nodeVersion":"25.0.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-6yR976sNCyUrC0J4BGD7SCeQaff+GqgrdWP/l+L95dNHD5PeIflCwosxNmNHpZlfp1dUFQXtlu4fDeNgr53q3w==","shasum":"49625a0bd47b8cc4cbdcc15a022106c5a67cff9d","tarball":"https://registry.npmjs.org/@alidhibi/ccto/-/ccto-0.1.0.tgz","fileCount":5,"unpackedSize":3305944,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC96MPKasR036k36k/fVkCxuP0fo/YywKBCtXPEGZ3skgIgH/jfC+XpoH26wRKjtZELwv8T+IrUJ/YB3wg27fZFTg8="}]},"_npmUser":{"name":"alidhibi","email":"alidhibi@gmail.com"},"directories":{},"maintainers":[{"name":"alidhibi","email":"alidhibi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ccto_0.1.0_1776359097507_0.8102880784760285"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-16T17:04:57.409Z","0.1.0":"2026-04-16T17:04:57.758Z","modified":"2026-04-16T17:04:58.348Z"},"maintainers":[{"name":"alidhibi","email":"alidhibi@gmail.com"}],"description":"Claude Code Token Optimizer — reduce token usage by 60–80% with local semantic indexing and MCP tools","homepage":"https://github.com/alidhibi/ccto#readme","keywords":["claude","claude-code","mcp","token-optimizer","semantic-search","ai-tools","developer-tools"],"repository":{"type":"git","url":"git+https://github.com/alidhibi/ccto.git","directory":"packages/cli"},"author":{"name":"alidhibi"},"bugs":{"url":"https://github.com/alidhibi/ccto/issues"},"license":"MIT","readme":"# ccto — Claude Code Token Optimizer\n\n[![npm](https://img.shields.io/npm/v/ccto)](https://www.npmjs.com/package/ccto)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/alidhibi/ccto/blob/main/LICENSE)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)\n\n> Reduce Claude Code token consumption by **60–80%** using local semantic indexing and MCP tools.\n\nAll processing runs **offline** — no data leaves your machine.\n\n---\n\n## Install\n\n```bash\nnpm install -g @alidhibi/ccto\n```\n\n## Use\n\n```bash\ncd your-project\nccto init\nclaude\n```\n\nThat's it. `ccto init` indexes your codebase, registers its MCP server with Claude Code, and updates `CLAUDE.md` — all in one command.\n\n---\n\n## Features\n\n| Without CCTO | With CCTO |\n|---|---|\n| Claude reads entire files | Claude reads only relevant chunks via `smart_read` |\n| Claude searches by filename | Claude finds code semantically via `semantic_search` |\n| Context resets each session | Persistent memory via `memory_recall` |\n| Full file trees in prompts | Condensed outline via `project_outline` |\n\n---\n\n## CLI Commands\n\n| Command | Description |\n|---|---|\n| `ccto init` | Index project, configure MCP, generate `CLAUDE.md` |\n| `ccto index` | Re-index all files |\n| `ccto index --incremental` | Re-index only git-changed files |\n| `ccto serve` | Start MCP server manually (debug) |\n| `ccto stats` | Token savings dashboard |\n| `ccto memory list` | List session memories |\n| `ccto memory clear` | Clear all memories |\n| `ccto doctor` | Diagnose setup issues |\n\n---\n\n## MCP Tools\n\n| Tool | What it does |\n|---|---|\n| `semantic_search` | Find relevant code chunks by natural language query |\n| `smart_read` | Read a file outline-first, then fetch specific sections |\n| `project_outline` | Get a condensed project tree and top modules |\n| `memory_recall` | Search persistent session memory |\n\n---\n\n## Supported Languages\n\nTypeScript · JavaScript · Python · PHP · CSS/SCSS · Bash · SQL\n\n---\n\n## Requirements\n\n- Node.js 20+\n- Claude Code ([claude.ai/code](https://claude.ai/code))\n\n> On first `ccto init`, the ONNX embedding model (~80 MB) downloads once to `~/.ccto/models/`.\n\n---\n\n## FAQ\n\n**Does ccto send data to the internet?**\nNo. All indexing and search are local. Only the ONNX model download is a network call, and it happens once.\n\n**Does `ccto init` overwrite my `CLAUDE.md`?**\nNo. It appends a CCTO section. If one already exists, it skips the update.\n\n**How do I update the index after code changes?**\nRun `ccto index --incremental` to re-index only git-changed files.\n\n**MCP tools not showing up in Claude Code?**\nRun `ccto doctor` and restart Claude Code after `ccto init`.\n\n---\n\n## License\n\n[MIT](https://github.com/alidhibi/ccto/blob/main/LICENSE) © alidhibi\n","readmeFilename":"README.md","_rev":"1-38f991b6ca66f5341574903a8e249f1c"}