@zircote/subcog
v0.14.7
Published
A persistent memory system for AI coding assistants
Maintainers
Readme
@zircote/subcog
A persistent memory system for AI coding assistants.
Installation
# Using npm
npm install -g @zircote/subcog
# Using npx (run without installing)
npx @zircote/subcog --help
# Using pnpm
pnpm add -g @zircote/subcog
# Using yarn
yarn global add @zircote/subcogUsage
# Show help
subcog --help
# Check version
subcog --version
# Capture a memory
subcog capture --namespace learnings "Important learning about X"
# Search memories
subcog search "query terms"
# Start MCP server
subcog mcp serveSupported Platforms
| Platform | Architecture | Binary | |----------|--------------|--------| | macOS | Intel (x86_64) | Pre-built | | macOS | Apple Silicon (arm64) | Pre-built | | Linux | x86_64 (glibc) | Pre-built | | Linux | x86_64 (musl/Alpine) | Pre-built | | Linux | ARM64 | Pre-built | | Windows | x64 | Cargo fallback |
Security & Transparency
Postinstall Script
This package includes a postinstall script that automatically downloads and installs the appropriate pre-built binary for your platform. This is a common pattern used by packages like esbuild, turbo, and prisma that distribute native binaries via npm.
What the postinstall script does:
- Detects your platform and architecture
- Downloads the matching pre-built binary from GitHub Releases
- Verifies the download using SHA256 checksums
- Extracts the binary to
node_modules/@zircote/subcog/bin/ - Falls back to
cargo installif download fails
Security measures:
- ✅ Source code is open: View postinstall.js
- ✅ Checksum verification: SHA256 checksums verify binary integrity
- ✅ Official releases only: Downloads only from GitHub Releases
- ✅ No arbitrary code execution: Script only downloads and extracts binaries
- ✅ Transparent operations: All network requests are logged
- ✅ Opt-out available: Use
SUBCOG_SKIP_INSTALL=1to skip installation
To skip the postinstall script:
# Skip automatic installation
SUBCOG_SKIP_INSTALL=1 npm install -g @zircote/subcog
# Then provide your own binary
export SUBCOG_BINARY_PATH=/path/to/your/subcog
npm install -g @zircote/subcogTo audit the installation process:
# Review the postinstall script source on GitHub
# https://github.com/zircote/subcog/blob/main/npm/scripts/postinstall.js
# Or view it locally after installation
cat node_modules/@zircote/subcog/scripts/postinstall.jsInstallation Methods
This package uses a multi-tier installation strategy:
- Pre-built binaries (fastest): Downloads from GitHub Releases with checksum verification
- cargo install (fallback): Builds from crates.io if binary unavailable
- cargo install --git (last resort): Builds from source repository
Environment Variables
| Variable | Description |
|----------|-------------|
| SUBCOG_SKIP_INSTALL | Set to 1 to skip binary installation |
| SUBCOG_BINARY_PATH | Path to a custom binary location |
Alternative Installation Methods
Homebrew (macOS)
brew tap zircote/tap
brew install subcogCargo (Rust)
cargo install subcogFrom Source
cargo install --git https://github.com/zircote/subcog.gitTroubleshooting
Binary not found after installation
If you see "subcog binary not found" errors:
Try reinstalling:
npm uninstall -g @zircote/subcog npm install -g @zircote/subcogCheck if Rust is installed for fallback compilation:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shDownload the binary manually from GitHub Releases
Network issues during installation
If you're behind a proxy or firewall:
- Set the
SUBCOG_SKIP_INSTALL=1environment variable - Download the binary manually
- Set
SUBCOG_BINARY_PATHto the binary location
License
MIT
