npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

atifact

v0.14.0

Published

Convert agent logs and Vally trajectories to ATIF-format agent trajectories

Readme

atifact

skills.sh

Convert agent logs to ATIF trajectories. One command. Zero dependencies.

Turn HAR files, Vally trajectories, Claude Code logs, Copilot CLI logs, and Codex CLI logs into standardized ATIF v1.8 trajectory JSON — ready for debugging, visualization, fine-tuning, and RL pipelines.

A terminal session on a macOS desktop showing the atifact CLI converting Copilot CLI logs and printing the resulting trajectory JSON.

Use with AI agents

Give your AI coding agent the atifact skill so it can extract trajectories on your behalf:

npx skills add waldekmastykarz/atifact

Once installed, ask your agent to "extract the trajectory from this HAR file", "convert Claude Code logs to ATIF", "convert Copilot CLI logs", or "convert Codex CLI logs" and it will handle the rest.

Install

npm install -g atifact

Quick start

# Convert a HAR file (auto-detected)
atifact session.har

# Convert Claude Code logs
atifact claude-log.jsonl

# Convert Copilot CLI logs
atifact copilot-session.jsonl

# Convert Codex CLI logs
atifact codex-session.jsonl

# Convert a standalone Vally Trajectory object
atifact vally-trajectory.json

# Pipe to stdout (returns JSON array of trajectories)
atifact session.har --json | jq '.steps | length'

Output: <input>.trajectory.json in ATIF v1.8 format. Copilot CLI and Codex CLI logs with subagents produce additional <input>.trajectory.<name>.json files.

--json mode outputs a single trajectory with subagents embedded in the subagent_trajectories array to stdout with no files written.

Programmatic API

Install atifact as a project dependency:

npm install atifact

Convert serialized log content directly from memory:

import { convert } from "atifact";

const { trajectory, subagentTrajectories } = await convert(jsonlContent);

Strings are treated as content, not file paths. Uint8Array input is also supported. Use convertFile to read from a path:

import { convertFile } from "atifact";

const result = await convertFile("session.jsonl");

Both functions detect the input format by default. The format can be forced and a source name can be included in the trajectory notes:

const result = await convert(content, {
	format: "har",
	utilityModels: ["gpt-4o-mini"],
	sourceName: "captured request",
});

Use detectFormat(content) for in-memory input or await detectFileFormat(path) for a file. The package exports the ATIF trajectory and parser result TypeScript types alongside these functions.

Supported inputs

| Format | Source | Flag | |---|---|---| | HAR | OpenAI Chat Completions API, OpenAI Responses API, Anthropic Messages API | har | | JSONL | Claude Code CLI session logs | claude-code-jsonl | | JSONL | Copilot CLI session logs | copilot-cli-jsonl | | JSONL | Codex CLI exec --json logs | codex-cli-jsonl | | JSON | Vally Trajectory object | vally-json |

Format is auto-detected from file contents (not extension). Force it with -f:

atifact myfile.log -f claude-code-jsonl
atifact myfile.log -f copilot-cli-jsonl
atifact myfile.log -f codex-cli-jsonl
atifact trajectory.json -f vally-json

Usage

atifact <input-file> [options]

| Option | Description | |---|---| | -o, --output <prefix> | Output path prefix (default: input file path). Main: <prefix>.trajectory.json, subagents: <prefix>.trajectory.<name>.json | | -f, --format <fmt> | Force input format: har, claude-code-jsonl, copilot-cli-jsonl, codex-cli-jsonl, vally-json | | --json | Write trajectory to stdout with subagents embedded (no files written) | | -q, --quiet | Suppress progress messages | | -h, --help | Show help | | --version | Print version |

Exit codes

| Code | Meaning | |---|---| | 0 | Success | | 1 | Runtime error (parse failure, I/O error) | | 2 | Invalid usage (bad arguments, missing file) |

Output format

atifact produces ATIF v1.8 JSON with:

  • Steps — user messages, agent responses, tool calls, and observations
  • Metrics — token counts, costs, cached tokens per step
  • Tool calls — structured function name + arguments with observation results
  • Subagent trajectories — Copilot CLI and Codex CLI subagents produce separate trajectory files linked via subagent_trajectory_ref with trajectory_id resolution; --json mode embeds them in subagent_trajectories
  • Final metrics — aggregated totals across the trajectory
  • All timestamps preserved as ISO 8601 from source data
  • Null/undefined fields excluded for compact output

ATIF v1.8 supports audio content parts. atifact's current input parsers do not extract audio from source logs.

Examples

HAR → trajectory

atifact recording.har -o my-trajectory
# Writes: my-trajectory.trajectory.json

Claude Code → trajectory, piped

atifact ~/.claude/projects/*/sessions/*.jsonl --json --quiet > trajectory.json

Copilot CLI → trajectory with subagents

atifact copilot-session.jsonl
# Writes: copilot-session.jsonl.trajectory.json
# Writes: copilot-session.jsonl.trajectory.<subagent-name>.json (per subagent)

Codex CLI → trajectory

atifact codex-session.jsonl
# Writes: codex-session.jsonl.trajectory.json

Vally → trajectory

atifact vally-trajectory.json
# Writes: vally-trajectory.json.trajectory.json

Count agent steps

atifact session.har --json | jq '[.steps[] | select(.source == "agent")] | length'

Requirements

  • Node.js 22+

License

MIT