{"_id":"@codehourra/contextor","_rev":"5-f975ac657b96af3d4ea493ea2c44b1c7","name":"@codehourra/contextor","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@codehourra/contextor","version":"0.1.0","keywords":["dotfiles","context","sync","developer","cli","sqlite","claude","cursor"],"author":{"name":"steve"},"license":"MIT","_id":"@codehourra/contextor@0.1.0","maintainers":[{"name":"jumpcode","email":"1162697322@qq.com"}],"homepage":"https://github.com/CodeHourra/contextor#readme","bugs":{"url":"https://github.com/CodeHourra/contextor/issues"},"bin":{"contextor":"dist/cli.js"},"dist":{"shasum":"b8acae7aebbcfb8b4bf9da4f545045eed6ef552b","tarball":"https://registry.npmjs.org/@codehourra/contextor/-/contextor-0.1.0.tgz","fileCount":5,"integrity":"sha512-VIoHFDfaXpqTgGh7ttIuJ6lvKRehvabIbc1Vmgss3JkokF1RG6K29lvNSsMGVX/V59h6/+ix+4HIxZvnEWIujA==","signatures":[{"sig":"MEUCIQDpePbtMDCo+YnMxPnOJnXeZjd4S/mKmGab6jvfscG6OQIgOYdHCqspy43coc+vUIlLRO2P2+BEdDhxeXMEzv/mnWE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":305809},"type":"module","_from":"file:codehourra-contextor-0.1.0.tgz","engines":{"node":">=20"},"scripts":{"ci":"pnpm lint && pnpm typecheck && pnpm test && pnpm build","dev":"tsx src/cli.ts","lint":"biome check .","test":"vitest run","build":"tsup","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"jumpcode","email":"1162697322@qq.com"},"_resolved":"/private/var/folders/85/gygs7vl158sfrbrky3yr91pc0000gn/T/be62b792baf5b9f897b94a4bffa3b672/codehourra-contextor-0.1.0.tgz","_integrity":"sha512-VIoHFDfaXpqTgGh7ttIuJ6lvKRehvabIbc1Vmgss3JkokF1RG6K29lvNSsMGVX/V59h6/+ix+4HIxZvnEWIujA==","repository":{"url":"git+https://github.com/CodeHourra/contextor.git","type":"git"},"_npmVersion":"10.8.2","description":"Project-level developer context sync tool (SQLite-backed). Snapshot and restore .claude/.cursor/.codex/.env*/AGENTS.md/CLAUDE.md and similar dotfiles per project.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"ink":"^5.0.1","diff":"^7.0.0","react":"^18.3.1","commander":"^12.1.0","picomatch":"^4.0.2","picocolors":"^1.1.0","better-sqlite3":"^11.3.0","ink-text-input":"^6.0.0","ink-select-input":"^6.0.0","@inquirer/prompts":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","vitest":"^2.1.0","typescript":"^5.6.0","@types/diff":"^6.0.0","@types/node":"^22.0.0","@types/react":"^18.3.0","@biomejs/biome":"^1.9.4","@types/picomatch":"^3.0.1","ink-testing-library":"^4.0.0","@types/better-sqlite3":"^7.6.11"},"_npmOperationalInternal":{"tmp":"tmp/contextor_0.1.0_1778551667912_0.5573014182483333","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@codehourra/contextor","version":"0.1.1","keywords":["dotfiles","context","sync","developer","cli","sqlite","claude","cursor"],"author":{"name":"steve"},"license":"MIT","_id":"@codehourra/contextor@0.1.1","maintainers":[{"name":"jumpcode","email":"1162697322@qq.com"}],"homepage":"https://github.com/CodeHourra/contextor#readme","bugs":{"url":"https://github.com/CodeHourra/contextor/issues"},"bin":{"contextor":"dist/cli.js"},"dist":{"shasum":"f0a13f61f25cb863b24b70eeb8be7317e9424b07","tarball":"https://registry.npmjs.org/@codehourra/contextor/-/contextor-0.1.1.tgz","fileCount":5,"integrity":"sha512-k7Nw385e/AJQaOV8ymplYCkqNmZFFxM0p/GY/ye86ec5NYjEegHUPXbuWS4sfW87Xl9Q+9+K1dQwUFj89tnpqQ==","signatures":[{"sig":"MEUCIQCMBD1hFX+qAnrQx4Vi0cveCaaTBrrtiGgQuRh0IPFWNAIgEOJ7Ase572PuM2q2CbFcmIer7jQb5lyYNmR25dsH9Fw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":311965},"type":"module","_from":"file:codehourra-contextor-0.1.1.tgz","engines":{"node":">=20"},"scripts":{"ci":"pnpm lint && pnpm typecheck && pnpm test && pnpm build","dev":"tsx src/cli.ts","lint":"biome check .","test":"vitest run","build":"tsup","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"jumpcode","email":"1162697322@qq.com"},"_resolved":"/private/var/folders/85/gygs7vl158sfrbrky3yr91pc0000gn/T/861ffd3b11daef9cd6e97e15403a0668/codehourra-contextor-0.1.1.tgz","_integrity":"sha512-k7Nw385e/AJQaOV8ymplYCkqNmZFFxM0p/GY/ye86ec5NYjEegHUPXbuWS4sfW87Xl9Q+9+K1dQwUFj89tnpqQ==","repository":{"url":"git+https://github.com/CodeHourra/contextor.git","type":"git"},"_npmVersion":"10.8.2","description":"Project-level developer context sync tool (SQLite-backed). Snapshot and restore .claude/.cursor/.codex/.env*/AGENTS.md/CLAUDE.md and similar dotfiles per project.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"ink":"^5.0.1","diff":"^7.0.0","react":"^18.3.1","commander":"^12.1.0","picomatch":"^4.0.2","picocolors":"^1.1.0","better-sqlite3":"^11.3.0","ink-text-input":"^6.0.0","ink-select-input":"^6.0.0","@inquirer/prompts":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","vitest":"^2.1.0","typescript":"^5.6.0","@types/diff":"^6.0.0","@types/node":"^22.0.0","@types/react":"^18.3.0","@biomejs/biome":"^1.9.4","@types/picomatch":"^3.0.1","ink-testing-library":"^4.0.0","@types/better-sqlite3":"^7.6.11"},"_npmOperationalInternal":{"tmp":"tmp/contextor_0.1.1_1778554977783_0.5425697024355547","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@codehourra/contextor","version":"0.1.3","keywords":["dotfiles","context","sync","developer","cli","sqlite","claude","cursor"],"author":{"name":"steve"},"license":"MIT","_id":"@codehourra/contextor@0.1.3","maintainers":[{"name":"jumpcode","email":"1162697322@qq.com"}],"homepage":"https://github.com/CodeHourra/contextor#readme","bugs":{"url":"https://github.com/CodeHourra/contextor/issues"},"bin":{"contextor":"dist/cli.js"},"dist":{"shasum":"7e4101c8f19084722bc1b7980f5ea76e628a4c71","tarball":"https://registry.npmjs.org/@codehourra/contextor/-/contextor-0.1.3.tgz","fileCount":5,"integrity":"sha512-K8DO68br+/YmxJeTMu23HiKH1Gcy0ntBSYNffBiFi6iR2KdIQKYGhza5QVJnBG3Ur23vpof1jS0T/Ka/RzZ5bw==","signatures":[{"sig":"MEUCIQDiQE26RumBlh/k8t8APYEKZ5BXPDpXuCS4n5S5nJrtuAIgXRPxmG1lZs//HN2aHrQj+f+36m1Cu4Mh4AtRjNCar8U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":366752},"type":"module","_from":"file:codehourra-contextor-0.1.3.tgz","engines":{"node":">=20"},"scripts":{"ci":"pnpm lint && pnpm typecheck && pnpm test && pnpm build","dev":"tsx src/cli.ts","lint":"biome check .","test":"vitest run","build":"tsup","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"jumpcode","email":"1162697322@qq.com"},"_resolved":"/private/var/folders/85/gygs7vl158sfrbrky3yr91pc0000gn/T/9207661fe0549cc61fcf1a32775f50cf/codehourra-contextor-0.1.3.tgz","_integrity":"sha512-K8DO68br+/YmxJeTMu23HiKH1Gcy0ntBSYNffBiFi6iR2KdIQKYGhza5QVJnBG3Ur23vpof1jS0T/Ka/RzZ5bw==","repository":{"url":"git+https://github.com/CodeHourra/contextor.git","type":"git"},"_npmVersion":"10.8.2","description":"Project-level developer context sync tool (SQLite-backed). Snapshot and restore .claude/.cursor/.codex/.env*/AGENTS.md/CLAUDE.md and similar dotfiles per project.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"ink":"^5.0.1","diff":"^7.0.0","react":"^18.3.1","commander":"^12.1.0","picomatch":"^4.0.2","picocolors":"^1.1.0","better-sqlite3":"^11.3.0","ink-text-input":"^6.0.0","ink-select-input":"^6.0.0","@inquirer/prompts":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","vitest":"^2.1.0","typescript":"^5.6.0","@types/diff":"^6.0.0","@types/node":"^22.0.0","@types/react":"^18.3.0","@biomejs/biome":"^1.9.4","@types/picomatch":"^3.0.1","ink-testing-library":"^4.0.0","@types/better-sqlite3":"^7.6.11"},"_npmOperationalInternal":{"tmp":"tmp/contextor_0.1.3_1778568798732_0.11643508595599128","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@codehourra/contextor","version":"0.1.4","keywords":["dotfiles","context","sync","developer","cli","sqlite","claude","cursor"],"author":{"name":"steve"},"license":"MIT","_id":"@codehourra/contextor@0.1.4","maintainers":[{"name":"jumpcode","email":"1162697322@qq.com"}],"homepage":"https://github.com/CodeHourra/contextor#readme","bugs":{"url":"https://github.com/CodeHourra/contextor/issues"},"bin":{"contextor":"dist/cli.js"},"dist":{"shasum":"48d0100f235ca6fd9e28f006716853b50c9805a7","tarball":"https://registry.npmjs.org/@codehourra/contextor/-/contextor-0.1.4.tgz","fileCount":5,"integrity":"sha512-MX/iflF8zHhOckrol6WSsyh6hofBwCSjq9wsX58UnCKY4SxYGdlp6SDBmeAN9E5M1x4e8mqv69SA5ynHu6xNJw==","signatures":[{"sig":"MEUCIDqM+aDnB+2lAgFhHx2n3tR1FBJUHQu7O6oD44ndy8Q4AiEAn7e1g+IROnAf3R/c28+5BGRDgSSiYME881VrxzWgrSs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":405619},"type":"module","_from":"file:codehourra-contextor-0.1.4.tgz","engines":{"node":">=20"},"scripts":{"ci":"pnpm lint && pnpm typecheck && pnpm test && pnpm build","dev":"tsx src/cli.ts","lint":"biome check .","test":"vitest run","build":"tsup","release":"pnpm publish --no-git-checks","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"jumpcode","email":"1162697322@qq.com"},"_resolved":"/private/var/folders/85/gygs7vl158sfrbrky3yr91pc0000gn/T/231e3f7f0760430b86ed8e74138a42f5/codehourra-contextor-0.1.4.tgz","_integrity":"sha512-MX/iflF8zHhOckrol6WSsyh6hofBwCSjq9wsX58UnCKY4SxYGdlp6SDBmeAN9E5M1x4e8mqv69SA5ynHu6xNJw==","repository":{"url":"git+https://github.com/CodeHourra/contextor.git","type":"git"},"_npmVersion":"10.8.2","description":"Project-level developer context sync tool (SQLite-backed). Snapshot and restore .claude/.cursor/.codex/.env*/AGENTS.md/CLAUDE.md and similar dotfiles per project.","directories":{},"_nodeVersion":"20.19.4","dependencies":{"ink":"^5.0.1","diff":"^7.0.0","react":"^18.3.1","commander":"^12.1.0","picomatch":"^4.0.2","picocolors":"^1.1.0","better-sqlite3":"^11.3.0","ink-text-input":"^6.0.0","ink-select-input":"^6.0.0","@inquirer/prompts":"^7.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","vitest":"^2.1.0","typescript":"^5.6.0","@types/diff":"^6.0.0","@types/node":"^22.0.0","@types/react":"^18.3.0","@biomejs/biome":"^1.9.4","@types/picomatch":"^3.0.1","ink-testing-library":"^4.0.0","@types/better-sqlite3":"^7.6.11"},"_npmOperationalInternal":{"tmp":"tmp/contextor_0.1.4_1779867365989_0.937987569691769","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@codehourra/contextor","version":"0.1.5","description":"Project-level developer context sync tool (SQLite-backed). Snapshot and restore .claude/.cursor/.codex/.env*/AGENTS.md/CLAUDE.md and similar dotfiles per project.","license":"MIT","author":{"name":"steve"},"keywords":["dotfiles","context","sync","developer","cli","sqlite","claude","cursor"],"homepage":"https://github.com/CodeHourra/contextor#readme","repository":{"type":"git","url":"git+https://github.com/CodeHourra/contextor.git"},"bugs":{"url":"https://github.com/CodeHourra/contextor/issues"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"type":"module","bin":{"contextor":"dist/cli.js"},"engines":{"node":">=20"},"dependencies":{"@inquirer/prompts":"^7.0.0","better-sqlite3":"^11.3.0","commander":"^12.1.0","diff":"^7.0.0","ink":"^5.0.1","ink-select-input":"^6.0.0","ink-text-input":"^6.0.0","picocolors":"^1.1.0","picomatch":"^4.0.2","react":"^18.3.1"},"devDependencies":{"@biomejs/biome":"^1.9.4","@types/better-sqlite3":"^7.6.11","@types/diff":"^6.0.0","@types/node":"^22.0.0","@types/picomatch":"^3.0.1","@types/react":"^18.3.0","ink-testing-library":"^4.0.0","tsup":"^8.3.0","tsx":"^4.19.0","typescript":"^5.6.0","vitest":"^2.1.0"},"scripts":{"build":"tsup","dev":"tsx src/cli.ts","test":"vitest run","test:watch":"vitest","lint":"biome check .","lint:fix":"biome check --write .","typecheck":"tsc --noEmit","ci":"pnpm lint && pnpm typecheck && pnpm test && pnpm build","release":"pnpm publish --no-git-checks"},"_id":"@codehourra/contextor@0.1.5","_integrity":"sha512-+8/UNZynlZhXWs4julC3VC3tzAXQ/00r7Rn+9Xf/MAAOvIuS0e5BpzMYB3VmShzjGlalGo8xy1iO9bgL0S1JmQ==","_resolved":"/private/var/folders/85/gygs7vl158sfrbrky3yr91pc0000gn/T/6a4873c79b7331490257ae5e1b5500f2/codehourra-contextor-0.1.5.tgz","_from":"file:codehourra-contextor-0.1.5.tgz","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-+8/UNZynlZhXWs4julC3VC3tzAXQ/00r7Rn+9Xf/MAAOvIuS0e5BpzMYB3VmShzjGlalGo8xy1iO9bgL0S1JmQ==","shasum":"ffb97a3ffc4f35002cc01c6cdb85310a9c635759","tarball":"https://registry.npmjs.org/@codehourra/contextor/-/contextor-0.1.5.tgz","fileCount":5,"unpackedSize":411058,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDKJCLyZKQzabaoJkZTRHu84OYaj3xyFfcrjgNp9nBhCQIhAMNuYLYj7eM9cZpq/QO0LMdKxkcWFaItLfxAPIAv2Fue"}]},"_npmUser":{"name":"jumpcode","email":"1162697322@qq.com"},"directories":{},"maintainers":[{"name":"jumpcode","email":"1162697322@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/contextor_0.1.5_1779879723500_0.46365874424232345"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-12T02:07:47.839Z","modified":"2026-05-27T11:02:03.746Z","0.1.0":"2026-05-12T02:07:48.075Z","0.1.1":"2026-05-12T03:02:57.930Z","0.1.3":"2026-05-12T06:53:18.933Z","0.1.4":"2026-05-27T07:36:06.164Z","0.1.5":"2026-05-27T11:02:03.634Z"},"bugs":{"url":"https://github.com/CodeHourra/contextor/issues"},"author":{"name":"steve"},"license":"MIT","homepage":"https://github.com/CodeHourra/contextor#readme","keywords":["dotfiles","context","sync","developer","cli","sqlite","claude","cursor"],"repository":{"type":"git","url":"git+https://github.com/CodeHourra/contextor.git"},"description":"Project-level developer context sync tool (SQLite-backed). Snapshot and restore .claude/.cursor/.codex/.env*/AGENTS.md/CLAUDE.md and similar dotfiles per project.","maintainers":[{"name":"jumpcode","email":"1162697322@qq.com"}],"readme":"# contextor\n\n[![CI](https://github.com/CodeHourra/contextor/actions/workflows/ci.yml/badge.svg)](https://github.com/CodeHourra/contextor/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/@codehourra/contextor.svg)](https://www.npmjs.com/package/@codehourra/contextor)\n[![license](https://img.shields.io/npm/l/@codehourra/contextor.svg)](./LICENSE)\n\n项目级开发上下文（`.claude/`、`.cursor/`、`.codebuddy/`、`.codex/`、`.gemini/`、`.vscode/`、`.env*`、`AGENTS.md`、`CLAUDE.md` 等）的本地 SQLite 同步与还原 CLI。\n\n> npm 包名：`@codehourra/contextor`（registry 里一律小写；`contextor` 无 scope 名已被无关包占用，`contextor-cli` 为他人 tombstone 包）。安装后可执行命令仍是 `contextor`。\n\n## 为什么需要它\n\n大量个人化配置刻意不进 git：AI 助手规则、IDE 配置、本地 `.env`。换机器或重新 clone 后手工还原成本高。`contextor` 按项目维度把这些文件快照进本地 SQLite，需要时用 `restore` 一键写回工作区。\n\n## 安装\n\n```bash\n# 一次性运行（注意带 -y，避免 npx 在非 TTY 终端下回退到 PATH 找 contextor）\nnpx -y @codehourra/contextor --help\npnpm dlx @codehourra/contextor --help\n\n# 全局安装（之后可直接运行 contextor）\nnpm install -g @codehourra/contextor\n# 或\npnpm add -g @codehourra/contextor\n\ncontextor --version\n```\n\n> bin 名固定为 `contextor`。首次安装会编译 `better-sqlite3` 的 native binding，可能需要 30~60 秒，是正常现象。\n\n## Quick Start\n\n```bash\ncd /path/to/your/git/repo\ncontextor init --yes --alias myapp    # 登记项目并按 manifest 规则首次 save（TUI 下可多选）\n# 修改配置后\ncontextor save\n# 新机器 / 新 clone\ncd /path/to/repo\ncontextor restore --yes               # 按 cwd / git remote 解析项目并还原受管文件\n```\n\n首次在无 TUI 场景下建议显式 `--alias`；带 TUI 时可交互输入别名与勾选扫描结果。\n\n## 命令一览\n\n| 命令 | 说明 |\n|------|------|\n| `init` | 登记当前仓库为项目并写入首次快照 |\n| `save` | 将受管文件写入数据库（覆盖式） |\n| `restore` | 从数据库还原到磁盘（可选 restore 前 trash 备份） |\n| `add` / `rm` / `ls` | 维护 manifest 包含/排除与列表 |\n| `status` / `diff` | 工作区与库内快照的差异 |\n| `projects` / `link` / `rename` / `remove` | 多项目管理 |\n| `rules` | 全局扫描规则 |\n| `trash` | `~/.contextor/trash` 下按次还原备份的 list / show / restore / clean |\n| `doctor` / `gc` | 健康检查与孤儿 blob 回收 |\n| `version` | 打印版本字符串 |\n\n完整子命令与选项见：\n\n```bash\ncontextor --help\n```\n\n## TUI\n\n在终端为 TUI 且未带子命令时，运行 `contextor` 会进入 Ink 主菜单，各命令均可从菜单进入。\n\n## 数据目录 `~/.contextor`\n\n- 默认数据库：`~/.contextor/contextor.db`（目录权限 700、库文件 600）\n- 还原前本地覆盖备份：`~/.contextor/trash/<alias>/<UTC 时间戳>/`\n\n可用全局选项 `--db <path>` 覆盖数据库路径（便于测试或多库）。\n\n## 安全说明\n\nv1 **不加密**。`.env` 等敏感内容以明文 blob 存于本地 SQLite。建议仅在已全盘加密的设备使用，且不要将 `contextor.db` 提交到远程或同步到不可信网盘。\n\n## 限制（v1）\n\n- 主要面向 **macOS / Linux**；Windows 未作一等支持。\n- 若受管路径为符号链接，行为按**普通文件**读写处理，不会保留 symlink 语义。\n- 大文件默认跳过，需 `save --allow-large`。\n\n## 设计与规格\n\n详细设计见 `docs/superpowers/specs/2026-05-11-contextor-design.md`。\n\n## License\n\nMIT — 见仓库根目录 `LICENSE`。\n","readmeFilename":"README.md"}