Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

PiChat

GengGeng174 downloads

Chat with Pi coding agent locally.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates3

Chat with the Pi coding agent inside Obsidian. Conversations render as native Obsidian markdown with full support for code highlighting, Mermaid diagrams, callouts, and wiki-links.

Desktop only. Requires Pi installed locally (npm i -g @earendil-works/pi-coding-agent).

System access: This plugin reads ~/.pi/agent/ (Pi's config directory) to discover providers, models, and session history. This requires accessing your home directory path via os.homedir().

English | 中文

Features

Chat View

  • Full streaming with live markdown rendering
  • Thinking blocks (expandable, auto-collapses when response starts)
  • Tool call results in collapsible details
  • Native text selection for chat history
  • Steering messages — send while the agent is working to redirect it
  • Abort button to cancel mid-stream
  • Image paste support (base64)
  • File attachment via @ picker

Session Management

  • Header bar — shows session name (click to rename), model, thinking level, and working directory
  • Session sidebar — browse, search, switch, delete, and export Pi's native .jsonl sessions
  • Message persistence — chat history survives session switches and plugin restarts
  • Auto-save — conversations saved as markdown notes to your vault on close
  • New Session button with auto-save of current conversation

Command Integration

  • / in chat input opens a command picker with Pi's available commands
  • Pi commands registered in Obsidian's command palette (Ctrl+P → Pi: /command-name)
  • Commands grouped by source (skill, extension, prompt template)
  • Commands re-fetched per connection (project-scoped)

Model Switching

  • Pi: Switch model command to pick from available models
  • Model and thinking level shown in header and status bar

Status Bar

  • Session name, model, token usage, and cost at a glance
  • Streaming indicator

Setup

  1. Install Pi globally
  2. Clone or download this repo
  3. npm install && npm run build
  4. Copy main.js, styles.css, and manifest.json to your vault's .obsidian/plugins/pi-plugin/
  5. Enable "Pi" in Obsidian → Settings → Community Plugins

Settings

Setting Default Description
Pi binary path pi Path to the Pi executable
Working directory vault root Working directory for Pi
Default provider (Pi default) LLM provider (anthropic, openai, google, etc.)
Default model (Pi default) Model name
Session save directory Pi-Sessions Vault directory for saved conversations
Persist sessions true Auto-save conversations as vault notes
Thinking level medium Reasoning level (none, low, medium, high)

Privacy & System Access

This plugin integrates with your existing Pi installation and needs access to:

Path Purpose
~/.pi/agent/models.json Discover available LLM providers and models
~/.pi/agent/sessions/ Browse and load your Pi conversation history
~/.pi/agent/prompts/ Custom prompt templates

These paths are resolved using os.homedir() to locate Pi's configuration directory. The plugin does not collect, transmit, or store any system identity information — it only uses these paths to read Pi's local config files.

Architecture

The plugin communicates with Pi via its RPC mode — spawns pi --mode rpc --no-session and exchanges JSON lines over stdin/stdout.

graph LR
    subgraph Obsidian
        View[Chat View]
        Header[Header Bar]
        Panel[Session Panel]
        Store[Message Store]
        Commands[Command Palette]
    end

    subgraph Pi Process
        RPC[RPC Server]
        LLM[LLM API]
        Tools[Tools]
        Sessions[Session Files<br/>.jsonl]
    end

    View -- JSON lines<br/>stdin/stdout --> RPC
    RPC -- streaming events --> View
    Panel -- scan .jsonl --> Sessions
    Store -. persist .-> View
    Commands -- get_commands --> RPC
    RPC --> LLM
    RPC --> Tools
    RPC --> Sessions

Key Modules

File Purpose
src/rpc.ts Spawn Pi process, JSON line protocol, request/response correlation
src/view.ts Chat view — header, messages, input, session panel integration
src/stream-handler.ts Process RPC events into ChatMessages (text deltas, tool calls, thinking)
src/renderer.ts Render messages as Obsidian markdown
src/session-scanner.ts Read Pi's native .jsonl session files
src/session-panel.ts Session browser sidebar
src/session-list.ts Session list modal for browsing saved conversations
src/message-store.ts Persistent message cache for session history
src/commands.ts / command suggest and palette registration
src/input.ts Chat input with auto-resize, paste, attachments
src/sessions.ts Save/load conversations as markdown vault notes
src/statusbar.ts Status bar with model, tokens, cost
src/settings.ts Plugin settings

Development

npm install
npm run dev    # watch mode
npm run build  # production build with type checking

Build output is main.js in the repo root. Copy it (along with styles.css and manifest.json) to your vault's plugin directory to test.

License

MIT

HealthExcellent
ReviewCaution
About
Chat with the Pi coding agent inside Obsidian (desktop only) using a locally installed Pi binary. Render conversations as native Markdown with code highlighting, Mermaid, callouts, wiki-links and live streaming, plus expandable thinking blocks, collapsible tool outputs, image paste and file attachments. Manage sessions with a sidebar and header, auto-save chats as Markdown notes, browse/export Pi sessions, and switch models and Pi commands.
AISidebarStatus bar
Details
Current version
0.2.8
Last updated
4 weeks ago
Created
3 months ago
Updates
3 releases
Downloads
174
Compatible with
Obsidian 1.13.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
GengGenggengyabc
GitHubgengyabc
  1. Community
  2. Plugins
  3. AI
  4. PiChat

Related plugins

HiNote

Add comments to highlighted notes, use AI for thinking, and flashcards for memory.

Claude Sidebar

Run Claude Code in your sidebar.

OpenClaw

Chat with your OpenClaw AI agent in a sidebar. Your vault is the agent's workspace.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Copilot

Your AI Copilot: Chat with Your Second Brain, Learn Faster, Work Smarter.

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Vertical Tabs

Offer an alternative view that displays open tabs vertically, allowing users to group and organize tabs for a better navigation experience.

TagFolder

Show tags as folder.