DGCDocs
Features/Training export

your real sessions → scrubbed fine-tuning JSONL

Training export#

Turn the sessions DGC already keeps into a training set for a local model. Run it non-interactively — there is nothing to configure:

dgc export-training

Inside a session, /export-training runs the same read-only export for the current project to ./dgc-training.jsonl (pass a path to change it), and the VS Code command palette offers *DGC: Export Training Data*.

Each session becomes one line of JSONL: the conversation as a standard OpenAI-style messages array — system / user / assistant-with-tool_calls / tool results — plus a small meta object (model, project, turn and tool counts, edits, and an outcome flag). That is the shape common SFT and tool-calling fine-tuning tooling expects, so it drops straight into a training run for the model you run locally.

Flags#

  • --out <file> — where to write (default ./dgc-training.jsonl).
  • --all — export every project's sessions (default: just this project's).
  • --session <id> — export a single session (a unique id prefix works).
  • --successful-only — keep only sessions that show real successful work: an

edit landed with no failed edits, or a /goal was completed.

  • --min-turns N — drop trivial sessions with fewer than N user turns.

Secrets are stripped#

Every field of every record is deep-scrubbed through DGC's redaction layer before it is written: configured credentials (API keys, MCP/language-server secrets) and high-confidence credential shapes (sk-… tokens, JWTs, auth headers, private keys) are replaced with [REDACTED]. The export is read-only — it never modifies a session. Reasoning traces and provider continuation blobs are dropped so each record is a clean, portable conversation.