Gorazen448 downloadsPimate embeds Pi Coding Agent into Obsidian as an AI collaborator for your vault.
Pimate embeds Pi Coding Agent into Obsidian as an AI collaborator for your vault. Chat directly with AI, read and edit vault files, execute commands — all without leaving Obsidian.
@-mention any file or folder for contextPimate is a hybrid plugin that runs a local Pi Coding Agent process in the background.
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
# Claude (subscription or API key)
export ANTHROPIC_API_KEY=sk-ant-...
# Or use Pi's built-in login flow:
pi
/login # Then select provider
pi --version
gorazenxu/pimate.obsidian/plugins/pimate/ and run npm install && npm run buildEnter@ in the input box to search and attach vault files or folders📎 → Attach current note (or Send current file to Pimate command)⋯ in the header for the action menu🕘 icon to browse past conversations(Add screenshots here)
| Provider | Auth |
|---|---|
| Anthropic (Claude) | API key or subscription |
| OpenAI (GPT / Codex) | API key or subscription |
| Google Gemini | API key |
| DeepSeek | API key |
| MiniMax | API key |
| SiliconFlow | API key |
| Volcengine / Doubao | Endpoint ID |
| Others supported by Pi | API key |
Settings are available in Obsidian → Settings → Pimate:
| Setting | Description |
|---|---|
| Pi executable path | Path to pi CLI (default: pi) |
| Default Provider | LLM provider for new sessions |
| Default Model | Model ID (e.g., claude-sonnet-4-20250514) |
| Thinking level | Reasoning intensity (off/minimal/low/medium/high/xhigh) |
| System prompt | Prefix added to every user message |
| Snippets | Reusable prompt templates |
| API keys | Configure per-provider via the settings tab |
| Language | Chinese or English UI |
Obsidian Plugin (TypeScript)
├── main.ts — Plugin entry, commands, views
├── PiAgentView.ts — Chat UI, streaming, events
├── PiAgentClient.ts — Pi RPC client (JSONL over stdio)
├── PiAgentSettings.ts — Settings and OAuth flows
└── styles.css — Claudian-inspired chat styles
Pimate launches Pi as a child process in RPC mode (--mode rpc) and communicates via JSONL messages over stdin/stdout. Pi's full toolset (read, write, edit, bash, grep, find, ls) is available to the model through this interface.
| Shortcut | Action |
|---|---|
Enter |
Send message |
Shift+Enter |
New line |
Esc |
Abort streaming |
Ctrl/Cmd+K |
Commands / Skills |
Ctrl/Cmd+N |
New session |
Ctrl/Cmd+Shift+E |
Toggle last tool output |
Ctrl/Cmd+Shift+D |
Jump to last diff |
Alt+↑ / Alt+↓ |
Previous / Next message |
git clone https://github.com/gorazenxu/pimate.git
cd pimate
npm install
npm run build # production build
npm run dev # watch mode
Pimate uses a few sensitive capabilities so it can act as a local coding/writing agent:
Direct file-system access (fs) — used to read local Pi configuration/session files, inspect skill folders, and read files you attach as context. Pimate is desktop-only and runs locally.
Command execution (child_process) — used to spawn the pi CLI in RPC mode and to run explicit skill-management commands from the settings page. The Pi agent may use shell tools such as bash, grep, and find when you ask it to work on files.
Vault enumeration — used to find Markdown files/folders for context pickers, history/session helpers, and folder attachment features.
Clipboard access — used only for explicit copy actions, such as copying generated commands, diffs, authentication codes, or modal content.
Because Pimate embeds a local agent, review commands and edits before approving them. Your API keys and vault content are handled locally by the plugin/Pi CLI except for requests you intentionally send to your selected AI provider.
Found a bug or have a feature request? Open an issue:
👉 github.com/gorazenxu/pimate/issues
Before opening a bug report, please collect the following:
pi --version in your terminalminimax-cn / MiniMax-M3Ctrl+Shift+I / Cmd+Option+I) → Console tab; copy errors and the red stack tracesFor Pi-backend / RPC / model-related problems, check the Pi Coding Agent repo first — they may already be tracked there.
GNU General Public License v3.0