pane 3 — docsinstall · configure · run

Onboarding
& reference.

Two commands per machine, two per repo. Runs on macOS and Linux, amd64 and arm64. Windows support is planned. Setup is split between a user-level install (once per machine) and a per-repo init (once per repo) — codebase-agnostic stuff lives in ~/.claude/, ~/.gemini/, etc., so it isn't duplicated into every repo.

macOS · amd64 + arm64 Linux · amd64 + arm64 sigstore-signed SLSA Level 3 VirusTotal 0/91 Go 1.21+ · CGO
§01 · installonce per machine

Install the binary.

The installer detects your OS and arch, downloads the signed release tarball, verifies SHA256 against checksums.txt (and cosign if installed), drops the binary in $HOME/.local/bin, and adds it to your shell rc. Re-runs upgrade in place. No silent sudo.

# preferred — one line, signed
$ curl -fsSL https://get.gortex.dev | sh

# homebrew
$ brew install zzet/tap/gortex

# package managers (linux)
$ apt install ./gortex_amd64.deb
$ dnf install ./gortex_amd64.rpm
$ apk add --allow-untrusted ./gortex_amd64.apk

# go install (CGO required for tree-sitter)
$ go install github.com/zzet/gortex/cmd/gortex@latest

$gortex install

One-time machine setup. Writes user-level MCP wiring + skills + slash commands so they aren't duplicated into every repo.

$ gortex install                      # interactive-free
$ gortex install --start --track     # also spawn the daemon and track cwd
$ gortex install --no-hooks          # skip user-level hook installation

Files written:

  • ~/.claude.json — MCP server config for Claude Code
  • ~/.claude/skills/gortex-* — tool-usage skills
  • ~/.claude/commands/gortex-*.md — slash commands
  • ~/.gemini/antigravity/ — Knowledge Items
  • (optional) user-level Claude Code hooks
§02 · initonce per repo

Wire up your repo.

Per-repo init detects every coding agent in scope and writes the right config. It also generates per-community SKILL.md files so Claude Code can auto-route to the right cluster of code.

$ cd ~/projects/myapp
$ gortex init                             # writes .mcp.json, CLAUDE.md, hooks
$ gortex init --analyze                   # also index first for a richer CLAUDE.md
$ gortex init --no-skills                 # skip community-routing generation
$ gortex init --skills-min-size 5 --skills-max 10
$ gortex init --hooks-only                # (re)install repo-local hooks only
$ gortex init --no-hooks                  # full init, skip hooks

Files written per repo:

  • .mcp.json — workspace MCP wiring
  • .claude/settings.json + settings.local.json
  • CLAUDE.md — codebase overview + community routing
  • .claude/skills/generated/ — per-community SKILL.md
  • marker-guarded community block in every other detected agent's instruction file (AGENTS.md, .windsurfrules, GEMINI.md, .cursor/rules/gortex-communities.mdc, etc.)
Tip · Re-run gortex init after adding a new agent to your toolchain. The marker-guarded blocks won't clobber your hand-written content.
§03 · runthree deployment shapes

Pick a deployment shape.

Same binary, three modes. mcp for one editor over stdio. server for an HTTP API. daemon for one shared graph across every editor window.

A gortex mcp

Per-repo MCP server over stdio. Auto-detects daemon; falls back to embedded mode if the daemon isn't running. The simplest setup — one editor, one repo, one process.

B gortex server

HTTP / SSE on :4747. Versioned /v1/* JSON API exposing every MCP tool, plus /v1/graph and /v1/events SSE. Default --bind 127.0.0.1 runs unauthenticated on localhost only; non-localhost binds require --auth-token or $GORTEX_SERVER_TOKEN. CORS configurable.

C gortex daemon

Single shared process holding the graph for every tracked repo. Each Claude Code / Cursor / Kiro window connects as a thin stdio proxy over a Unix socket. Per-client session isolation; cross-repo queries by default.

D gortex mcp + watch

Same as A with live fsnotify-driven re-indexing. Edits stream into the graph without a manual reload. Pair with --no-daemon to force embedded mode.

# Run the MCP server standalone (auto-detects daemon via stdio)
$ gortex mcp --index /path/to/repo --watch
$ gortex mcp --no-daemon --watch          # explicit embedded mode

# HTTP API on :4747
$ gortex server --index .
$ gortex server --auth-token "$GORTEX_SERVER_TOKEN"

# Daemon lifecycle
$ gortex daemon start --detach          # spawn in background
$ gortex daemon status                  # PID, uptime, memory, tracked repos, sessions
$ gortex daemon stop                    # graceful shutdown + final snapshot
$ gortex daemon restart
$ gortex daemon reload                  # re-read config, pick up new/removed repos
$ gortex daemon logs -n 50

# Auto-start at login (launchd on macOS, systemd --user on Linux)
$ gortex daemon install-service
$ gortex daemon service-status
$ gortex daemon uninstall-service
§04 · configurationtwo-tier hierarchy

Global config + per-repo config.

Gortex uses a two-tier config: a global file at ~/.config/gortex/config.yaml for projects and the repo roster, and a per-repo .gortex.yaml for guards, excludes, and local overrides.

~/.config/gortex/config.yaml

projects:
  api:
    repos:
      - path: ~/projects/api-server
        workspace: api
      - path: ~/projects/api-client
        workspace: api
  infra:
    repos:
      - path: ~/projects/terraform
active_project: api
daemon:
  socket: ~/.gortex/server.sock
  log_file: ~/.gortex/daemon.log

./.gortex.yaml

workspace: api           # the hard graph boundary for cross-repo work
project:   api           # optional sub-bucket inside workspace
excludes:
  - "vendor/**"
  - "node_modules/**"
  - "**/*.generated.go"
guards:
  - name: no-internal-from-external
    kind: boundary
    deny: { from: "pkg/**", to: "internal/**" }
  - name: handler-tests-must-co-change
    kind: co-change
    paths: ["handlers/*.go", "handlers/*_test.go"]
§05 · multi-repoworkspaces & scoping

One graph. Many repos.

Every node and contract is keyed on a workspace slug — the hard graph boundary for cross-repo work. Two repos that should pair their contracts (an HTTP server and the client that calls it, a Kafka producer and its consumer) must declare the same workspace: in their .gortex.yaml. Otherwise contract matching stops at the boundary and they look like orphans.

Slug resolution precedence

  1. RepoEntry.workspace in ~/.config/gortex/config.yaml — overrides everything. Ideal for OSS / read-only repos where you don't want to leave an artifact in the tree.
  2. workspace: in the repo's own .gortex.yaml — the default for first-party repos.
  3. The repo prefix — fallback when neither is set, so each unconfigured repo gets its own isolated workspace.

Track / untrack

$ gortex track ~/projects/backend
$ gortex track ~/projects/frontend --workspace api
$ gortex untrack backend

# Per-repo status + daemon-wide status share the same command — it picks
$ gortex status

Multi-server roster

Let the daemon route to additional Gortex servers (local sockets or remote HTTPS).

$ gortex daemon server list
$ gortex daemon server add work --url https://gortex.work.example --auth-token-env WORK_TOK
$ gortex daemon server remove work

On gortex server, the --workspace and --scope-project flags filter both indexing and queries. gortex server --workspace api only loads repos that resolve to api; a typo'd value errors out at startup rather than producing an empty graph.

Workspace + project slugs

Manage workspace assignments without hand-editing every .gortex.yaml.

$ gortex workspace list                                # show what each tracked repo declares
$ gortex workspace set backend api                     # write workspace=api to backend's .gortex.yaml
$ gortex workspace set upstream-lib api --global       # OSS-friendly: pin in ~/.config/gortex/config.yaml
$ gortex workspace set-all api --root ~/projects/work --yes

Excludes — the layered ignore list

The effective exclude list is composed of four layers (builtin → global → repo entry → workspace). Each layer reports its source so you know where a rule came from.

$ gortex config exclude list                          # show all layers with provenance
$ gortex config exclude add pkg/generated             # default target: workspace .gortex.yaml
$ gortex config exclude add '**/*.bak' --global       # write to ~/.config/gortex/config.yaml
$ gortex config exclude add testdata/ --repo backend  # write to a RepoEntry
$ gortex config exclude remove pkg/generated
§06 · agents15 first-class adapters

Auto-detected. Auto-wired.

Run gortex init and Gortex auto-detects every coding agent in scope, then writes the right config files. See docs/agents.md for the full adapter matrix and per-agent schema notes.

Claude Code
.mcp.json + CLAUDE.md + .claude/settings.json
slash commands · skills · 3-hook pipeline
Cursor
.mcp.json + .cursor/rules/gortex-communities.mdc
auto-discovery on workspace open
Kiro
.mcp.json + .kiro/steering/*
steering files + agent hooks
Windsurf
.windsurfrules + community block
marker-guarded
VS Code / Copilot
.vscode/mcp.json + .github/copilot-instructions.md
workspace + user scope
Continue.dev
.continue/config.json
MCP block + AGENTS.md routing
Cline
cline_mcp_settings.json + AGENTS.md
VS Code extension scope
OpenCode
opencode.json + AGENTS.md
community routing
Antigravity
~/.gemini/antigravity Knowledge Items
user-level only
Codex CLI
~/.codex/config.toml
stdio MCP, scriptable, CI-friendly
Gemini CLI
~/.gemini/settings.json + GEMINI.md
community routing
Zed
.zed/settings.json
MCP wiring
Aider
.aider.conf.yml + AGENTS.md
community routing
Kilo Code
.kilocode/mcp.json
auto-discovery
OpenClaw
openclaw config + AGENTS.md
community routing
Selective install · Use gortex init --agents=claude-code,cursor to write only the listed adapters. CLI contract documented in docs/agents.md.
§07 · hooksclaude code · 3-stage pipeline

The hooks that quietly do the right thing.

Gortex installs three Claude Code hooks (and equivalents for other agents that support them). Each one degrades silently when the server is unreachable.

a PreToolUse

Enriches Read / Grep / Glob / Bash calls (incl. codebase-search, rg, grep probes) with graph context and redirects to the right Gortex tool. Matching Task also briefs spawned subagents with an inline tool-swap table + task-scoped smart_context.

b PreCompact

Injects a condensed orientation snapshot before Claude Code compacts the conversation: index stats, recently-modified symbols, top hotspots, feedback-ranked symbols. Compaction stops losing your hard-won context.

c Stop

Runs post-task diagnostics: detect_changesget_test_targets, check_guards, analyze dead_code, and contracts check on modified symbols. The agent self-corrects before handoff.

d Skip with --no-hooks

Both gortex install --no-hooks and gortex init --no-hooks skip hook installation. Use when you want the MCP wiring without the auto-redirect behavior.

§08 · cli referenceevery subcommand · one table

Every subcommand at a glance.

Setup

gortex install
User-level setup. Writes MCP wiring, skills, slash commands, optional user-level hooks. --start spawns the daemon; --track tracks cwd; --no-hooks skips hooks.
gortex init
Per-repo setup. Writes .mcp.json, CLAUDE.md, community routing, hooks. --analyze indexes first; --no-skills skips SKILL.md generation; --hooks-only rewrites hooks only.
gortex track PATH
Add a repo to the daemon roster. Indexes immediately; persists to config. Daemon-first dispatch; falls back to config-only when no daemon is running.
gortex untrack REPO
Remove a repo from the roster. Evicts nodes/edges from the live graph and persists to config.
gortex status
Per-repo status + daemon-wide status share the same command — it picks the right shape based on cwd.
gortex workspace {list|set|set-all}
Manage workspace + project slugs across tracked repos. set-all --root stamps every tracked repo under a path prefix.
gortex config exclude {list|add|remove}
Add / list / remove entries in the layered ignore list (builtin → global → repo entry → workspace).

Run

gortex mcp --index PATH --watch
Per-repo MCP server over stdio. Auto-detects the daemon; --no-daemon forces embedded mode.
gortex server --index .
HTTP/JSON API on :4747. Endpoints: /v1/health, /v1/tools, /v1/tools/{name}, /v1/stats, /v1/graph, /v1/events (SSE). --auth-token or $GORTEX_SERVER_TOKEN.
gortex daemon {start|stop|restart|reload|status|logs|service-status}
Long-living daemon. install-service / uninstall-service manage launchd or systemd units; service-status reports the unit state.
gortex daemon server {list|add|remove}
Multi-server roster — let the daemon route to additional local sockets or remote HTTPS Gortex servers.

Operate

gortex savings
Cumulative tokens saved + dollar amount avoided across sessions. Per-call deltas already attached to source-reading tools.
gortex context [--topic STR --format md|json]
Render graph context as a portable briefing. Same engine as the export_context MCP tool — useful for Slack, PRs, non-MCP tools.
gortex eval {recall|embedders|swebench|tokens}
First-class evaluation harness. recall runs fixture-driven any-hit R@1/5/20 + MRR; embedders compares ONNX variants; swebench passthrough; tokens runs the GCX1 wire bench.
gortex version
Build version, commit, build date, Go version. Use --json for machine output.
§09 · gcx1 wire formatopt-in · −27.4% median

Round-trippable compact text instead of JSON.

13 list-shaped MCP tools accept format: "gcx" on input. Returns a published, round-trippable text format instead of JSON.

  • Median −27.4% tiktoken savings vs JSON · best case −38.3% · 100% round-trip integrity
  • Tools that support it: search_symbols, find_usages, analyze, contracts, batch_symbols, get_callers, get_call_chain, get_dependencies, get_dependents, find_implementations, get_file_summary, get_editing_context, smart_context
  • Spec: docs/wire-format.md
  • Reproducible bench harness: bench/wire-format/

Standalone reference implementations (MIT)

# In your tool call
smart_context({ task: "refactor watcher", format: "gcx" })

# Decoding in Go
$ go get github.com/gortexhq/gcx-go

# Decoding in TS
$ npm install @gortex/wire
§10 · supply chainverify what you ship

Sigstore-signed. SLSA Level 3.

Every release is keyless-signed with cosign, attested with SLSA-3 build provenance, and tracked by OpenSSF Scorecard. VirusTotal: 0/91. The installer verifies SHA256 against checksums.txt by default; if cosign is on your $PATH, it also verifies the cosign signature.

# Manual verification
$ cosign verify-blob \
    --certificate-identity-regexp "https://github.com/zzet/gortex/.github/workflows/release.yml" \
    --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
    --signature gortex_darwin_arm64.tar.gz.sig \
    --certificate gortex_darwin_arm64.tar.gz.pem \
    gortex_darwin_arm64.tar.gz

# SLSA provenance
$ slsa-verifier verify-artifact \
    --provenance-path multiple.intoto.jsonl \
    --source-uri github.com/zzet/gortex \
    gortex_darwin_arm64.tar.gz

Full instructions: docs/installation.md#verifying-releases.

§11 · further readingdeeper docs · live in the repo

Where to read more.

The deepest docs live in the repo and ship with each release. They are versioned with the binary, so main always matches the build you'd download today.

onboarding.md

15-minute walkthrough: gortex installgortex init → verify your AI assistant uses graph tools → what to do if it doesn't. read →

agents.md

Per-agent adapter matrix, schema notes, the gortex init --agents=<csv> CLI contract, and CI patterns. read →

languages.md

The full 92-language matrix: extensions, what each extractor pulls out, IMPLEMENTS inference rules, and how to add a new language. read →

wire-format.md

GCX1 spec — grammar, encoding rules, reserved tokens, round-trip semantics, and the bench harness layout. read →

installation.md

Homebrew, package managers, direct binary download, supply-chain verification (cosign + SLSA-3 + VirusTotal), from-source builds. read →

CONTRIBUTING.md

Adding language extractors, MCP tools, eval fixtures. Active contributors get a free non-competing commercial license. read →

● main
watcher: running
surface: 50 tools · 7 resources · 3 prompts
mcp: stdio · http: :4747 · daemon: socket
v0.18.2
source-available