No description
Find a file
2026-07-11 02:38:22 +08:00
.github 修(option-chip): 收紧到「列表+紧跟选择问句」才渲染 2026-06-21 14:47:19 +08:00
docs Pimate v1.0.10 — rename from Pisidian to Pimate 2026-06-05 00:33:04 +08:00
.gitattributes Add .gitattributes for cross-platform line endings 2026-06-17 01:06:50 +08:00
.gitignore chore: gitignore local working note docs/thinking-issue-summary.md 2026-06-26 16:51:47 +08:00
.gitmessage 修(option-chip): 收紧到「列表+紧跟选择问句」才渲染 2026-06-21 14:47:19 +08:00
CHANGELOG.md 优(model-sync): 以 Pi getState() 为权威数据源,思考档位弹窗按 thinkingLevelMap 动态渲染 2026-07-11 02:38:04 +08:00
esbuild.config.mjs Fix Obsidian marketplace review issues 2026-06-05 23:22:51 +08:00
LICENSE Switch license from MIT to GPL-3.0-only 2026-06-03 00:08:24 +08:00
main.js 优(model-sync): 以 Pi getState() 为权威数据源,思考档位弹窗按 thinkingLevelMap 动态渲染 2026-07-11 02:38:04 +08:00
main.ts 修:修复 provider 与思考显示状态 2026-06-21 18:03:12 +08:00
manifest.json Bump to v1.0.45 2026-07-11 02:38:22 +08:00
package-lock.json Bump to v1.0.38 2026-06-21 18:03:26 +08:00
package.json Bump to v1.0.45 2026-07-11 02:38:22 +08:00
PiAgentClient.ts 优(model-sync): 以 Pi getState() 为权威数据源,思考档位弹窗按 thinkingLevelMap 动态渲染 2026-07-11 02:38:04 +08:00
PiAgentSettings.ts 优(model-sync): 以 Pi getState() 为权威数据源,思考档位弹窗按 thinkingLevelMap 动态渲染 2026-07-11 02:38:04 +08:00
PiAgentView.ts 优(model-sync): 以 Pi getState() 为权威数据源,思考档位弹窗按 thinkingLevelMap 动态渲染 2026-07-11 02:38:04 +08:00
README.md 修(option-chip): 收紧到「列表+紧跟选择问句」才渲染 2026-06-21 14:47:19 +08:00
release.sh release.sh: check next version, not current, for tag collision 2026-06-15 14:48:50 +08:00
styles.css 新(smart-review): 智能审核——Agent 长任务自检与自动继续 2026-07-09 09:21:39 +08:00
sync-plugin.sh Tighten option chip parser: only explicit numbered lists with question prompt 2026-06-21 14:06:30 +08:00
tsconfig.json Initial commit — Pisidian v1.0.8 2026-06-03 00:01:08 +08:00
version-bump.mjs Initial commit — Pisidian v1.0.8 2026-06-03 00:01:08 +08:00
versions.json Bump to v1.0.45 2026-07-11 02:38:22 +08:00

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

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