Pimate

approved

by 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.

ā˜… 5 stars↓ 433 downloadsUpdated 25d agoGPL-3.0

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.

Active Release License

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.

  1. Install Node.js 18+ (if not already installed)
  2. Install Pi globally:
    npm install -g --ignore-scripts @earendil-works/pi-coding-agent
    
  3. 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
    
  4. Verify Pi works:
    pi --version
    

Installation

From Obsidian Community Plugins (once approved)

  1. Open Obsidian → Settings → Community plugins
  2. Search for Pimate
  3. Click Install, then Enable

Manual (BRAT / development)

  1. Enable BRAT plugin in Obsidian
  2. Add gorazenxu/pimate
  3. Or clone this repo into .obsidian/plugins/pimate/ and run npm install && npm run build

Quick Start

  1. Click the π icon in the left ribbon, or run Open Pimate Chat from the command palette
  2. Wait for the status bar to show "Ready"
  3. Type your question and press Enter
  4. 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 (or Send current file to Pimate command)
  • 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

ProviderAuth
Anthropic (Claude)API key or subscription
OpenAI (GPT / Codex)API key or subscription
Google GeminiAPI key
DeepSeekAPI key
MiniMaxAPI key
SiliconFlowAPI key
Volcengine / DoubaoEndpoint ID
Others supported by PiAPI key

Configuration

Settings are available in Obsidian → Settings → Pimate:

SettingDescription
Pi executable pathPath to pi CLI (default: pi)
Default ProviderLLM provider for new sessions
Default ModelModel ID (e.g., claude-sonnet-4-20250514)
Thinking levelReasoning intensity (off/minimal/low/medium/high/xhigh)
System promptPrefix added to every user message
SnippetsReusable prompt templates
API keysConfigure per-provider via the settings tab
LanguageChinese 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

ShortcutAction
EnterSend message
Shift+EnterNew line
EscAbort streaming
Ctrl/Cmd+KCommands / Skills
Ctrl/Cmd+NNew session
Ctrl/Cmd+Shift+EToggle last tool output
Ctrl/Cmd+Shift+DJump 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 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.

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 --version in 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.