🌐 English | Español
Pedacito
Pedacito (pdc) is a local-first AI coding agent for the models you can run on the GPU you
already own, from 4B to 27B parameters. It cuts your codebase into small, precisely bounded
pieces, so a small model reads and edits only the lines that matter, instead of needing a
frontier model with a 200k-token window.
- Local and hybrid servers: LM Studio, Ollama, Lemonade Server, llama.cpp, vLLM, Strata/Avalon, and any OpenAI-compatible endpoint.
- Hosted when you want it: Claude, ChatGPT, DeepSeek, Qwen, Gemini and OpenRouter for planning, verification or escalation, with a spend cap.
- Safe by default: secret scanning, OS sandbox, checkpoints you can roll back.
30-second quickstart
pip install pedacito # Windows: py -m pip install pedacito
pdc gui ~/code/your-project # browser control panel
pdc tui ~/code/your-project # split-screen terminal
pdc ask "where is login handled?" # one-shot CLI, from the project folder
Start a model server first (LM Studio, Ollama, Lemonade or llama.cpp), then in the GUI open
Settings → Model discovery → Scan local servers, or run pdc models scan.
Documentation
| Guide | What it covers |
|---|---|
| Installation | pip, pipx, extras, model servers, GPU inference servers, upgrading |
| Usage | GUI, CLI, TUI, autonomous runs, @ pinning, language switching |
| Configuration | Config files, rules, themes, profiles, language, every setting |
| Architecture | Engine, server lifecycle manager, local-moe, hybrid routing, limits |
| Skills and tools | 19 bundled skills, custom skills, MCP servers, hooks, prompt overrides |
| Security | Credential scanning, sandboxing, checkpoints, reporting |
| Contributing | Dev setup, tests, module map, docs and locale rules |
| QUICKSTART.md | Step-by-step first runs with expected output |
| MODEL_GUIDE.md | Choosing, pairing and tuning models |
| TECHNIQUES.md | How Pedacito gets small models to work well |
Docs ownership. docs/ (INSTALLATION, ARCHITECTURE, USAGE, CONFIG, SKILLS_AND_TOOLS, SECURITY and CONTRIBUTING) is the canonical reference for settings, commands and guarantees. The three root guides, QUICKSTART.md, MODEL_GUIDE.md and TECHNIQUES.md, remain the canonical task-oriented guides: first runs, model pairing and tuning, and small-model techniques. This README is the index, and CHANGELOG.md is the history. New reference prose goes to docs/, new walkthroughs go to the root guides, and each set links to the other instead of copying text.
Run pdc --help for every command, or pdc how "your question" for built-in help.
Machine clients can drive one warm session over stdio: pedacito rpc speaks
newline-delimited JSONL-RPC, and pedacito acp speaks JSON-RPC 2.0 Agent
Client Protocol for editors and agent hosts.
What's new in v0.5.2
Consolidated release combining v0.5.0 (modular architecture & startup performance), v0.5.1 (persistent sessions, Plan Mode, goal loop, blackboard & multi-language gates), and v0.5.2 (SDKs, CI workflows, MCP 2.0, web search, taint mode, registries, review artifacts, desktop shell, remote PWA, model adaptation & stratified scorecard):
| Feature | What you get | Read more |
|---|---|---|
| Modular core & faster startup (v0.5.0) | config, llm, loop, cli, and tui split into focused internal subpackages behind 100% compatible shims, plus native ES module GUI views (chat, plan, review, agents) with zero build step and zero Node.js. Strict lazy-loading (tree-sitter, requests, playwright, Pillow, keyring, pywebview), hot-path caching, single-pass checkpoints, quality gates, and perf_budget.json startup/prompt ceilings. |
CONTRIBUTING.md |
| SessionStore, Plan Mode & goal loop (v0.5.1) | Persistent SQLite SessionStore with branching/tree rendering, interactive Plan Mode (pdc plan, /plan, GUI Plan pane), context_manager folding, concurrent read batching, continuous goal_loop (pdc goal), auto-classified approvals, daemon blackboard messages/locks, --channels permission relay, and deterministic multi-language gates (Python, TS/JS, Rust, Go). |
USAGE.md |
| Python & JS SDKs + conformance (v0.5.2) | pedacito.sdk ships synchronous PedacitoClient and asyncio AsyncPedacitoClient over pedacito rpc; sdks/js/ is a zero-dependency external ESM client for Node 18+. Protocol 0.5.2 keeps every 0.4.0 frame and adds sdk_conformance, verified by a shared versioned fixture. |
USAGE.md |
| CI helpers & post-PR watcher (v0.5.2) | pdc issue, pdc review, pdc fix-ci, and pdc pr --watch plus GitHub Actions / GitLab CI recipes. pr --watch polls checks and review comments, stages bounded fixes in an isolated worktree, and writes .pedacito/pr_watch/<pr>/proposal_<id>.json without ever running git push. |
USAGE.md |
| MCP 2.0, web search & taint mode (v0.5.2) | MCP 2025-03-26 with OAuth 2.1 + PKCE keyring refresh, tool_search deferred loading (≤4 active tools), risk annotations, opt-in sampling/elicitation, and pdc mcp serve. Pluggable web_search (searxng, brave, tavily, exa, google, deepseek, ddg) with SSRF pinning + citations, paired with taint_mode quarantine for untrusted observations. |
SECURITY.md |
| Static registries & review artifacts (v0.5.2) | pdc pkg search and pdc pkg registry list|add|remove|sync verify tree SHA-256 and capability audits before installing. Interactive HTML/SVG review artifacts (diff_heatmap, coverage, diagram) render in an opaque-origin sandboxed iframe in the GUI and embed via pdc export --include-artifacts. |
USAGE.md |
| Standalone desktop app (v0.5.2) | pip install "pedacito[desktop]" and pdc gui open a native pywebview shell (Windows WebView2 / macOS WKWebView / Linux GTK-Qt) with native file/folder pickers, drag-and-drop paths, and pop-out windows; pdc gui --browser forces the browser GUI, and the desktop shell falls back automatically when unavailable. |
INSTALLATION.md |
| Secure remote workspace & mobile PWA (v0.5.2) | pdc serve --host ADDR --allow-remote --tls-self-signed serves the web GUI/PWA over TLS with one-time 8-char device pairing, short-lived HMAC tokens, CSRF, per-IP rate limiting, and read-only review by default; pdc connect user@host:/project opens an argv-only SSH tunnel. |
SECURITY.md |
| Model adaptation & stratified scorecard (v0.5.2) | pdc tune --from-traces analyzes redacted trajectories to propose .md/.txt skill/prompt diffs (never mutating .py code) gated by a statistical holdout guard; pdc bench --scorecard and pdc scorecard render produce stratified scorecard.json metrics across 4b-9b, 24b-32b-moe, and hosted-frontier on Python, TS/JS, Rust, and Go. |
USAGE.md |
Full notes: CHANGELOG.md.
What's new in v0.4.2
| Feature | What you get | Read more |
|---|---|---|
| Optional extras provisioner | pedacito deps shows each optional extra's installed/version state and installs one (pedacito deps install vision --yes), via pipx inject or pip install, always after confirmation and never through a shell. The GUI Settings dialog lists the same extras with a preview. |
USAGE.md |
| Default projects folder | default_projects_dir makes pedacito new NAME, the TUI /new and the GUI folder browser open new projects in one place. |
CONFIG.md |
| Stale-only recalibration | A Re-calibrate Stale Only button and compact profile-card chips (Fresh/Stale/Uncalibrated, tok/s, edit-clean%) re-measure only the local models whose card is missing or stale. | USAGE.md |
| Local cron scheduler | pedacito schedule runs local, cron-style tasks (list, add, remove, run-once, start) from a per-user schedules.json. Every run is worktree-isolated, D14 sandbox-gated and budget-capped. |
USAGE.md |
| Debounced file watcher | pedacito watch runs a task when matching files change, with a configurable debounce. The os.scandir snapshotter skips .git/, .pedacito/, node_modules/, .venv/, sensitive files and symlinks, and each triggered run goes through the same worktree + sandbox + budget guard. |
USAGE.md |
| Desktop & webhook notifications | notify_desktop, notify_bell, notify_gui and notify_webhook_url fire on done/failed/permission/budget events (redacted, desktop tools only). |
CONFIG.md |
| Prompt recipes | pedacito recipe list|show|run runs bundled review-pr, add-tests, fix-lint and explain-arch prompts, or your own .pedacito/recipes/*.toml; --var K=V fills placeholders and --dry-run prints offline. |
USAGE.md |
| Redacted doctor bundle | pedacito doctor --bundle [OUT_ZIP] writes a deterministic diagnostic ZIP with the environment, sandbox, extras, profiler snapshot and last five events, all redacted; no source, .env or raw secret is included. |
SECURITY.md |
| Safe mode | pdc --safe-mode <command> forces plan permissions and disables shell, writes, MCP, web, hooks, skills and project instructions; config files and PEDACITO_* cannot weaken it. |
CONFIG.md |
| Lean prompts & idle compaction | prompt_profile = "lean" keeps the system prompt and tool schema small (about 490 to 830 tokens against a 1,450-token budget in the quality gate); idle_compact_seconds compacts an idle session's context. |
CONFIG.md |
| Guided setup & offline bundles | pdc setup runs a guided first-run wizard; pdc models pull and pdc models serve need explicit consent. pdc bundle builds an air-gapped bundle, and pdc setup --offline installs from it. |
INSTALLATION.md |
| Agent View & background runs | pdc agents and pdc sessions, plus the GUI Agent View, list live sessions. --background runs a task in its own worktree, capped by max_parallel_sessions. |
USAGE.md |
| Package System v1 | pdc pkg manages packages with a lockfile and a capability audit. pdc trust --package pins a manifest. Custom commands take $ARGUMENTS and @file, /reload reloads them, and four starter packs ship with Pedacito. |
USAGE.md |
| Importers & nested instructions | pdc import dry-runs Claude, OpenCode, Pi and Cursor configuration. Path-scoped AGENTS.md, CLAUDE.md and GEMINI.md apply to the files beneath them. |
USAGE.md |
| Export, context & history | pdc export --format html|md|json writes redacted exports; pdc context and pdc history are new commands. |
SECURITY.md |
| Quality gates & supply chain | python scripts/quality_gate.py --all checks dead code, startup time and prompt budgets in CI. pdc redteam runs a deterministic red-team suite. Releases ship a CycloneDX SBOM through a Sigstore/SLSA workflow. |
CONTRIBUTING.md |
What's new in v0.4.0
| Feature | What you get | Read more |
|---|---|---|
| Isolated sessions | Concurrent sessions in one process share no config, index, events, permissions or budgets | ARCHITECTURE.md |
| Permission modes & approvals | permission_mode (plan, ask, accept-edits, workspace-write, danger) and approval_policy; a project's .pedacito/policy.toml only narrows, and only when trusted |
SECURITY.md |
| Windows sandbox | Commands run in a Job Object with a restricted token (win_restricted); unattended runs without a sandbox are refused |
SECURITY.md |
| Session daemon | pedacito daemon is a token-protected loopback service with per-session event replay |
USAGE.md |
| Parallel subagents | subagent_max_parallel bounds concurrent subagents; read-only roles stay read-only |
CONFIG.md |
| Package manifest | pedacito-package.toml declares what an extension or skill package needs |
SKILLS_AND_TOOLS.md |
| Prompt budget inspector | pedacito prompt --explain --last and the GUI Prompt tab show each request section's order, token count, counting method, hash and kept/pruned state. Reports store hashes/counts, never prompt text; --compare RUN_ID diffs ids/hashes/counts |
USAGE.md |
Full notes: CHANGELOG.md.
What's new in v0.3.3
| Feature | What you get | Read more |
|---|---|---|
| Agent Client Protocol bridge | pedacito acp speaks JSON-RPC 2.0 over stdio for editors and agent hosts: session/new, session/prompt with text, @file and image blocks, streamed session/update events and session/request_permission. It wraps the same warm engine as rpc, which gains --events and --describe. |
ACP bridge |
| Headless session daemon | pedacito daemon keeps one warm index and the model leases in a loopback-only HTTP/SSE server with isolated workspace sessions, bearer-token auth, attach/detach, permission and review routing, and clean quiesce/shutdown. pedacito daemon status exits 0 offline. |
CLI at a glance |
| Background supervision | ask/auto/new --background submits the task to the daemon (worktree-isolated by default, bounded by max_parallel_sessions) and prints the session id immediately; pedacito agents and pedacito sessions supervise the live sessions with list/attach/steer/cancel/diff. |
CLI at a glance |
| Rich zero-dependency TUI | Inline syntax-highlighted diffs, collapsible tool-call cards (Ctrl+O, /expand, /collapse), an @ fuzzy picker for files, symbols and images, and clickable SGR mouse zones for the language switch, sidebar tabs and scrollbar. |
tui |
| Local, LAN & Tailscale endpoints | One locality rule covers loopback, .local, RFC 1918, Tailscale/CGNAT (100.64.0.0/10), link-local and IPv6 ULA. Local cards without a calibrated temperature are marked stale for recalibration. |
Local endpoints |
| Small-model & sparse-MoE upgrades | tool_mode = "plain" (plain-word gather steps, A/B-tested by calibrate), an opt-in proactive_escalation router, shadow-tested best_of, and an interleaved pre-stop verifier. Oversized tool output spills to .pedacito/scratch/, which the model can read but never write. |
Configuration |
| Guided git, hardened | pedacito commit and pedacito pr run a secret pre-flight scan before every commit and PR, never push or force-push, and are shared by the TUI /git and the GUI Git drawer. undo refuses to rewind past a moved git HEAD without --force. |
Git and pull requests |
| Reliable runs & CLI polish | Pre-run checkpoints for divergent trees, restore --checkpoint, offline tree-sitter fallback with parsers prefetch, pedacito diag, models --profile/--model, new --no-complex, honest partial-batch semantics and a hard --max-minutes clamp. |
Offline parsers and diag |
| Deterministic codemods | pedacito codemod list/preview/apply runs one of 13 AST/tokenizer recipes (imports, print→logger, constant, annotation, parameter, try/context, move symbol/file, deprecated, re-export) with no model call. Preview is the default and writes nothing; apply needs allow_write and lands one atomic, snapshotted transaction. The agent gets the same catalogue as a gated codemod action. |
Deterministic codemods |
| GUI hardening | Partial-hunk review sign-off with per-hunk provenance, persistent thread cards, deterministic /compact handoffs, a responsive narrow layout, and quiet client disconnects. |
Review page |
| Windows PowerShell 5.1 note | On PowerShell 5.1, 2>&1 wraps stderr lines as error records; use 2>$null for clean JSON output. |
Windows stderr |
What's new in v0.3.2
| Feature | What you get | Read more |
|---|---|---|
| Interleaved execution | execution_mode picks two_phase, interleaved or auto. Interleaved runs keep one native tool-calling conversation (OpenAI tool_calls, Anthropic tool_use, JSON fallback, and Qwen3.5/3.8 / Strata XML <tool_call>), with dry runs staged in a shadow workspace. Set it per run with --execution-mode, or live with the TUI /mode. |
Configuration |
| Native Gemini & OpenAI Responses | gemini_native (on by default) uses Google's generateContent; openai_responses uses /v1/responses for o3, o4 and GPT-5 reasoning models. |
Configuration |
| Three-tier model catalog & keychain | Provider metadata, a 24 h models.dev cache and a built-in table supply context windows and prices. pedacito models refresh forces an update. api_key_keyring reads your OS keychain once pedacito[keyring] is installed. |
Configuration |
| Strata / Avalon onboarding & coexistence | A one-step preset at port 8080, an API key field in the scan, STRATA_API_KEY fallback, an API key required badge, and synchronous Lemonade ↔ Strata auto-evict across GUI, TUI and CLI. |
Model server setup |
| Live RAM/VRAM badge & pairing panel | The GUI hardware badge refreshes every 3 seconds and is pushed live. Local GPU VRAM is auto-detected on baseline reset/loopback scans while LAN profiles stay client-independent. The Dual-GPU / Scout + Architect Pairing panel starts collapsed. | GUI workspace |
| Hunk review & project shell rules | Accept individual hunks in the Changes pane. Allow in this project saves a narrow shell rule (shell_allowlist_by_project) for the current project only. |
Review page |
| Guided git & pull requests | pedacito commit scans the staged diff for secrets and commits locally, and pedacito pr drafts a grounded title/body and opens it with gh. Both never push. The TUI /git and the GUI Git drawer use the same pre-flight. |
Git and pull requests |
| GGUF calibration, temperatures & creative sway | Calibration infers base families for custom fine-tunes from runtime/GGUF headers (or cached HF metadata over LAN), adds a Quick/Full GUI mode picker, surfaces calibrated temperatures in Settings/config --check, and adds relative creative_temperature_delta sway. |
Configuration |
What's new in v0.3.1
| Feature | What you get | Read more |
|---|---|---|
| Bilingual EN / ES UI, TUI & docs | Switch the GUI with the EN/ES top-bar toggle, the TUI with F3 or /lang, the CLI with --lang es or PEDACITO_LANG. llm_reply_language controls the language of the model's explanations. Every guide has a Spanish edition. |
Language & localization |
Manage local packages with pdc pkg install PATH, pdc pkg audit NAME,
pdc pkg list, and pdc pkg uninstall NAME. Package code is not imported;
reviewed manifests can be pinned with pdc trust --package NAME_OR_PATH.
The TUI supports package command templates as /NAME and refreshes metadata
with /reload.
| Advanced system profiling & auto-tune | pedacito profile shows a vendor-neutral RAM/VRAM snapshot with a source per number (Linux sysfs, NVIDIA nvidia-smi, macOS vm_stat, Windows winapi), a cached prefill/generation probe and the active profile's tuning. auto_tune = true (opt-in) fits context, retrieval budgets and timeout to free memory; missing telemetry makes it abstain, and existing configs do not change. | System profiling and auto-tune |
| Context-aware auto-update | A quiet, opt-out release check: one anonymous PyPI GET at startup (2 s timeout, cached 24 h), a dismissible GUI banner with a streamed upgrade and Restart, pdc update --run, and the TUI /update. The command matches your install method (pipx, venv, pip --user, or git for editable checkouts). check_for_updates = false keeps Pedacito fully offline. | Upgrading |
| Local image generation | pedacito image and the GUI/TUI /image generate images on a local Lemonade Server, with calibration for image models. | Local image generation |
| Multimodal image input | Send PNG/JPEG/WebP/GIF to a vision model: --image PATH, GUI paste/drag-drop/📎 Attach, TUI /attach (4 images, 10 MB each). | Multimodal chat input |
| Native Anthropic prompt caching | anthropic_native = true (default) uses /v1/messages with explicit cache_control breakpoints, 5m/1h TTLs, native thinking, tools and images. | Hosted prompt caching |
| TUI multi-line composer | Shift+Enter, Alt+Enter, Ctrl+J or a trailing \ add newlines; bracketed paste keeps pasted blocks intact. | tui |
What's new in v0.3.0
| Feature | What you get | Read more |
|---|---|---|
| Cross-server VRAM manager | Treats all your local model servers as one pool. It shows which models are resident, loads and unloads them through each runtime's API, and evicts other servers before a run. | Server lifecycle manager |
| Strata local-moe | Tiered mixture-of-experts servers (Strata, Avalon) get their own execution profile: larger reply budgets, a 10-minute timeout and one stream at a time. | local-moe tier |
| SSE streaming | Tokens stream live over server-sent events, with a live reasoning drawer, a per-call heartbeat and a near-instant Stop. | Live telemetry |
| Security Guard | Scans for secrets before any hosted request (sk-, pypi-, ghp_, AWS and Google keys, PEM private keys), keeps sensitive files out of the model's reach, asks before risky actions, and runs commands in an OS sandbox. |
Security guide |
| Custom themes | Ten-token color schemes shared by the GUI and the TUI. Nine presets, your own saved schemes, and a per-project pin. | Color schemes |
@ pinning |
Write @file.py or @Class.method in a prompt to pin that exact code into every phase of the run. |
Pinning context |
| Checkpoint tree | Every run is checkpointed. Inspect each change as a unified diff, then roll back with pdc undo or pdc checkout. pedacito tree renders the branching session tree. |
Checkpoints and rollback |
| Hybrid routing | A strong architect model plans a task and a fast local editor implements it. On one GPU, the architect's server is evicted between the two stages. | Hybrid routing |
Contributing
Issues and pull requests are welcome; please open an issue before a large PR. See docs/CONTRIBUTING.md. The project website is pedacito.dev, and the maintainer can be reached at contact@pedacito.dev. Report security issues privately, as described in docs/SECURITY.md.
License
MIT, see LICENSE.
Metadata
Release files for pedacito 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pedacito-0.5.2.tar.gz | 4.5 MB | Without provenance | Details for pedacito-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pedacito-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for pedacito-0.5.2-py3-none-any.whl |
Total release size: 7.9 MB
Release files / pedacito-0.5.2.tar.gz
| Download URL | pedacito-0.5.2.tar.gz |
|---|---|
| Size | 4.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e26abcb251b26918e5ede325792284f07b1cc6b778d510f077c2d43ba9873cd
|
|
BLAKE2b-256 checksum How to use checksums |
cc10b9001dd5e5c64ef2671fe644ab9865d29e95c5f8381ee4e3ed7d7b02c0c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Release files / pedacito-0.5.2-py3-none-any.whl
| Download URL | pedacito-0.5.2-py3-none-any.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acdbd521aea9acde7430e231113e69cf7cf1832b9734fb9882fc36952204c61c
|
|
BLAKE2b-256 checksum How to use checksums |
dac1672d300405ef7b28590098a044d8146a9d0ae35206a9eb49eb21da47cb7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.12
|
Security for pedacito 0.5.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.