Get Started/Installation Guide

Installation Guide

One-liners and source compilation procedures

Quick Install

macOS / Linux / WSL:
curl -sSL https://raw.githubusercontent.com/farhankhan197/ghost/main/install.sh | bash
Windows (PowerShell 7+):
irm https://raw.githubusercontent.com/farhankhan197/ghost/main/install.ps1 | iex

Requires PowerShell 7+. If you're on Windows PowerShell 5.1, build from source instead.

npm:
npm install -g ghost-ai

Build From Source

Ghost uses CMake and C++20. The only system dependency is libcurl. No package manager required beyond that.

Source Code
git clone https://github.com/farhankhan197/ghost.git
cd ghost
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/ghost install

Activate in a Repository

Once the binary is installed, enable tracking in any project:

$ ghost install

This sets up:

  • A post-commit hook at .git/hooks/post-commit that writes notes on every commit.
  • An opencode plugin at .opencode/plugins/ghost.ts for session tracking.
  • Git configuration to push refs/notes/ghost and refs/notes/ghost-verified automatically.