
obsidian-ai-starter
Claudian alternative at 1/10 the cost — Pi agent inside Obsidian, BYOK, auto-saves to vault.
Obsidian AI Starter

English | 中文
A small, reproducible setup that brings the Pi coding agent into an existing Obsidian vault on Windows or macOS.
It gives you:
- an AI chat panel inside Obsidian;
- bounded Obsidian vault tools through
pi-obsidian-vault; - Markdown copies of conversations in
Pi-Sessions/; - your choice of Pi-supported model provider, using your own account or API key.
This repository is an installer and integration layer. It does not fork Pi or the Obsidian plugin.
Platform support
| Platform | Installer | Status |
|---|---|---|
| Windows 10/11 | scripts/setup.ps1 | Supported |
| macOS | scripts/setup.sh | Supported |
| Linux | — | Not currently supported |
| Obsidian mobile | — | Not supported |
Prerequisites
- Obsidian Desktop and an existing vault
- Node.js
>= 22.19.0 - npm
- Git
- Windows only: Git for Windows, which provides the bash shell required by Pi
- a Pi-supported subscription or API key
The installers never ask for or store your API key.
Install
Clone this repository, then run the installer for your platform.
macOS
git clone https://github.com/alexliu072903-bit/obsidian-ai-starter.git
cd obsidian-ai-starter
chmod +x scripts/setup.sh
./scripts/setup.sh --vault "/absolute/path/to/your/Obsidian Vault"
Windows
git clone https://github.com/alexliu072903-bit/obsidian-ai-starter.git
cd obsidian-ai-starter
Set-ExecutionPolicy -Scope Process Bypass
.\scripts\setup.ps1 -VaultPath "D:\path\to\your\Obsidian Vault"
The installer:
- verifies the selected folder is an Obsidian vault;
- verifies Node.js, npm, Git, and the platform requirements;
- installs a pinned Pi release and
pi-obsidian-vault; - fetches a pinned
obsidian-pi-plugincommit; - applies the cross-platform compatibility patch and builds the plugin;
- prepares all three plugin files and validates/merges existing settings in a temporary candidate;
- publishes into
.obsidian/plugins/pi-plugin/, recording the Pi binary path while retaining custom settings and unrelated plugin files.
Any failed native command stops the installer. Temporary build files are isolated and removed when the script exits.
Reinstallation and failure recovery
- Existing settings must be a valid JSON object. Unknown fields, already-set defaults (including
false/null) and unrelated plugin files are preserved.piBinaryPathis updated to this installation's Pi path. - Patch/build failures, missing artifacts or invalid settings leave the installed plugin/settings untouched. Before publication the old files are checked again. Ordinary copy/replace failures restore this run's published files while preserving later user edits.
- If restoration fails, the backup location is reported and retained. Four-file publication is not a power-loss or forced-kill transaction; inspect the plugin files and rerun after such an interruption.
- Global Pi/vault-tool installation happens before plugin publication and is not rolled back when the plugin fails. An optional backup failure also leaves the successfully installed plugin in place.
Finish in Obsidian
- Open the vault in Obsidian Desktop.
- Go to Settings → Community plugins and enable community plugins.
- Enable the Pi plugin.
- Go to Settings → General → Advanced → Command line interface, enable it, then choose Register for PATH.
- Open a terminal, run
pi, then use/loginto select a subscription or API-key provider. - In Obsidian, open the command palette and run Pi: Open chat.
Test the integration:
Find my notes about <topic> and summarize the relevant context.
If Pi cannot find the vault, run this inside Pi:
/obsidian-vault set-vault /absolute/path/to/your/Obsidian Vault
Optional private GitHub backup
GitHub backup is disabled by default. Only use an empty private repository.
macOS
./scripts/setup.sh \
--vault "/absolute/path/to/your/Obsidian Vault" \
--github-url "https://github.com/username/private-vault.git" \
--push
Windows
.\scripts\setup.ps1 `
-VaultPath "D:\path\to\your\Obsidian Vault" `
-GitHubUrl "https://github.com/username/private-vault.git" `
-PushToGitHub
Before pushing, the installer:
- refuses a non-empty remote;
- refuses to replace an existing mismatched
origin; - previews candidate backup files using a disposable index;
- requires you to type
push.
Existing repositories keep their current branch and every ref; a non-main branch is never renamed and another main ref is never replaced. Only new repos start main. Detached HEAD, a parent repository, pre-staged input, an origin conflict or a non-empty remote is refused before Git writes. Cancelling confirmation stages/pushes nothing. Backup success requires push exit 0; failures retain the local commit for retry. Existing history is pushed too: ignore rules do not clean history. Confirm that history may leave your machine. Existing .gitignore is preserved; newly created rules exclude only some internals and do not scan for secrets.
The installer cannot verify whether a GitHub repository is private. Confirm that yourself before approving the push.
Security boundary
Pi is a local coding agent, not a vault sandbox. It runs with the filesystem, shell, network, and credential permissions of your user account. The working directory is the vault, but that does not prevent Pi from accessing other paths available to your account.
Review requests before allowing changes, keep private notes out of public repositories, and use a container or VM if you need a real isolation boundary.
See the official Pi security documentation.
Pinned components
| Component | Version/ref |
|---|---|
@earendil-works/pi-coding-agent | 0.82.1 |
pi-obsidian-vault | 0.2.3 |
sigilmakes/obsidian-pi-plugin | 3ccd701160009d256528ee7794e80ee95b380a74 |
Pinning keeps installations reproducible. Version changes should be tested on Windows and macOS before these values are updated.
Validation scope
bash tests/test-macos-installer.sh exercises real Node settings merge, temporary Git repositories and local bare remotes. Only network/npm/Pi/build boundaries are replaced. tests/test-windows-installer.ps1 exercises real PowerShell JSON merge and Git. CI defines Windows PowerShell 5.1, PowerShell 7 and macOS Bash jobs; Windows results require the corresponding CI run. These fixtures do not start user Obsidian, access a real vault, download external dependencies or verify login/chat integration.
License
MIT
How to Install
- Download the ZIP or clone the repository
- Open the folder as a vault in Obsidian (File → Open Vault)
- Obsidian will prompt you to install required plugins
Stats
Stars
0
Forks
0
License
MIT
Last updated 1d ago
Categories
Tags