Skip to content
KurrentDB

import, remap

Terminal window
kcap import # interactive scope picker
kcap import --discover [--json] # inspect local history without uploading
kcap import --repo . [--claude --codex]
kcap import --repo acme/api --repo acme/web --yes
kcap import --org acme --since 2026-01-01 --yes
kcap import --all --private --yes

Choose 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

OptionMeaning
--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, --museRestrict 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
--privateImport as owner-only
--min-lines <n>Skip shorter transcripts; default 15
--skip-titleSkip local title generation for Claude and Codex imports
--generate-summariesAlso generate outcome summaries with local Claude or Codex
--reimportRe-upload OpenCode sessions the local ledger marked complete
--yes, -ySkip 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

Terminal window
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)

Terminal window
kcap remap <from> <to>
kcap remap '~/dev/worktrees/*/api' ~/dev/api
kcap remap --list
kcap 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