read
Open file contents, slices, and images so the model sees the tree instead of guessing.
Prompt Gun is a minimalist coding agent that runs inside the repository, not a hosted chat window. Four tools by default. Personalization through extensions, skills, templates, and themes. Token efficiency from a small system prompt, on-demand skills, and compaction. Connect Claude, GPT, Gemini, Copilot, or any other supported provider.
curl -fsSL https://prompt-gun.com/install.sh | sh
prompt-gun 0.84.3 provider anthropic / claude-sonnet context AGENTS.md · skills on demand · compaction ready > Fix the failing auth tests. Keep the public API stable. read src/auth/session.ts read src/auth/session.test.ts edit src/auth/session.ts bash npm test -- src/auth write src/auth/session.test.ts Tests: 14 passed. Session saved locally. tokens ↑ 12.4k ↓ 1.8k cache hit 64% context 18% prompt-gun > _
Why Prompt Gun
Prompt Gun starts in a project directory and keeps a full interactive session there.
The loop is small on purpose: a unified multi-provider LLM layer, an interactive TUI,
and a four-tool core for real repository work. Print mode (-p) is there when you
want a one-shot run instead of a conversation.
read, write, edit, and
bash. No plan mode, sub-agents, MCP, or permission popups baked into the
binary. Ask it to build what you need, or add it yourself.
AGENTS.md / SYSTEM.md shape how it
talks. The agent loop stays intact.
ANTHROPIC_API_KEY, or run /login for
Claude Pro/Max, ChatGPT Plus/Pro, GitHub Copilot, and the other built-in providers.
Local and gateway providers are supported too.
-c / -r, fork a branch of
the conversation, compact when the window fills, or export a session when you need a
record of what changed.
prompt-gun -p "summarize this repository" for one-shot work. JSON and RPC
modes exist when you want to embed the same agent in a pipeline. An SDK is there for
in-process use.
Four-tool core
Most of a coding session is inspect, patch, write, and run. Prompt Gun starts there and stops there until you add more. That keeps the model focused and the prompt small.
read
Open file contents, slices, and images so the model sees the tree instead of guessing.
write
Create or overwrite files when a patch is the wrong shape for a new path.
edit
Targeted find/replace so existing files change in place, not as full rewrites.
bash
Run the checks you already use. PowerShell on Windows. Your scripts, your test runner.
Tighten the allowlist for a read-only pass. Replace or wrap tools with an extension when you need a sandbox, a permission gate, or a custom runner. The binary does not invent a second agent runtime to do it.
Personalization
The core is small so personalization has somewhere to live. Put resources in the user directory, in the project, or in a shareable package. Reload them without restarting the loop.
TypeScript modules that register tools, commands, keybindings, event handlers, and UI. Custom compaction, path protection, status lines, MCP if you want it, git checkpoints — build the feature instead of waiting for it.
On-demand capability packages. A skill stays out of the system prompt until you invoke
/skill:name or the agent loads it. That is token efficiency and
personalization in the same mechanism.
Reusable Markdown prompts expanded with /name. Keep review, commit, and
release checklists as files instead of retyping them into the editor.
Built-in dark and light, plus your own. Themes hot-reload: edit the active file and the TUI picks up the palette without a restart.
Project instructions, conventions, and common commands loaded from the user directory,
parents, and cwd. Override a directory with AGENTS.override.md. Disable
with --no-context-files.
Replace the default system prompt with a project or user-level
SYSTEM.md. Append without replacing via
APPEND_SYSTEM.md when you only need a local addendum.
Token efficiency
Context is the scarce resource. Prompt Gun does not dump every capability into every turn. The default prompt stays small, skills load when they are needed, and compaction summarizes older messages when the window fills. Full history remains in the local session file.
/compact with your own instructions. Recent turns stay verbatim.
Providers
Prompt Gun does not lock you to a single vendor. The same coding-agent loop talks to a
unified provider layer. You choose with environment variables, /login, or
--provider / --model. Switch mid-session from the TUI.
Sessions
Every interactive run is a session file on disk, grouped by working directory. Prompt Gun does not host your repository. Context goes to the model provider you configured — the same contract as any local coding agent.
prompt-gun -c continues the last session. -r picks from the list. /tree jumps to any turn.
-p
One prompt, one answer, exit. Pipes stdin into the prompt when you want a scripted pass.
How it runs
prompt-gun.
/login. No Prompt Gun account is required.
prompt-gun -c, switch models mid-flight, compact, or run a print-mode job from CI.
FAQ
Prompt Gun is a minimalist terminal coding agent. You install a CLI named
prompt-gun, start it in a repository, and it uses an LLM plus a four-tool
core to read, write, edit, and run commands. Personalization is extensions, skills,
templates, themes, and context files. Sessions are local. The software is MIT licensed.
On Linux and macOS: curl -fsSL https://prompt-gun.com/install.sh | sh.
On any platform with Node.js 22.19+:
npm install -g --ignore-scripts prompt-gun.
Bun and pnpm global installs are also supported. After install, run prompt-gun
from the project you want it to work on.
No. There is no Prompt Gun-hosted model plan. You connect the LLM providers you already use. The CLI is free under MIT; provider usage is billed by those providers.
Yes. Use /login for Claude Pro/Max, ChatGPT Plus/Pro, GitHub Copilot, and
other subscription providers, or export API keys such as ANTHROPIC_API_KEY,
OPENAI_API_KEY, and GEMINI_API_KEY.
By default it can read files, write files, edit with
targeted replacements, and run bash (PowerShell on Windows). That is enough to
implement features, fix tests, and inspect a codebase. You can tighten the tool allowlist
when you want a read-only pass, or add tools through extensions and skills.
The system prompt stays small because the core is four tools, not a menu of product modes. Skills are on-demand instead of always in context. Compaction summarizes older turns when the window fills, while recent work stays verbatim. The TUI footer reports tokens, cache, cost, and context so you can see the spend.
Drop TypeScript extensions, skills, prompt templates, and themes into the user or
project agent directory. Put standing instructions in AGENTS.md. Replace or
append the system prompt with SYSTEM.md / APPEND_SYSTEM.md.
Share bundles as packages via npm or git.
Yes. The supported install on Windows is the npm-family command:
npm install -g --ignore-scripts prompt-gun.
The curl installer is the Unix path. The CLI itself runs on Node.js 22.19 or newer.
Prompt Gun runs on your machine, in the directory you launch it from. It does not host your repository. Context is sent to the model provider you configured, the same way any local coding agent works. Sessions are stored locally under the agent config directory.
MIT. The full permission grant, warranty disclaimer, and copyright notice are on the license page. You do not need a source-hosting account to read them.