Installation Guide
Local Brain can be installed in several ways. Choose the method that works best for your setup.
Quick Install (Recommended)
Homebrew (macOS/Linux)
Dependencies (fzf and ripgrep) are required and will be suggested automatically:
Verification:
Alternative Installation Methods
Go Install (All Platforms)
If you have Go 1.21+ installed:
Make sure $(go env GOPATH)/bin is in your PATH:
Add this to your shell config (~/.bashrc, ~/.zshrc, etc.) to make it permanent.
Pre-built Binaries
Download the latest release for your platform from the releases page.
Linux
# AMD64
curl -LO https://github.com/SanderMoon/local-brain/releases/latest/download/brain_Linux_x86_64.tar.gz
tar -xzf brain_Linux_x86_64.tar.gz
sudo mv brain /usr/local/bin/
# ARM64
curl -LO https://github.com/SanderMoon/local-brain/releases/latest/download/brain_Linux_arm64.tar.gz
tar -xzf brain_Linux_arm64.tar.gz
sudo mv brain /usr/local/bin/
macOS
# Intel Mac
curl -LO https://github.com/SanderMoon/local-brain/releases/latest/download/brain_Darwin_x86_64.tar.gz
tar -xzf brain_Darwin_x86_64.tar.gz
sudo mv brain /usr/local/bin/
# Apple Silicon
curl -LO https://github.com/SanderMoon/local-brain/releases/latest/download/brain_Darwin_arm64.tar.gz
tar -xzf brain_Darwin_arm64.tar.gz
sudo mv brain /usr/local/bin/
Build from Source
For a local installation (installs to ~/.local/bin instead of /usr/local/bin):
Make sure ~/.local/bin is in your PATH:
Dependencies
Local Brain requires fzf and ripgrep for core functionality. Additional tools are optional but recommended.
| Tool | Required | Purpose | Installation |
|---|---|---|---|
| fzf | ✅ Yes | Fuzzy finder for interactive selection | brew install fzf |
| ripgrep | ✅ Yes | Fast text search | brew install ripgrep |
| bat | Optional | Syntax-highlighted file preview | brew install bat |
| tmux | Optional | Dev mode workspace management | brew install tmux |
| jq | Optional | JSON processing for scripts | brew install jq |
| syncthing | Optional | Cross-device synchronization | brew install syncthing |
Install All Dependencies
macOS:
Ubuntu/Debian:
Arch Linux:
Fedora/RHEL:
Shell Integration
Shell Completion
Local Brain supports shell completion for bash, zsh, and fish.
Bash
Add to your ~/.bashrc:
Or install system-wide:
Zsh
Add to your ~/.zshrc:
Or install to zsh completions directory:
Fish
Brain Prompt Helper
Display active brain in your shell prompt (optional).
Add to your ~/.bashrc or ~/.zshrc:
# Source the prompt helper
source /usr/local/lib/brain/brain-prompt.sh
# Add to your PS1 (bash) or PROMPT (zsh)
# Example for bash:
PS1='$(brain_prompt)[\u@\h \W]\$ '
# Example for zsh:
PROMPT='$(brain_prompt)%n@%h %1~ %# '
This displays [brain: work] when a brain is active.
First Run
After installation, initialize your first brain:
This will:
- Create the configuration directory at
~/.config/brain - Prompt you for your brain's location (default:
~/brains/default) - Set up the directory structure:
- Create a symlink at
~/brain→~/brains/default
Quick Test
Verify everything works:
Environment Variables
Customize storage locations by setting environment variables in your shell config:
# Root directory for all brains (default: ~/brains)
export BRAIN_ROOT="$HOME/Dropbox/Brains"
# Location of the active brain symlink (default: ~/brain)
export BRAIN_SYMLINK="$HOME/Desktop/ActiveBrain"
# Config directory (default: ~/.config/brain)
export BRAIN_CONFIG_DIR="$HOME/.config/brain"
Updating
Homebrew
Go Install
Manual Update
Download and install the latest release following the pre-built binaries instructions above.
Troubleshooting
Binary not found after installation
Make sure the installation directory is in your PATH:
- Go install: Add
$(go env GOPATH)/binto PATH - Local install: Add
~/.local/binto PATH - System install:
/usr/local/binshould already be in PATH
Add to your shell config (~/.bashrc, ~/.zshrc, etc.):
Then reload your shell:
Permission denied
If you get permission errors during system installation:
Or use make dev-install for a user-local installation that doesn't require sudo.
Dependencies not found
Brain requires fzf and ripgrep. Install them:
# macOS
brew install fzf ripgrep
# Ubuntu/Debian
sudo apt install fzf ripgrep
# Arch Linux
sudo pacman -S fzf ripgrep
Homebrew tap not found
If brew install brain fails, ensure you've tapped the repository first:
Uninstallation
Homebrew
System Installation
Or manually:
Local Installation
Remove All Data
To completely remove all brains and configuration:
Warning: This permanently deletes all your notes and tasks. Back up first if needed.
Next Steps
- Return to the Quickstart Guide for usage examples
- Read the Command Reference for complete documentation
- Check the Development Guide if you want to contribute
Getting Help
- Issues: https://github.com/SanderMoon/local-brain/issues
- Discussions: https://github.com/SanderMoon/local-brain/discussions
- Documentation: https://sandermoon.github.io/local-brain/