@parcha/agentrun-import weekly downloads statistics
By parcha · npm · Claude Code
Reads the coding-agent sessions under a home (Claude Code, Codex, pi, OpenCode, GitHub Copilot CLI, Cursor) into one Session shape, with normalized token usage, subagents under their parent, byte-offset cursors for re-reads, and per-session totals.
@parcha/agentrun-import has 38,348 recorded weekly downloads on npm, a change of +840% over the past 7 days, ranking #863 of 3,247 tracked listings.
About @parcha/agentrun-import
@parcha/agentrun-import
Reads the coding-agent sessions under a home (Claude Code, Codex, pi, OpenCode, GitHub Copilot CLI, Cursor's CLI) into one Session shape: normalized token usage, subagents counted under their parent, and cursors so a second pass reads only what changed. AgentRun's server imports past sessions through it.
Totals for a home
import { parseHome } from "@parcha/agentrun-import";
const sessions = await parseHome(homedir(), { sources: ["claude-code", "codex"] });
// [{ key, file, source, id, tokens: { input, output, cacheRead, cacheWrite, cacheWrite1h }, reasoning, cost, turns, calls, subagents }]
keyis the sha256 (hex) of the session's file path relative to the home,"/"between its parts, with#<id>after it for a file that holds many sessions (an OpenCode database:.local/share/opencode/opencode.db#ses_…). Lines come sorted by key.tokens.inputis the input neither read from nor written to the cache, for every source (seenormalizeUsage).costis USD: the source's own when it wrote one (Claude Code'scost-state, pi's and OpenCode's per-request cost, an OpenCode subagent's added to its parent's), else the requests at pi-ai's list prices (a dependency, loaded on the first price; a load that fails throws with its reason), elsenull.turnscounts the person's messages;callsthe model requests, its subagents' with them, each once.state: {}handed to each call keeps cursors between calls: the second call reads only the bytes appended since, and returns what a fresh call would. When a file holding a copied record now comes before the file it counts in (an append moved the original after its resumed copy, or a new file sorts before one it shares records with), that source is read again from the start. The state holds counts, record ids and paths, never a prompt, title, working directory or answer; a file that fails to read gives up what it held and is read from its start next time.failures: []collects each file its reader could not read ({ key, file, source, error }; an OpenCode database that does not open, for each session it lists or as itself when it lists none) while the rest are totalled; without it, parseHome throwsReadFailures. An unreadable file is never taken for an empty one.envnames where a source keeps its own directory (CLAUDE_CONFIG_DIR,CODEX_HOME,COPILOT_HOME, OpenCode'sXDG_DATA_HOMEandOPENCODE_DB,CURSOR_CONFIG_DIRorXDG_CONFIG_HOMEfor Cursor); without it the home's.threadsreads the files on that many worker threads (default: the cores the process may run on less one, two on two, at most 16, and no more than the workers whose heaps, 80 MiB each at the defaultworkerOldMb, fit in the memory still free (the machine's, page cache counted as free, at most its container's limit) oncereadAheadis set aside;1reads them in order on the calling thread; at most 64). A read is kept only when it is the one the import's order would make; any other file is read again in order, so the totals are the same whatever the count. A call with astate, or with readers of its own, reads on the calling thread; so does OpenCode in any call (its sessions are rows of a database, not files of lines).readAheadcaps the bytes of finished reads waiting to be taken (default 1 GiB, or a sixteenth of the memory the process may use, its container's limit when one is set, when that is less: 512 MiB at 8 GiB). Under it, files of 64 MiB and over are read first, largest first, then the rest in order; at it, the threads read only the file the import waits on. It is a cap on finished reads waiting, plus at most one read in flight per thread (one of those can be a giant file), not on the process's memory.workerOldMbcaps each worker's old generation (default 64, at least 8, refused with a RangeError under it: at 1 or 2 MB V8 ends the whole process as a worker starts, and at 3 to 7 the workers run out of memory). A line over an eighth of it, or a file that runs a worker out of memory, is read on the calling thread instead; past two such losses a thread, the calling thread reads the rest. Each reading thread (each worker, and the calling thread) also holds up to 8 MiB of scanner memory outside its heap: the scanner's stack and tables, and room for the longest line it read. A line that would take it past 8 MiB (one over about 6.7 MiB) is parsed whole instead, with the same totals.- A request two sources wrote is counted once. OpenCode's claude-agent provider runs Claude Code, which writes each
request into its own session file too; OpenCode names that session on the request (
mirrors). When the same call reads that Claude Code session (serve's import: or its store holds it), the request counts there and not in the OpenCode session (tokens, calls and cost), request by request: one OpenCode session can mix claude-agent requests with other providers'. When it does not, the request counts in OpenCode's.
A year of work
import { wrappedHome } from "@parcha/agentrun-import";
const year = await wrappedHome(homedir(), 2026); // the same options as parseHome, but `state`
```…
Description from the npm listing.
- agentrun
- claude-code
- codex
- copilot
- pi
- cursor
- opencode
- sessions
- usage
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (121)Similar npm Claude Code plugins
All 20 @parcha/agentrun-import alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@parcha/agentrun-import. First seen Dec 5, 2026; last successful collection Dec 6, 2026. See the methodology.