← Catalog

@srobroek/pi-repomix

Pack a local or remote repo into one file with repomix for bulk context: external repos, module packs and version diffs.

Package

Install

Install with PiG

pig install npm:@srobroek/pi-repomix

Install with Pi

pi install npm:@srobroek/pi-repomix
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "skills": [
    "./skills"
  ],
  "extensions": [
    "./extensions/repomix.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.7.0 (README.md). PiG does not review it.

repomix

Packs a local directory, or a remote repository at a ref, into one file with repomix, for questions that need many files at once: an external repo's layout and APIs, a whole module for review, a diff between two versions, or a doc set. The pack goes to a file and only its path and metrics come back, so it never lands in the context.

Install

Install the Pi package from npm:

pi install npm:@srobroek/pi-repomix
opencode plugin add 'github:srobroek/harness-plugins::path:plugins/repomix/opencode'

Install repomix globally with the installer you prefer, for example mise use -g npm:repomix@1.19.0, npm i -g repomix, brew install repomix, or pipx install repomix. Without it on PATH, the tool runs npx --yes repomix@1.19.0, because npx downloads code. Your permission rules decide whether that runs; set confirmPack (below) to prompt first.

Tool

repomix_pack takes directory (default: the session directory) or remote (owner/repo or an https URL) with an optional ref, plus include and ignore globs, compress, style (xml, markdown or plain), lineNumbers and timeoutSeconds (default 300). It writes repomix-<target>-<id>.<ext> to $TMPDIR/opencode/repomix/ and returns the path, the file, token and character totals, the ten largest files, and the files the secret scan left out. Packs older than a day are removed on the next run.

Every run:

  • passes --config an empty JSON file, so neither the target's repomix.config.* (a JS or TS config is code) nor your global repomix config is loaded. A target's .repomixignore and .gitignore still apply.
  • runs in an empty directory under the temp dir.
  • never passes --no-security-check or --remote-trust-config.
  • passes --no-file-summary and --no-git-sort-by-changes, so two packs of one repo at different refs diff cleanly.

The tool asks permission as repomix_pack, with the absolute directory or remote@ref as the resource. Your permission rules decide: an allowed call runs without a prompt, and a deny or ask rule always wins. To prompt when a pack would run through npx, even if a rule allows it, set the plugin option confirmPack to true (default false):

{
  "plugins": [{
    "package": "github:srobroek/harness-plugins::path:plugins/repomix/opencode",
    "options": { "confirmPack": true }
  }]
}

The researcher agent (agent-researcher, and delivery's fallback copy) and build's external-repo-worker allow repomix_pack. Other agents keep your default for it, which is a prompt unless you configure otherwise. The shipped allowlist agents deny it.

Skill

repomix lists when packing beats grep and read, the recipes for each case, how to read a pack in slices, and when compress loses information. It also carries a CLI recipe, so it is exported to Claude Code.

The npm package exposes repomix_pack as a Pi tool. It packs without asking; set "repomix": {"confirmPack": true} in ~/.pi/agent/settings.json to confirm every pack, which a session without a UI then refuses. The pack is written under a temp directory, and only the path and metrics are returned.

Optional: the repomix MCP server

The plugin does not configure the repomix MCP server. In Pi's .pi/mcp.json or the user MCP configuration, repomix --mcp exposes its tools. --sandbox confines file access to the working directory but disables remote packing.