> ## Documentation Index
> Fetch the complete documentation index at: https://chatcli.edilsonfreitas.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trajectory Export (ShareGPT)

> /export writes the current conversation as ShareGPT-format JSONL — ready for fine-tuning, evaluation or analysis. Provider-agnostic.

The **`/export [path]`** command serializes the current conversation as a **ShareGPT-style JSONL trajectory** — the common format for model training/evaluation data. It is **provider-agnostic**: it serializes the session history (user and assistant turns, including tool calls/results) regardless of which LLM produced it.

***

## Usage

```text theme={"system"}
> /export
  OK Exported 14 turns to ~/.chatcli/exports/trajectory-20260527-143902.jsonl
```

With no argument, it writes to `~/.chatcli/exports/trajectory-<timestamp>.jsonl`. You can pass an explicit path:

```text theme={"system"}
> /export ./datasets/run-42.jsonl
  OK Exported 14 turns to ./datasets/run-42.jsonl
```

If the conversation is empty, the command warns and writes nothing.

***

## Format

Each line is a JSON object with the conversation in the ShareGPT schema (`conversations` with `human`/`gpt`/etc. roles), making the file directly consumable by fine-tuning pipelines and evaluation tools that expect ShareGPT.

<Tip>
  Use it with [Agent Mode](/core-concepts/agent-mode): run a multi-step task, then `/export` to capture the full trajectory (reasoning + tool calls + results) as a training example or for auditing.
</Tip>

***

## See also

* [Agent Mode](/core-concepts/agent-mode)
* [Session Management](/features/session-management) — `/session search`, save/load/fork
* [Command Reference](/reference/command-reference)
