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
| Flag | Description | Required | Default |
|---|---|---|---|
--dry-run | Show what would be collected without sending | No | false |
--json | Output in JSON format | No | false |
--no-commits | Skip git commit collection | No | false |
--no-transcripts | Skip transcript collection | No | false |
--since <duration> | Collect evidence from this time period | No | -- |
--max-diff <size> | Maximum diff size in characters per commit | No | 10000 |
Duration format
The --since flag accepts human-readable duration strings:
| Example | Meaning |
|---|---|
30m | Last 30 minutes |
2h | Last 2 hours |
1d | Last 1 day |
7d | Last 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:
| Source | Description |
|---|---|
| Git commits | Commit messages, file lists, and diffs from recent commits |
| Transcripts | AI 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-diffflag 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-runto preview what evidence would be collected before sending it to the pipeline. - The
--sinceflag 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 saveusage, as it provides the raw evidence that enrichment processes into structured brain content.