Documentation

Everything you need to run and debug Scubiee.

Written so you, or any chatbot you paste this into, can install, wire MCP, and fix issues without eng notes. Local-first: your code stays on your machine.

01

How it works

Scubiee is a local context engine for AI coding tools (Cursor, Claude Code, Kiro, Copilot, and more). You need Python 3.11+. You do not need to clone the GitHub repo. Install from PyPI.

It indexes your repository, embeds code with CodeRank (GPU when available), and exposes one MCP tool, map, with two modes: find and focus (plus gate/status for health). Your source stays on your machine; only the embedding model downloads once during setup (~270 MB).

Scubiee runs a local daemon that maintains an index of each enrolled repository: parsed structure, chunks, embedding vectors, and graph relationships. A thin MCP server connects your AI tool. When the agent asks “where is billing handled?”, Scubiee returns ranked locations (map find) and focused code spans with their wiring (map focus), not guessed filenames. Incremental sync keeps the index fresh after edits and git pull.

The four layers

Most problems mean one layer is missing or stale. Why agents say managed: false: layer 3 or 4 is missing, not a broken index by itself.

LayerQuestionCommandMarker
1. InstallIs scubiee installed?uv tool install scubieescubiee --version
2. Machine setupGPU/CPU + model ready?scubiee setup --repair~/.scubiee/accel.json
3. IDE wiringDoes agent call MCP?scubiee connect --cursorMCP config + rules
4. Repo enrollmentIs this folder indexed?scubiee init .<repo>/.scubiee/id.json

Your AI tool (Cursor / Kiro / Claude Code / …)

↓ MCP (stdio): server name: scubiee

Scubiee MCP: gate/status (health) · map (find | focus)

↓ HTTP localhost (default :8765)

Scubiee Engine: daemon + live re-indexing

↓

Your code index: vectors + graph + chunks under ~/.scubiee

Memorize this sequence

StepCommandWhat it does
1uv tool install scubieeInstall the CLI
2scubiee setup --repairMachine setup: GPU/CPU/MLX, model, accel.json
3scubiee connect --…Write MCP + agent rules for your IDE, once per IDE
4scubiee init .Enroll + index this repo, repeat for every repo
5Reload MCP in the IDEAgent status() → managed: true
  • connect wires your IDE once; init enrolls and indexes each repo. You need both, and init is the step you repeat per repo.
  • setup alone does not make a repo managed. You still need init inside the project.
  • Adding another repo only needs init (and Special-4 connect inside that project).

Core concepts

OperationScopeWhen
scubiee setup --repairMachine: GPU/CPU/MLX, model, accel.jsonOnce per machine; after upgrade
scubiee connect --<tool>MCP + agent rulesEach IDE; Special-4 inside each project
scubiee init <path>Per-repo enroll + indexEach searchable repo (repeat)

Managed states

  • Unmanaged: never initialized; use native tools
  • Managed / active: enrolled and indexed; MCP tools available
  • Paused: enrolled but sync blocked; run scubiee activate .
  • Wiped: all Scubiee data removed; back to unmanaged

The problem without Scubiee

  • Discovery noise: agents grep broadly, read wrong files, or hallucinate paths.
  • Stale context: files changed since the chat started; the agent does not know.
  • No shared index: every session re-explores the repo from scratch.
  • Cloud search tradeoffs: uploading code raises privacy and compliance concerns.
  • DIY RAG complexity: embeddings, chunking, incremental sync, and MCP wiring takes weeks.

Profile selection (why setup picks a profile)

MachineTypical profileWhy
Windows + discrete AMD/NVIDIAdmlDirectML FP16 embed
Windows + Intel iGPU onlycpuDML on iGPU hangs or fails; CPU is reliable
Apple SiliconmlxMetal FP16 path
Linux + NVIDIAcudaCUDA ORT
Everything elsecpuSafe default

What the daemon does

A local HTTP service (default http://127.0.0.1:8765) serves search, grep, and index operations to MCP and CLI. It runs background sync for enrolled repos, respects RAM admission and embed batching, and is restarted by a lightweight watchdog if it crashes. A small local service keeps your index warm and answers search requests in milliseconds.

Time expectations

StepTypical duration
Install1–3 minutes
Setup (incl. model download)3–10 minutes first time
Init small repo (~100 files)1–5 minutes
Init large monorepoMinutes to tens of minutes; may need --confirm
ConnectSeconds

Facts any assistant needs

Paste this page (or the topic you care about) into ChatGPT / Claude / etc. These facts prevent wrong advice:

  • Product CLI + MCP server key = scubiee (not “context-engine”).
  • MCP surface is one tool map with configs find and focus (+ gate/status for health). map find when you don't know where code is; map focus when you know the symbol name. There are no separate grep/glob/workspace MCP tools; those are the agent's native tools.
  • Data lives under ~/.scubiee and <repo>/.scubiee.
  • Order: setup → connect → reload MCP → init (per repo). setup + connect are one-time; init repeats per repo. Skipping either leaves agents unmanaged.
  • Continue after pause/stop with scubiee resume. There is no wake command.
  • Windows Access denied on upgrade → scubiee unlock-tool, not Admin/reboot.
  • machine_not_setup / missing FastEmbed → scubiee setup --repair.
  • Share scubiee diagnose --no-tests --desktop → Desktop/scubiee-diagnose.json (not your source tree).

Bots that cannot read this page? Fetch /docs.md (full markdown) or /llms.txt (index). Structured JSON: /docs.json.

Still stuck?

Collect scubiee --version, setup --status, doctor ., and diagnose --no-tests --desktop. Paste this docs page (or the Troubleshooting topic) plus Desktop/scubiee-diagnose.json into ChatGPT / Claude with a short description of the failing command, or open a GitHub issue with the same bundle. Optionally attach a tail of ~/.scubiee/engine.log.

Open an issue ↗