Skip to content

contox collect

Collect session evidence from git commits and transcripts, then send it to the V2 ingest pipeline for AI-powered enrichment. This is the command that feeds raw session data into the enrichment system.

Usage

bash
contox collect [options]

Options

FlagDescriptionRequiredDefault
--dry-runShow what would be collected without sendingNofalse
--jsonOutput in JSON formatNofalse
--no-commitsSkip git commit collectionNofalse
--no-transcriptsSkip transcript collectionNofalse
--since <duration>Collect evidence from this time periodNo--
--max-diff <size>Maximum diff size in characters per commitNo10000

Duration format

The --since flag accepts human-readable duration strings:

ExampleMeaning
30mLast 30 minutes
2hLast 2 hours
1dLast 1 day
7dLast 7 days

Examples

Collect all evidence from the last 2 hours:

bash
contox collect --since 2h

Preview what would be collected:

bash
contox collect --since 1d --dry-run

Collect only commits (skip transcripts):

bash
contox collect --no-transcripts --since 4h

Collect only transcripts (skip commits):

bash
contox collect --no-commits --since 2h

Collect with a smaller diff size limit:

bash
contox collect --since 1d --max-diff 5000

Get JSON output for scripting:

bash
contox collect --since 2h --json

What it collects

The collect command gathers two types of evidence:

SourceDescription
Git commitsCommit messages, file lists, and diffs from recent commits
TranscriptsAI coding session transcripts (if available)

This evidence is sent to the V2 ingest pipeline, which extracts structured knowledge through AI-powered enrichment.

Notes

  • The --max-diff flag limits the size of each commit's diff to prevent very large diffs from consuming excessive tokens during enrichment. The default of 10000 characters is suitable for most workflows.
  • Use --dry-run to preview what evidence would be collected before sending it to the pipeline.
  • The --since flag is useful for collecting evidence from a specific work session rather than the entire git history.
  • This command works best when paired with regular contox save usage, as it provides the raw evidence that enrichment processes into structured brain content.