@propel-code/codex-mover
v0.1.2
Published
Package and merge portable Codex and Claude Code history/context between machines.
Maintainers
Readme
codex-mover
codex-mover packages portable Codex and Claude Code history into a tarball and merges it into another machine's local data.
It is meant for moving useful context between machines without copying machine-local or account-local state.
Install
Run without installing:
npx @propel-code/codex-mover --helpInstall globally:
npm install -g @propel-code/codex-mover
codex-mover --helpRun with Bun:
bunx @propel-code/codex-mover --helpUsage
codex-mover pack [--output ./codex-mover-archive.tar.gz] [--provider codex|claude|all]
codex-mover merge --input ./codex-mover-archive.tar.gz [--provider codex|claude|all] [--path-map /old=/new]Commands print a JSON summary to stdout.
Examples
codex-mover pack --output ./context.tar.gz
codex-mover merge --input ./context.tar.gz
codex-mover merge --input ./context.tar.gz --provider codex
codex-mover merge --input ./context.tar.gz --path-map /old/workspace=/new/workspaceOptions
--inputArchive path to merge inmergemode.--output,-oArchive path to create inpackmode. Defaults to./codex-mover-<timestamp>.tar.gz.--provider codex|claude|allPackage or merge a single provider or both. Default isall.--codex-home PATHOverride the Codex home directory. Otherwisecodex-moveruses$CODEX_HOMEor~/.codex.--claude-config-dir PATHOverride the Claude config directory. Otherwisecodex-moveruses$CLAUDE_CONFIG_DIR,~/.claude, or~/.config/claude.--path-map OLD=NEWRewrite stored project paths during merge. Repeat this flag when multiple roots moved.--help,-hPrint usage information.
What Gets Moved
By default, codex-mover includes portable history and context:
- Codex history:
sessions/,archived_sessions/,history.jsonl,session_index.jsonl - Codex context:
memories/,automations/,AGENTS.md,rules/,policy/,skills/ - Claude Code:
projects/,history.jsonl,todos/
What Stays Local
By default, codex-mover excludes machine-local and account-local state:
- Codex:
auth.json,config.toml, caches, logs, sqlite state, shell snapshots, temp files, vendor imports, worktrees - Claude Code: backups, caches, debug logs, plugins,
settings.json, shell snapshots, stats caches
Merge Behavior
- JSONL history files are merged by unique line content.
- Session JSONL files prefer the imported copy when both sides identify the same session.
--path-maprewrites Claude project paths and storedcwdandprojectreferences during merge.- Conflicting non-appendable files are preserved as
*.imported-<bundle>siblings instead of overwriting local data.
Development
bun install
bun test
bun run typecheckVerification
bun run typecheck
bun test
bun run build
npx @propel-code/codex-mover --help
node dist/bin.js pack --provider codex --output /tmp/codex-mover.tar.gz
node dist/bin.js merge --input /tmp/codex-mover.tar.gz