Pi-Memory supports:
- macOS
- Linux
- Windows
If a matching prebuilt binary is present, install is copy-only. If not, install falls back to compiling from source.
- Pi installed (
piCLI)
- Node.js 18.17+
- a C compiler
- macOS:
cc/clang - Linux:
cc/clang/gcc - Windows: Visual Studio
cl,clang, orgcc
- macOS:
SQLite is bundled via the amalgamation (
native/sqlite3.c+native/sqlite3.h). No system SQLite package is required.
pi install git:github.com/SiliconState/Pi-MemoryThis path installs:
extensions/pi-memory-compact.tsskills/memory/SKILL.mdprompts/*.md- the native binary via
postinstall
Verify:
~/.pi/memory/pi-memory --version$env:USERPROFILE\.pi\memory\pi-memory.exe --versionThe package layout is ready for npm and bun, even though public npm publishing is not live yet.
Examples:
npm install github:SiliconState/Pi-Memory
bun add github:SiliconState/Pi-MemoryImportant:
- npm/bun installs run
postinstall, which invokesscripts/setup.mjs - this is useful for package QA and direct native installation
- it does not replace
pi installif you want Pi to register the extension/skill/prompt metadata
curl -fsSL https://raw.githubusercontent.com/SiliconState/Pi-Memory/main/scripts/install.sh | bashNotes:
- Unix only
- calls
pi install ... - if the binary is still missing afterward, it runs the package
setup.mjsfallback
~/.pi/memory/pi-memory
~/.pi/memory/memory.db
%USERPROFILE%\.pi\memory\pi-memory.exe
%USERPROFILE%\.pi\memory\memory.db
Override binary location with PI_MEMORY_BIN.
export PI_MEMORY_BIN=/custom/path/pi-memory$env:PI_MEMORY_BIN = 'C:\custom\path\pi-memory.exe'On this branch, macOS prebuilds are committed in prebuilds/.
Linux and Windows are supported through:
- release/CI-built prebuilds when available
- source compilation fallback otherwise
You can inspect the expected layout in prebuilds/README.md.
Run the package setup explicitly:
npm run setupOr with bun:
bun run setupIf that still fails, verify that:
- Node.js is installed
- a supported C compiler is available
- your shell can execute the compiler directly
npm run doctor
npm run test:smokeSet PI_MEMORY_BIN explicitly.
PKG="$HOME/.pi/agent/git/github.com/SiliconState/Pi-Memory"
[ -d "$PKG" ] || PKG="$HOME/.pi/git/github.com/SiliconState/Pi-Memory"
mkdir -p "$HOME/.pi/memory"
cc -Wall -Wextra -Wpedantic -O2 -std=c11 \
-o "$HOME/.pi/memory/pi-memory" \
"$PKG/native/pi-memory.c" "$PKG/native/sqlite3.c" -lm
chmod +x "$HOME/.pi/memory/pi-memory"PKG="$HOME/.pi/agent/git/github.com/SiliconState/Pi-Memory"
[ -d "$PKG" ] || PKG="$HOME/.pi/git/github.com/SiliconState/Pi-Memory"
mkdir -p "$HOME/.pi/memory"
cc -Wall -Wextra -Wpedantic -O2 -std=c11 \
-o "$HOME/.pi/memory/pi-memory" \
"$PKG/native/pi-memory.c" "$PKG/native/sqlite3.c" -lpthread -ldl -lm
chmod +x "$HOME/.pi/memory/pi-memory"$pkg = "$env:USERPROFILE\.pi\agent\git\github.com\SiliconState\Pi-Memory"
if (-not (Test-Path $pkg)) { $pkg = "$env:USERPROFILE\.pi\git\github.com\SiliconState\Pi-Memory" }
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.pi\memory" | Out-Null
cl /nologo /O2 /W3 /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE `
/Fe:"$env:USERPROFILE\.pi\memory\pi-memory.exe" `
"$pkg\native\pi-memory.c" "$pkg\native\sqlite3.c"$pkg = "$env:USERPROFILE\.pi\agent\git\github.com\SiliconState\Pi-Memory"
if (-not (Test-Path $pkg)) { $pkg = "$env:USERPROFILE\.pi\git\github.com\SiliconState\Pi-Memory" }
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.pi\memory" | Out-Null
clang -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -Wall -Wextra -Wpedantic -O2 -std=c11 `
-o "$env:USERPROFILE\.pi\memory\pi-memory.exe" `
"$pkg\native\pi-memory.c" "$pkg\native\sqlite3.c" -lm