Pimate
approvedby Gorazen
Pimate embeds Pi Coding Agent into Obsidian as an AI collaborator for your vault. - This plugin has not been manually reviewed by Obsidian staff.
Pimate ā Pi Coding Agent for Obsidian
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.
Features
- š¤ Built-in chat ā AI assistant in the right panel, streaming output
- š Vault-aware ā
@-mention any file or folder for context - š§ Full toolset ā Read, write, edit, grep, find, bash ā all inside your vault
- šØ Inline edit ā Send editor selections to AI, preview and apply diffs
- š Thinking blocks ā Optional model reasoning display
- š Session stats ā Token usage, cost, and context meter
- šļø Multi-provider ā Claude, GPT, Gemini, DeepSeek, MiniMax, and more
- š¼ļø Image support ā Paste or drag-drop images for multimodal models
- š¦ Snippets ā Reusable prompt templates with variables
- š·ļø Session tabs ā Multiple conversations side by side
- š Context compaction ā Summarize long sessions to save tokens
- š Bilingual UI ā Chinese / English
Prerequisites
Pimate is a hybrid plugin that runs a local Pi Coding Agent process in the background.
- Install Node.js 18+ (if not already installed)
- Install Pi globally:
npm install -g --ignore-scripts @earendil-works/pi-coding-agent - Configure an API key (choose one):
# Claude (subscription or API key) export ANTHROPIC_API_KEY=sk-ant-... # Or use Pi's built-in login flow: pi /login # Then select provider - Verify Pi works:
pi --version
Installation
From Obsidian Community Plugins (once approved)
- Open Obsidian ā Settings ā Community plugins
- Search for Pimate
- Click Install, then Enable
Manual (BRAT / development)
- Enable BRAT plugin in Obsidian
- Add
gorazenxu/pimate - Or clone this repo into
.obsidian/plugins/pimate/and runnpm install && npm run build
Quick Start
- Click the Ļ icon in the left ribbon, or run Open Pimate Chat from the command palette
- Wait for the status bar to show "Ready"
- Type your question and press
Enter - Watch the response stream in real time
Tips
- Attach files: Type
@in the input box to search and attach vault files or folders - Current note: Click
šā Attach current note (orSend current file to Pimatecommand) - Selected text: Highlight text in a note, right-click ā Send selection to Pimate
- Quick actions: Click
āÆin the header for the action menu - Switch model: Click the model name in the footer bar
- History panel: Click the
šicon to browse past conversations
Screenshots
(Add screenshots here)
Supported Providers
| 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 |
Configuration
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 |
How It Works
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.
Keyboard Shortcuts
| 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 |
Building from Source
git clone https://github.com/gorazenxu/pimate.git
cd pimate
npm install
npm run build # production build
npm run dev # watch mode
Security & Permissions
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 thepiCLI in RPC mode and to run explicit skill-management commands from the settings page. The Pi agent may use shell tools such asbash,grep, andfindwhen 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.
Reporting Issues
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:
- Pimate version ā Settings ā About, or the tag in the releases list
- Obsidian version ā Settings ā About
- OS ā Windows / macOS / Linux + version
- Pi version ā run
pi --versionin your terminal - Provider + model ā e.g.
minimax-cn / MiniMax-M3 - Reproduction steps ā minimal example that triggers the bug
- Console logs ā open DevTools (
Ctrl+Shift+I/Cmd+Option+I) ā Console tab; copy errors and the red stack traces
For Pi-backend / RPC / model-related problems, check the Pi Coding Agent repo first ā they may already be tracked there.
License
GNU General Public License v3.0
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.