Convert agent session recordings (HAR files, Claude Code JSONL logs, Copilot CLI JSONL logs) into structured ATIF v1.6 trajectory JSON using the atifact CLI.
Verify the CLI is available:
bash
command -v atifact
If not installed, install globally:
bash
npm install -g atifact
FormatFile typeDescriptionhar``.harHAR files with OpenAI (Chat Completions, Responses API) or Anthropic (Messages API) requestsclaude-code-jsonl``.jsonlClaude Code CLI session logscopilot-cli-jsonl``.jsonlCopilot CLI session logs
Format is auto-detected from file contents (not extension). Use --format / -f to force a specific format when auto-detection fails.
The --output / -o option takes a prefix, not a filename. Output files are derived from the prefix:
<prefix>.trajectory.json<prefix>.trajectory.<name>.jsonDefault prefix is the input file path:
bash
atifact session.har
# Writes: session.har.trajectory.json
bash
atifact session.har -o out
# Writes: out.trajectory.json
# If subagents exist: out.trajectory.<name>.json
Use when auto-detection picks the wrong format for .jsonl files:
bash
atifact session.jsonl -f claude-code-jsonl
atifact session.jsonl -f copilot-cli-jsonl
Use --json with --quiet to suppress diagnostics and get clean JSON on stdout. Output is a JSON array of all trajectories (main first, then subagents). No files are written.
bash
atifact session.har --json --quiet
Combine with other tools:
bash
atifact session.har --json --quiet | jq '.[0].steps | length'
OptionAliasDescription<input-file>Path to the input file (required)--output``-oOutput path prefix. Main: <prefix>.trajectory.json, subagents: <prefix>.trajectory.<name>.json (default: input file path)--format``-fForce input format: har, claude-code-jsonl, copilot-cli-jsonl``--jsonWrite JSON array of all trajectories to stdout (no files written). First element is main, rest are subagents.--quiet``-qSuppress progress messages (stderr only)
CodeMeaning0Success1Runtime error (parse failure, I/O error)2Invalid usage (bad arguments, missing file)
.jsonl files, determine the source (Claude Code or Copilot CLI) to use the correct --format if auto-detection fails.atifact with the input file. Use -o to set the output prefix (e.g., atifact /path/to/session.har -o /path/to/session). The main trajectory is written to <prefix>.trajectory.json.task tool calls produce separate trajectory files per subagent. The main trajectory references them via subagent_trajectory_ref with trajectory_path pointing to the sibling file.