A terminal app (CLI/TUI) for running and managing multiple AI coding agents like Claude Code, Codex, and Aider in separate git workspaces.
ZiChuanLan/agent-purge
A local web console and CLI that injects or replaces one shared system prompt (persona) across multiple coding agents like Claude Code, Codex and OpenCode.
- Stars
- 1,349
- Forks
- 860
- Open issues
- 0
- Last commit
- 24 hours ago
What is it?
agent-purge gives you one persona file that gets written into the system prompt of several coding agent harnesses, including codex, claude, opencode, pi, hermes and others. Each harness reads its system prompt from a different place, so the tool exposes three channels: a managed config block installed into the harness, a shim on PATH that launches the harness with the persona, and an in-session slash command to switch on or off. Four modes are available: replace, strict (persona only), append, and off.
A local web console at 127.0.0.1 lists personas, shows which harnesses are installed and which injection layer each uses, and toggles the persona on or off. Turning it off, or running with the off mode, reverts every change. Personas are plain Markdown files with frontmatter, stored in a data directory under the user's home, and the state is kept only on the local machine. The package is Node 20+ with no dependencies.
An optional plugin for the magpie local gateway rewrites the system segment of requests from agents routed through the gateway, so one persona change applies without restarting each harness. Closed-source desktop clients are only launched as-is, with no injection.
Key features
- 01Writes one persona into multiple coding agents via config blocks, PATH shims, or in-session commands.
- 02Offers replace, strict, append and off modes, switchable at runtime.
- 03Local web console to list personas, check harness status and toggle injection.
- 04All changes are reversible through uninstall, disarm, or switching to off.
- 05Optional magpie gateway plugin rewrites system prompts for requests passing through it.
Use cases
- Keeping one consistent persona or coding style across Claude Code, Codex and OpenCode.
- Testing how different system prompts change the behavior of coding agents.
- Routing several agents through a local gateway and changing their persona in one place.
Quick start
- 1
Install the CLI globally via npm
npm i -g agent-purge - 2
Start the local web console
agent-purge web - 3
Launch a coding agent with the current persona (e.g. codex)
agent-purge codex
Things to know
- Requires Node.js 20 or newer.
- Closed-source desktop agents are only launched as-is and cannot have the prompt injected.
- The optional magpie gateway plugin must be installed from a git clone and its persona list regenerated after changes.
- The strict and replace modes can degrade or change harness behavior because tool instructions may be removed.
In collections
Topics
FAQ
- What is agent-purge?
- A local web console and CLI that injects or replaces one shared system prompt (persona) across multiple coding agents like Claude Code, Codex and OpenCode. agent-purge gives you one persona file that gets written into the system prompt of several coding agent harnesses, including codex, claude, opencode, pi, hermes and others. Each harness reads its system prompt from a different place, so the tool exposes three channels: a managed config block installed into the harness, a shim on PATH that launches the harness with the persona, and an in-session slash command to switch on or off. Four modes are available: replace, strict (persona only), append, and off.
- Is agent-purge free to use? What license does it have?
- agent-purge is open source under the MIT license. Check the license terms before using it in commercial products.
- Is agent-purge still maintained?
- Actively maintained. The last commit to agent-purge was on Nov 6, 2026.
- What can I use agent-purge for?
- Keeping one consistent persona or coding style across Claude Code, Codex and OpenCode. Testing how different system prompts change the behavior of coding agents. Routing several agents through a local gateway and changing their persona in one place.
- How do I install agent-purge?
- Install the CLI globally via npm: npm i -g agent-purge Start the local web console: agent-purge web Launch a coding agent with the current persona (e.g. codex): agent-purge codex
- Where can I get agent-purge?
- The source code and installation instructions are on GitHub: https://github.com/ZiChuanLan/agent-purge
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A paste-in rules block that stops coding agents like Claude Code and Codex from over-defending, over-building and adding unneeded checks.
A local, file-based set of ten SKILL.md agent skills for task clarification, task tracking, pausing and handoff, profile memory, skill building, and writing.
A native desktop app and CLI for controlling coding agents like Claude Code, Codex and Cursor locally, with optional multi-device sync.
A Python supervisor that watches coding agents like Codex and OpenCode with decision models, assessing completion, test sufficiency and stuck workers.
A local-first desktop workbench that runs OpenCode, Codex and DeepSeek Harness agents on shared projects, tasks, plugins and Skills.