How to upload a chat from AI tool
How to upload a chat from AI tool
Cooontext is configured through a cooontext.config.json file placed in your project root, or via CLI flags for one-off overrides.
Config file
Create a cooontext.config.json file at the root of your project:
{
"output": {
"dir": ".cooontext",
"format": "markdown",
"filename": "{tool}-{date}-{slug}"
},
"capture": {
"includeCode": true,
"includeMetadata": true,
"minTokens": 100
}
}
Output options
output.dir
Type: string Default: .cooontext
The directory where exported sessions are saved, relative to the project root.
{ "output": { "dir": "docs/sessions" } }
output.format
Type: "markdown" | "json" Default: "markdown"
The serialization format for exported sessions.
output.filename
Type: string Default: "{tool}-{date}-{slug}"
The filename template for exported files. Supports the following tokens:
| Token | Description | Example |
|---|---|---|
{tool} |
AI tool name | cursor |
{date} |
ISO date (YYYY-MM-DD) | 2026-03-31 |
{time} |
Time (HH-MM) | 14-22 |
{slug} |
Auto-generated from first prompt | refactor-auth |
{project} |
Project name from package.json | my-app |
Capture options
capture.includeCode
Type: boolean Default: true
Include code blocks in the export. Disable to capture only the conversation text.
capture.includeMetadata
Type: boolean Default: true
Include YAML frontmatter with session metadata (tool, date, token count, etc.).
capture.minTokens
Type: number Default: 100
Skip exporting sessions shorter than this token count. Useful to avoid saving trivial one-liners.
CLI flags
All config options can be overridden via CLI flags:
cooontext export --format json --output ./exports
cooontext export --tool cursor --min-tokens 500
Run cooontext --help for the full flag reference.
Global config
To set defaults across all projects, create ~/.cooontext/config.json:
{
"output": {
"format": "markdown"
},
"capture": {
"minTokens": 200
}
}
Project-level config takes precedence over global config.