{"type":"session","version":3,"id":"019d9855-7c4b-76d6-91c7-c0c3b19c0d0b","timestamp":"2026-04-16T22:07:12.460Z","cwd":"/home/sebas"}
{"type":"model_change","id":"12a3f639","parentId":null,"timestamp":"2026-04-16T22:07:12.638Z","provider":"openai-codex","modelId":"gpt-5.4"}
{"type":"thinking_level_change","id":"f8cb4502","parentId":"12a3f639","timestamp":"2026-04-16T22:07:12.638Z","thinkingLevel":"off"}
{"type":"message","id":"7b8e6e95","parentId":"f8cb4502","timestamp":"2026-04-16T22:07:19.114Z","message":{"role":"user","content":[{"type":"text","text":"que es pi"}],"timestamp":1776377239109}}
{"type":"message","id":"bf5f4937","parentId":"7b8e6e95","timestamp":"2026-04-16T22:07:22.025Z","message":{"role":"assistant","content":[{"type":"toolCall","id":"call_HPf9gkBQfgt4J7Lm1b9SoEhN|fc_00188103d551036a0169e15d99e69c819690f11c427402b3e4","name":"read","arguments":{"path":"/home/sebas/.npm-global/lib/node_modules/@mariozechner/pi-coding-agent/README.md","offset":1,"limit":220}},{"type":"toolCall","id":"call_6YBTsX4bRn4RAhCYpH4T7BKP|fc_00188103d551036a0169e15d99e6ac8196b2131566d75105d4","name":"read","arguments":{"path":"/home/sebas/.npm-global/lib/node_modules/@mariozechner/pi-coding-agent/docs/packages.md","offset":1,"limit":220}}],"api":"openai-codex-responses","provider":"openai-codex","model":"gpt-5.4","usage":{"input":2882,"output":104,"cacheRead":0,"cacheWrite":0,"totalTokens":2986,"cost":{"input":0.0072050000000000005,"output":0.00156,"cacheRead":0,"cacheWrite":0,"total":0.008765}},"stopReason":"toolUse","timestamp":1776377239121,"responseId":"resp_00188103d551036a0169e15d97b2b88196b341aa54da60bad7"}}
{"type":"message","id":"573c569a","parentId":"bf5f4937","timestamp":"2026-04-16T22:07:22.139Z","message":{"role":"toolResult","toolCallId":"call_HPf9gkBQfgt4J7Lm1b9SoEhN|fc_00188103d551036a0169e15d99e69c819690f11c427402b3e4","toolName":"read","content":[{"type":"text","text":"<p align=\"center\">\n  <a href=\"https://shittycodingagent.ai\">\n    <img src=\"https://shittycodingagent.ai/logo.svg\" alt=\"pi logo\" width=\"128\">\n  </a>\n</p>\n<p align=\"center\">\n  <a href=\"https://discord.com/invite/3cU7Bz4UPx\"><img alt=\"Discord\" src=\"https://img.shields.io/badge/discord-community-5865F2?style=flat-square&logo=discord&logoColor=white\" /></a>\n  <a href=\"https://www.npmjs.com/package/@mariozechner/pi-coding-agent\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/@mariozechner/pi-coding-agent?style=flat-square\" /></a>\n  <a href=\"https://github.com/badlogic/pi-mono/actions/workflows/ci.yml\"><img alt=\"Build status\" src=\"https://img.shields.io/github/actions/workflow/status/badlogic/pi-mono/ci.yml?style=flat-square&branch=main\" /></a>\n</p>\n<p align=\"center\">\n  <a href=\"https://pi.dev\">pi.dev</a> domain graciously donated by\n  <br /><br />\n  <a href=\"https://exe.dev\"><img src=\"docs/images/exy.png\" alt=\"Exy mascot\" width=\"48\" /><br />exe.dev</a>\n</p>\n\n> New issues and PRs from new contributors are auto-closed by default. Maintainers review auto-closed issues daily. See [CONTRIBUTING.md](../../CONTRIBUTING.md).\n\n---\n\nPi is a minimal terminal coding harness. Adapt pi to your workflows, not the other way around, without having to fork and modify pi internals. Extend it with TypeScript [Extensions](#extensions), [Skills](#skills), [Prompt Templates](#prompt-templates), and [Themes](#themes). Put your extensions, skills, prompt templates, and themes in [Pi Packages](#pi-packages) and share them with others via npm or git.\n\nPi ships with powerful defaults but skips features like sub agents and plan mode. Instead, you can ask pi to build what you want or install a third party pi package that matches your workflow.\n\nPi runs in four modes: interactive, print or JSON, RPC for process integration, and an SDK for embedding in your own apps. See [openclaw/openclaw](https://github.com/openclaw/openclaw) for a real-world SDK integration.\n\n## Share your OSS coding agent sessions\n\nIf you use pi for open source work, please share your coding agent sessions.\n\nPublic OSS session data helps improve models, prompts, tools, and evaluations using real development workflows.\n\nFor the full explanation, see [this post on X](https://x.com/badlogicgames/status/2037811643774652911).\n\nTo publish sessions, use [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). Read its README.md for setup instructions. All you need is a Hugging Face account, the Hugging Face CLI, and `pi-share-hf`.\n\nYou can also watch [this video](https://x.com/badlogicgames/status/2041151967695634619), where I show how I publish my `pi-mono` sessions.\n\nI regularly publish my own `pi-mono` work sessions here:\n\n- [badlogicgames/pi-mono on Hugging Face](https://huggingface.co/datasets/badlogicgames/pi-mono)\n\n## Table of Contents\n\n- [Quick Start](#quick-start)\n- [Providers & Models](#providers--models)\n- [Interactive Mode](#interactive-mode)\n  - [Editor](#editor)\n  - [Commands](#commands)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [Message Queue](#message-queue)\n- [Sessions](#sessions)\n  - [Branching](#branching)\n  - [Compaction](#compaction)\n- [Settings](#settings)\n- [Context Files](#context-files)\n- [Customization](#customization)\n  - [Prompt Templates](#prompt-templates)\n  - [Skills](#skills)\n  - [Extensions](#extensions)\n  - [Themes](#themes)\n  - [Pi Packages](#pi-packages)\n- [Programmatic Usage](#programmatic-usage)\n- [Philosophy](#philosophy)\n- [CLI Reference](#cli-reference)\n\n---\n\n## Quick Start\n\n```bash\nnpm install -g @mariozechner/pi-coding-agent\n```\n\nAuthenticate with an API key:\n\n```bash\nexport ANTHROPIC_API_KEY=sk-ant-...\npi\n```\n\nOr use your existing subscription:\n\n```bash\npi\n/login  # Then select provider\n```\n\nThen just talk to pi. By default, pi gives the model four tools: `read`, `write`, `edit`, and `bash`. The model uses these to fulfill your requests. Add capabilities via [skills](#skills), [prompt templates](#prompt-templates), [extensions](#extensions), or [pi packages](#pi-packages).\n\n**Platform notes:** [Windows](docs/windows.md) | [Termux (Android)](docs/termux.md) | [tmux](docs/tmux.md) | [Terminal setup](docs/terminal-setup.md) | [Shell aliases](docs/shell-aliases.md)\n\n---\n\n## Providers & Models\n\nFor each built-in provider, pi maintains a list of tool-capable models, updated with every release. Authenticate via subscription (`/login`) or API key, then select any model from that provider via `/model` (or Ctrl+L).\n\n**Subscriptions:**\n- Anthropic Claude Pro/Max\n- OpenAI ChatGPT Plus/Pro (Codex)\n- GitHub Copilot\n- Google Gemini CLI\n- Google Antigravity\n\n**API keys:**\n- Anthropic\n- OpenAI\n- Azure OpenAI\n- Google Gemini\n- Google Vertex\n- Amazon Bedrock\n- Mistral\n- Groq\n- Cerebras\n- xAI\n- OpenRouter\n- Vercel AI Gateway\n- ZAI\n- OpenCode Zen\n- OpenCode Go\n- Hugging Face\n- Kimi For Coding\n- MiniMax\n\nSee [docs/providers.md](docs/providers.md) for detailed setup instructions.\n\n**Custom providers & models:** Add providers via `~/.pi/agent/models.json` if they speak a supported API (OpenAI, Anthropic, Google). For custom APIs or OAuth, use extensions. See [docs/models.md](docs/models.md) and [docs/custom-provider.md](docs/custom-provider.md).\n\n---\n\n## Interactive Mode\n\n<p align=\"center\"><img src=\"docs/images/interactive-mode.png\" alt=\"Interactive Mode\" width=\"600\"></p>\n\nThe interface from top to bottom:\n\n- **Startup header** - Shows shortcuts (`/hotkeys` for all), loaded AGENTS.md files, prompt templates, skills, and extensions\n- **Messages** - Your messages, assistant responses, tool calls and results, notifications, errors, and extension UI\n- **Editor** - Where you type; border color indicates thinking level\n- **Footer** - Working directory, session name, total token/cache usage, cost, context usage, current model\n\nThe editor can be temporarily replaced by other UI, like built-in `/settings` or custom UI from extensions (e.g., a Q&A tool that lets the user answer model questions in a structured format). [Extensions](#extensions) can also replace the editor, add widgets above/below it, a status line, custom footer, or overlays.\n\n### Editor\n\n| Feature | How |\n|---------|-----|\n| File reference | Type `@` to fuzzy-search project files |\n| Path completion | Tab to complete paths |\n| Multi-line | Shift+Enter (or Ctrl+Enter on Windows Terminal) |\n| Images | Ctrl+V to paste (Alt+V on Windows), or drag onto terminal |\n| Bash commands | `!command` runs and sends output to LLM, `!!command` runs without sending |\n\nStandard editing keybindings for delete word, undo, etc. See [docs/keybindings.md](docs/keybindings.md).\n\n### Commands\n\nType `/` in the editor to trigger commands. [Extensions](#extensions) can register custom commands, [skills](#skills) are available as `/skill:name`, and [prompt templates](#prompt-templates) expand via `/templatename`.\n\n| Command | Description |\n|---------|-------------|\n| `/login`, `/logout` | OAuth authentication |\n| `/model` | Switch models |\n| `/scoped-models` | Enable/disable models for Ctrl+P cycling |\n| `/settings` | Thinking level, theme, message delivery, transport |\n| `/resume` | Pick from previous sessions |\n| `/new` | Start a new session |\n| `/name <name>` | Set session display name |\n| `/session` | Show session info (path, tokens, cost) |\n| `/tree` | Jump to any point in the session and continue from there |\n| `/fork` | Create a new session from the current branch |\n| `/compact [prompt]` | Manually compact context, optional custom instructions |\n| `/copy` | Copy last assistant message to clipboard |\n| `/export [file]` | Export session to HTML file |\n| `/share` | Upload as private GitHub gist with shareable HTML link |\n| `/reload` | Reload keybindings, extensions, skills, prompts, and context files (themes hot-reload automatically) |\n| `/hotkeys` | Show all keyboard shortcuts |\n| `/changelog` | Display version history |\n| `/quit` | Quit pi |\n\n### Keyboard Shortcuts\n\nSee `/hotkeys` for the full list. Customize via `~/.pi/agent/keybindings.json`. See [docs/keybindings.md](docs/keybindings.md).\n\n**Commonly used:**\n\n| Key | Action |\n|-----|--------|\n| Ctrl+C | Clear editor |\n| Ctrl+C twice | Quit |\n| Escape | Cancel/abort |\n| Escape twice | Open `/tree` |\n| Ctrl+L | Open model selector |\n| Ctrl+P / Shift+Ctrl+P | Cycle scoped models forward/backward |\n| Shift+Tab | Cycle thinking level |\n| Ctrl+O | Collapse/expand tool output |\n| Ctrl+T | Collapse/expand thinking blocks |\n\n### Message Queue\n\nSubmit messages while the agent is working:\n\n- **Enter** queues a *steering* message, delivered after the current assistant turn finishes executing its tool calls\n- **Alt+Enter** queues a *follow-up* message, delivered only after the agent finishes all work\n- **Escape** aborts and restores queued messages to editor\n- **Alt+Up** retrieves queued messages back to editor\n\nOn Windows Terminal, `Alt+Enter` is fullscreen by default. Remap it in [docs/terminal-setup.md](docs/terminal-setup.md) so pi can receive the follow-up shortcut.\n\nConfigure delivery in [settings](docs/settings.md): `steeringMode` and `followUpMode` can be `\"one-at-a-time\"` (default, waits for response) or `\"all\"` (delivers all queued at once). `transport` selects provider transport preference (`\"sse\"`, `\"websocket\"`, or `\"auto\"`) for providers that support multiple transports.\n\n---\n\n## Sessions\n\nSessions are stored as JSONL files with a tree structure. Each entry has an `id` and `parentId`, enabling in-place branching without creating new files. See [docs/session.md](docs/session.md) for file format.\n\n### Management\n\n\n[397 more lines in file. Use offset=221 to continue.]"}],"isError":false,"timestamp":1776377242074}}
{"type":"message","id":"b7f2d294","parentId":"573c569a","timestamp":"2026-04-16T22:07:22.162Z","message":{"role":"toolResult","toolCallId":"call_6YBTsX4bRn4RAhCYpH4T7BKP|fc_00188103d551036a0169e15d99e6ac8196b2131566d75105d4","toolName":"read","content":[{"type":"text","text":"> pi can help you create pi packages. Ask it to bundle your extensions, skills, prompt templates, or themes.\n\n# Pi Packages\n\nPi packages bundle extensions, skills, prompt templates, and themes so you can share them through npm or git. A package can declare resources in `package.json` under the `pi` key, or use conventional directories.\n\n## Table of Contents\n\n- [Install and Manage](#install-and-manage)\n- [Package Sources](#package-sources)\n- [Creating a Pi Package](#creating-a-pi-package)\n- [Package Structure](#package-structure)\n- [Dependencies](#dependencies)\n- [Package Filtering](#package-filtering)\n- [Enable and Disable Resources](#enable-and-disable-resources)\n- [Scope and Deduplication](#scope-and-deduplication)\n\n## Install and Manage\n\n> **Security:** Pi packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action including running executables. Review source code before installing third-party packages.\n\n```bash\npi install npm:@foo/bar@1.0.0\npi install git:github.com/user/repo@v1\npi install https://github.com/user/repo  # raw URLs work too\npi install /absolute/path/to/package\npi install ./relative/path/to/package\n\npi remove npm:@foo/bar\npi list    # show installed packages from settings\npi update  # update all non-pinned packages\n```\n\nBy default, `install` and `remove` write to global settings (`~/.pi/agent/settings.json`). Use `-l` to write to project settings (`.pi/settings.json`) instead. Project settings can be shared with your team, and pi installs any missing packages automatically on startup.\n\nTo try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only:\n\n```bash\npi -e npm:@foo/bar\npi -e git:github.com/user/repo\n```\n\n## Package Sources\n\nPi accepts three source types in settings and `pi install`.\n\n### npm\n\n```\nnpm:@scope/pkg@1.2.3\nnpm:pkg\n```\n\n- Versioned specs are pinned and skipped by `pi update`.\n- Global installs use `npm install -g`.\n- Project installs go under `.pi/npm/`.\n- Set `npmCommand` in `settings.json` to pin npm package lookup and install operations to a specific wrapper command such as `mise` or `asdf`.\n\nExample:\n\n```json\n{\n  \"npmCommand\": [\"mise\", \"exec\", \"node@20\", \"--\", \"npm\"]\n}\n```\n\n### git\n\n```\ngit:github.com/user/repo@v1\ngit:git@github.com:user/repo@v1\nhttps://github.com/user/repo@v1\nssh://git@github.com/user/repo@v1\n```\n\n- Without `git:` prefix, only protocol URLs are accepted (`https://`, `http://`, `ssh://`, `git://`).\n- With `git:` prefix, shorthand formats are accepted, including `github.com/user/repo` and `git@github.com:user/repo`.\n- HTTPS and SSH URLs are both supported.\n- SSH URLs use your configured SSH keys automatically (respects `~/.ssh/config`).\n- For non-interactive runs (for example CI), you can set `GIT_TERMINAL_PROMPT=0` to disable credential prompts and set `GIT_SSH_COMMAND` (for example `ssh -o BatchMode=yes -o ConnectTimeout=5`) to fail fast.\n- Refs pin the package and skip `pi update`.\n- Cloned to `~/.pi/agent/git/<host>/<path>` (global) or `.pi/git/<host>/<path>` (project).\n- Runs `npm install` after clone or pull if `package.json` exists.\n\n**SSH examples:**\n```bash\n# git@host:path shorthand (requires git: prefix)\npi install git:git@github.com:user/repo\n\n# ssh:// protocol format\npi install ssh://git@github.com/user/repo\n\n# With version ref\npi install git:git@github.com:user/repo@v1.0.0\n```\n\n### Local Paths\n\n```\n/absolute/path/to/package\n./relative/path/to/package\n```\n\nLocal paths point to files or directories on disk and are added to settings without copying. Relative paths are resolved against the settings file they appear in. If the path is a file, it loads as a single extension. If it is a directory, pi loads resources using package rules.\n\n## Creating a Pi Package\n\nAdd a `pi` manifest to `package.json` or use conventional directories. Include the `pi-package` keyword for discoverability.\n\n```json\n{\n  \"name\": \"my-package\",\n  \"keywords\": [\"pi-package\"],\n  \"pi\": {\n    \"extensions\": [\"./extensions\"],\n    \"skills\": [\"./skills\"],\n    \"prompts\": [\"./prompts\"],\n    \"themes\": [\"./themes\"]\n  }\n}\n```\n\nPaths are relative to the package root. Arrays support glob patterns and `!exclusions`.\n\n### Gallery Metadata\n\nThe [package gallery](https://shittycodingagent.ai/packages) displays packages tagged with `pi-package`. Add `video` or `image` fields to show a preview:\n\n```json\n{\n  \"name\": \"my-package\",\n  \"keywords\": [\"pi-package\"],\n  \"pi\": {\n    \"extensions\": [\"./extensions\"],\n    \"video\": \"https://example.com/demo.mp4\",\n    \"image\": \"https://example.com/screenshot.png\"\n  }\n}\n```\n\n- **video**: MP4 only. On desktop, autoplays on hover. Clicking opens a fullscreen player.\n- **image**: PNG, JPEG, GIF, or WebP. Displayed as a static preview.\n\nIf both are set, video takes precedence.\n\n## Package Structure\n\n### Convention Directories\n\nIf no `pi` manifest is present, pi auto-discovers resources from these directories:\n\n- `extensions/` loads `.ts` and `.js` files\n- `skills/` recursively finds `SKILL.md` folders and loads top-level `.md` files as skills\n- `prompts/` loads `.md` files\n- `themes/` loads `.json` files\n\n## Dependencies\n\nThird party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When pi installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically.\n\nPi bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `\"*\"` range and do not bundle them: `@mariozechner/pi-ai`, `@mariozechner/pi-agent-core`, `@mariozechner/pi-coding-agent`, `@mariozechner/pi-tui`, `@sinclair/typebox`.\n\nOther pi packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Pi loads packages with separate module roots, so separate installs do not collide or share modules.\n\nExample:\n\n```json\n{\n  \"dependencies\": {\n    \"shitty-extensions\": \"^1.0.1\"\n  },\n  \"bundledDependencies\": [\"shitty-extensions\"],\n  \"pi\": {\n    \"extensions\": [\"extensions\", \"node_modules/shitty-extensions/extensions\"],\n    \"skills\": [\"skills\", \"node_modules/shitty-extensions/skills\"]\n  }\n}\n```\n\n## Package Filtering\n\nFilter what a package loads using the object form in settings:\n\n```json\n{\n  \"packages\": [\n    \"npm:simple-pkg\",\n    {\n      \"source\": \"npm:my-package\",\n      \"extensions\": [\"extensions/*.ts\", \"!extensions/legacy.ts\"],\n      \"skills\": [],\n      \"prompts\": [\"prompts/review.md\"],\n      \"themes\": [\"+themes/legacy.json\"]\n    }\n  ]\n}\n```\n\n`+path` and `-path` are exact paths relative to the package root.\n\n- Omit a key to load all of that type.\n- Use `[]` to load none of that type.\n- `!pattern` excludes matches.\n- `+path` force-includes an exact path.\n- `-path` force-excludes an exact path.\n- Filters layer on top of the manifest. They narrow down what is already allowed.\n\n## Enable and Disable Resources\n\nUse `pi config` to enable or disable extensions, skills, prompt templates, and themes from installed packages and local directories. Works for both global (`~/.pi/agent`) and project (`.pi/`) scopes.\n\n## Scope and Deduplication\n\nPackages can appear in both global and project settings. If the same package appears in both, the project entry wins. Identity is determined by:\n\n- npm: package name\n- git: repository URL without ref\n- local: resolved absolute path\n"}],"isError":false,"timestamp":1776377242148}}
{"type":"message","id":"a6b536ab","parentId":"b7f2d294","timestamp":"2026-04-16T22:07:26.864Z","message":{"role":"assistant","content":[{"type":"text","text":"Pi es un **agente de código para terminal**.\n\nCaveman say:\n- Pi live in terminal.\n- You talk to pi with plain words.\n- Pi can **leer archivos**, **editar código**, **crear archivos** y **correr comandos bash**.\n- Pi meant to be **minimal** and **extensible**.\n\nSegún la doc:\n- trae herramientas base: `read`, `write`, `edit`, `bash`\n- se puede extender con:\n  - **skills**\n  - **extensions**\n  - **prompt templates**\n  - **themes**\n  - **pi packages**\n\nTambién puede correr en varios modos:\n- interactivo en terminal\n- salida texto/JSON\n- modo RPC\n- SDK para meterlo en otras apps\n\nEn una frase:\n**Pi es un harness minimalista para usar modelos como agentes de programación desde la terminal.**\n\nSi quieres, yo te explico también:\n1. **cómo usar pi día a día**, o  \n2. **cómo está hecho por dentro**.","textSignature":"{\"v\":1,\"id\":\"msg_00188103d551036a0169e15d9ae7e481969ffa85e753c4a441\",\"phase\":\"final_answer\"}"}],"api":"openai-codex-responses","provider":"openai-codex","model":"gpt-5.4","usage":{"input":4553,"output":213,"cacheRead":2816,"cacheWrite":0,"totalTokens":7582,"cost":{"input":0.0113825,"output":0.003195,"cacheRead":0.000704,"cacheWrite":0,"total":0.0152815}},"stopReason":"stop","timestamp":1776377242163,"responseId":"resp_00188103d551036a0169e15d9a763881968392a5ec14876d26"}}
