import, remap
import
Section titled “import”kcap import # interactive scope pickerkcap import --discover [--json] # inspect local history without uploadingkcap import --repo . [--claude --codex]kcap import --repo acme/api --repo acme/web --yeskcap import --org acme --since 2026-01-01 --yeskcap import --all --private --yesChoose one scope: --all, --org [owner], or one or more --repo. A non-interactive run that uploads needs a scope and --yes; --discover only lists and needs neither
| Option | Meaning |
|---|---|
--org [owner] | Repositories whose git remote owner matches. Bare --org reuses the owner remembered for the profile or offers a picker |
--repo <owner/name> | One repository; . or current is this checkout’s origin. Repeatable |
--claude, --codex, --cursor, --copilot, --gemini, --kiro, --pi, --opencode, --antigravity, --mistral-vibe, --grok, --muse | Restrict to these sources; none means all |
--since <YYYY-MM-DD> | Sessions starting on or after the date |
--cwd <path> | Filter by stored working directory within the scope |
--session <id> | One session within the scope; also names the session for --repair-capture |
--private | Import as owner-only |
--min-lines <n> | Skip shorter transcripts; default 15 |
--skip-title | Skip local title generation for Claude and Codex imports |
--generate-summaries | Also generate outcome summaries with local Claude or Codex |
--reimport | Re-upload OpenCode sessions the local ledger marked complete |
--yes, -y | Skip the confirmation |
Allow and ignore rules apply. Sessions upload newest first. Re-running resumes from server watermarks. Records are redacted before upload, with a 4 MiB limit per record; a record that cannot be processed becomes a numbered capture-loss marker
Every run first prints the stored working directories that no longer exist on disk, which is the cue for remap. Ephemeral worktrees under <project>/.<anything>/worktrees/<slug> are attributed to the project automatically
Repair a session’s capture
Section titled “Repair a session’s capture”kcap import --session <id> --repair-capture [--dry-run] [--claude|--codex]For an ended Claude Code or Codex session you own: scans the local root and child transcripts, compares them with the server, and restores provably missing file-tool records, then recomputes turns, file totals and summaries. Scope and action flags are refused in repair mode. Exit 0: complete with no gaps; 2: completed with gaps left; 1: refused, failed, or still running on the server after two minutes (the output prints the repair id)
kcap remap <from> <to>kcap remap '~/dev/worktrees/*/api' ~/dev/apikcap remap --listkcap remap --remove <from>Prefix rewrites on a path boundary, ~ expanded, one * matching one path segment, applied once, global across profiles; the most specific match wins, literal over wildcard. Stored in config.json under cwd_remap