Skip to main content

Code Puppy Logo

🐶✨The sassy AI code agent that makes IDEs look outdated ✨🐶

Version Python License Pydantic AI Privacy

GitHub stars GitHub forks Discord


Code Puppy CLI Demo


What is Code Puppy 1.0?

Code Puppy 1.0 is an opinionated distribution built on Pydantic AI Pax (powered by pydantic-ai-harness and pydantic-ai)—combining Pax's agent runtime, terminal/web UI, sessions, MCP, and sandboxes with Code Puppy's personality, theme, batteries-included extras, and pre-installed plugins.

Looking for Code Puppy 0.0.x? It's still on PyPI: uvx --from 'code-puppy<1' code-puppy. See docs/upgrade/code_puppy_1_0_rewrite_plan.md for rewrite details and status.

Quick Start

Requires Python 3.11–3.14 and uv.

# Run directly without installing
uvx code-puppy

# Or install globally (gives you both `pup` and `code-puppy`)
uv tool install code-puppy
pup
Don't have uv yet?

macOS / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Windows note: The agent executes shell commands in PowerShell via Pax's WindowsWorkspace.

Logging In & Choosing Models

Start pup and run /login to open the sign-in picker, or connect a provider directly:

Provider Command Notes
OpenAI Codex (ChatGPT subscription) /login codex Alias for /login openai-codex; adds available Codex models
Claude Code (Claude subscription) /login claude-code Powered by the bundled claude_code plugin (claude-code: models)
GitHub Copilot /login copilot Alias for /login github-copilot; adds every model your account serves
OpenRouter /model add → OpenRouter → OAuth You can also enter an API key instead of using browser OAuth.
  • Switch models: Run /model (or /model add to add any provider/model).
  • Use API keys directly: Run /keys to store keys securely in your OS keyring, or export standard environment variables (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, OPENROUTER_API_KEY, etc.) or put them in a local .env file.
  • Multiple accounts: Append @<profile> to sign in to more than one account—for example /login codex@work or /login claude-code@personal—then select PROVIDER@PROFILE:MODEL.

Setting Custom Rules (/system_prompt & AGENTS.md)

Global personal rules with /system_prompt

Run /system_prompt inside a session to open the system prompt menu:

  • Your instructions (Edit…) — Opens a multi-line editor for your personal rules (stored in the run.instructions setting). Clearing it restores the defaults.
  • Append to yours (Append…) — Adds a new paragraph to the end of your existing instructions.
  • Full system prompt (View…) — Read-only view of the exact system prompt last sent to the model.

Your custom instructions are appended after Pax's built-in instructions, the repo's AGENTS.md, and plugin instructions (such as personality), and take effect on your very next prompt.

Project rules with AGENTS.md

Drop an AGENTS.md file in your repository root to share coding standards, architecture notes, and commands with everyone working on that repo. Code Puppy loads it automatically.

Tip: Want to rename your puppy/owner or tone down the sass? Run /plugins configure personality to change names, or /plugins disable personality for a plain agent.

What Code Puppy Adds on Top of Pax

  • Code Puppy Identity & Theme — Custom banner, color palette, animated startup splash (set CODE_PUPPY_NO_SPLASH=1 to skip), and a one-time first-launch prompt to name your puppy and tell it who its owner is.
  • Every Pax Extra Pre-Installed — Ships with all ten /sandbox providers (boxd, daytona, e2b, kubernetes, modal, opensandbox, render, sprites, plus local BoxLite & SmolVM) and the typesafe model provider, so nothing replies "support is not installed".
  • Built-in Plugins (alongside Pax's own default plugins; manage with /plugins):
    • personality — Gives the main agent Code Puppy's name, informal/sassy tone, and strong coding opinions (DRY, YAGNI, SOLID, Zen of Python, ~600-line file guideline). Delegated sub-agents stay plain.
    • claude_code (pydantic-claude-code) — Claude Code subscription models (claude-code: prefix, /login claude-code).
    • legacy_plugins — Compatibility bridge that loads Code Puppy 0.0.x plugins (register_callbacks.py) from entry points, ~/.code_puppy/plugins/, and project .code_puppy/plugins/. Inspect and trust project plugins with /puppy-plugins.
  • 0.0.x Migration & Session Import — Automatically carries over your 0.0.x setup on first start and exposes 0.0.x sessions in /resume.

Everyday Usage

Because Code Puppy is Pax under the hood, all of Pax's CLI flags and slash commands work out of the box:

pup                         # Interactive terminal session
pup -p "explain this repo"  # Single non-interactive prompt
pup -m claude-code:claude-sonnet-5-5  # Pick a provider-qualified model
pup -c                      # Continue this directory's most recent session
pup --resume                # Browse and restore saved sessions
pup -w                      # Start in an isolated Git worktree
pup --web                   # Launch the local web UI
pup update                  # Update Code Puppy (or use /update inside a session)
pup --help                  # Full CLI reference

Inside an interactive session:

  • /login — Sign in to Codex, Claude Code, or GitHub Copilot
  • /model — Switch or add models (including OpenRouter via OAuth)
  • /system_prompt — Edit your global rules or inspect the full system prompt
  • /plugins — List, enable, disable, or configure plugins
  • /mcp — Manage MCP servers
  • /sandbox — Run the agent inside a local or cloud sandbox
  • /resume — Restore a saved session (including Claude Code, Codex, and Code Puppy 0.0.x sessions via /resume puppy)
  • /new, /clear, /exit — Session controls (Esc or Ctrl-C interrupts a turn)

Upgrading from 0.0.x

On first launch, Code Puppy automatically carries over your 0.0.x settings, saved API keys, and MCP servers. Your 0.0.x files are never modified, renamed, or deleted, and existing 1.0 values are never overwritten.

pup migrate --dry-run   # Preview what would be carried over
pup migrate             # Run migration explicitly
  • Sessions: 0.0.x sessions show up in /resume (filter with /resume puppy) and are imported on demand when picked.
  • 0.0.x Plugins: Plugins with a register_callbacks.py continue to load through the legacy_plugins bridge (15 core hooks supported; /puppy-plugins shows status). Project-local plugins in .code_puppy/plugins/ require explicit opt-in with /puppy-plugins trust <name>.
  • Not carried over from 0.0.x: Custom JSON agents (/agent), /add_model, speculative code mode, and DBOS durable execution are 0.0.x features not present in 1.0.

Configuration & Plugins

  • Config & state: Stored in ~/.code_puppy/ (or $XDG_CONFIG_HOME/code_puppy, $XDG_DATA_HOME/code_puppy, etc. if XDG variables are set).
  • API keys: Save with /keys, set standard provider environment variables, or place them in a local .env file (only credential-shaped variables are read from .env, and existing environment variables always take precedence).
  • Custom plugins: Drop a Pax Plugin file or package into ~/.code_puppy/plugins/. See Pax's plugin docs (pydantic_ai_pax/_docs/PLUGINS.md) for the plugin API.

Changelog

📋 View the full changelog on Kittylog

Contributing

Read AGENTS.md before opening a PR. Because Code Puppy is a thin distribution of pydantic-ai-pax, new agent/UI behavior belongs in a Pax plugin, a pydantic-ai-harness capability, or upstream.

uv run ruff check --fix
uv run ruff format .
uv run pytest

Code Puppy Privacy Commitment

Zero-compromise privacy policy. Always.

There is no corporate or investor backing for this project—just open-source software that respects your data:

  • ❌ Zero telemetry — Code Puppy collects no usage analytics, crash reports, or behavioral tracking.
  • ❌ Zero prompt logging — Code Puppy never sends your code, prompts, or project details to any Code Puppy server.
  • ❌ Zero third-party data sharing — Nothing is sold, traded, or harvested.

Your prompts go only to the model provider you configure (including local endpoints if you run your own server).

License

MIT — see LICENSE.

Metadata

Release files for code-puppy 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for code-puppy 1.0.2
File Size Uploaded Provenance Actions
code_puppy-1.0.2.tar.gz 55.6 kB Without provenance Details for code_puppy-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for code-puppy 1.0.2
File Interpreter ABI Platform Actions
code_puppy-1.0.2-py3-none-any.whl Python 3 none any Details for code_puppy-1.0.2-py3-none-any.whl

Total release size: 125.7 kB

Release files / code_puppy-1.0.2.tar.gz

Download URL code_puppy-1.0.2.tar.gz
Size 55.6 kB
Tags Source
SHA-256 checksum
How to use checksums
36b161ed20443fa5a8d5acae05beb19cc9efcceb0201d0a2c81933a0421df26a
BLAKE2b-256 checksum
How to use checksums
f9639a61615b7908722a48b286e6b7afbf47678910398a8b1507942add5141e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / code_puppy-1.0.2-py3-none-any.whl

Download URL code_puppy-1.0.2-py3-none-any.whl
Size 70.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c954e4a3e14afce5be2b0205c386df5ed0c538630745bfd6a54841a32f24db8
BLAKE2b-256 checksum
How to use checksums
c461a68bcc034ca7af8786f1ad1d9cc8997cd3cd4b30ecfbd1c38484b1f55264
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for code-puppy 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page