pane 3 — docsinstall · configure · run

Onboarding
& reference.

Two commands per machine, two per repo. Runs natively on macOS, Linux and Windows, amd64 and arm64. 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 Windows · 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 archive, verifies SHA256 against checksums.txt (and cosign if installed), installs the binary, and puts it on your PATH. Re-runs upgrade in place. No silent sudo.

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

# windows (powershell)
$ irm https://get.gortex.dev/install.ps1 | iex

# homebrew · scoop (windows)
$ brew install zzet/tap/gortex
$ scoop install 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-* — 19 model-invoked tool-usage skills
  • ~/.claude/commands/gortex-*.md — 19 slash commands (discovery · refactor · review)
  • ~/.claude/agents/gortex-*.md — 2 sub-agents (gortex-search, gortex-impact) with a graph-only tool allowlist
  • ~/.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 — and the /mcp MCP 2026 Streamable HTTP transport. 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

# Expose the MCP 2026 Streamable HTTP transport on the daemon
$ gortex daemon start --http-addr 127.0.0.1:7411 --http-auth-token "$TOK"
MCP 2026 transport · Both gortex server and the daemon's --http-addr bind expose /mcp — the Streamable HTTP transport the June 2026 MCP spec locks in. One endpoint handles POST/GET/DELETE, replays per-request state via Mcp-Session-Id, and supports JSON-RPC batching + server-initiated SSE notifications.
§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

# List every tracked repo — head SHA, last-indexed time, staleness flag
$ gortex repos
$ gortex repos --json

# 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 layered (builtin → the repo's own .gitignore → global → repo entry → workspace). The repo's .gitignore is respected by default — opt out per-workspace with respect_gitignore: false. The walk also honors per-directory .gortexignore and ripgrep's .ignore / .rgignore. 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 · 4-stage pipeline

The hooks that quietly do the right thing.

Gortex installs four 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 routes to the right Gortex tool. Matching Task also briefs spawned subagents with an inline tool-swap table + task-scoped smart_context.

b PostToolUse

In enrich mode, augments the actual tool output with graph context after the fact — enclosing symbols for Grep hits, file footprints for Read, an indexed-vs-unindexed summary for Glob. Onboarding without the hard deny.

c 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.

d 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.

Hook modes · Pick a PreToolUse posture at install with gortex install --hook-mode: deny (default — redirects by denying the raw tool), enrich (never denies; the PostToolUse hook augments output instead), consult-unlock (deny fallback reads only until the graph is queried once this session), or nudge (a rate-limited soft reminder). gortex install --no-hooks and gortex init --no-hooks skip hook installation entirely.
§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 repos [--json]
List every tracked repo with its git head-commit SHA, last-indexed time, and a staleness flag.
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 [--verbose --json]
Token-savings dashboard — Today / Last 7 days / All time bar charts, percentage saved, and USD cost avoided. --verbose breaks it down per tool; per-call deltas are already attached to source-reading tools.
gortex bench {recall|tokens|perf|daemon-latency|…|all}
User-facing benchmark suite — token efficiency vs ripgrep, reference-repo perf with budget gates, per-tool dispatch latency (p50/p95/p99), embedders, SWE-bench. bench tokens adds a USD-per-model card.
gortex audit [--badge|--format svg|json]
A–F repo health grade derived from per-symbol complexity-axis health scores. Emits a shields.io-style SVG badge for the README, JSON with per-grade counts + worst-5 symbols, or a one-line text form.
gortex gain [--since 7d]
Forward-looking per-call USD savings projection from the latest bench tokens output; optional cumulative-history slice.
gortex wiki [PATH] [--enhance]
Generate a multi-page Markdown wiki under wiki/<repo>/ — per-community pages, process sequence diagrams, API contracts, analysis. --enhance adds LLM narrative summaries (cached by content hash).
gortex docs [PATH]
Generate a "living docs" bundle — recent changes, ownership, stale code, blame.
gortex export {cypher|graphml|mermaid} [--scope all] [--watch]
Emit the live graph as Cypher (Neo4j / Bloom / Aura), GraphML (Gephi · yEd · Cytoscape), or Mermaid diagrams. One-shot dump or streaming with --watch.
gortex githook {install|uninstall|status}
Manage the post-commit hook. --regen-mermaid / --regen-wiki keep diagrams and docs in sync after every commit. Idempotent — preserves non-gortex hook content.
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 enrich {blame|coverage|releases|all}
Offline enrichment passes that stamp per-symbol metadata on the snapshot — blame (last author / commit), coverage (coverage_pct from a Go cover profile), releases (git-tag added_in). all runs every pass under shared git state and persists back into the snapshot.
gortex eval {recall|embedders|baselines|quality|…}
Evaluation substrate — fixture-driven recall (R@1/5/20 + MRR), ONNX embedder comparison, NDCG@10 baselines vs ripgrep/probe/…, measurement-infra quality checks, SWE-bench, GCX1 token bench. Prefer gortex bench for the user-facing surface.
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.

17 list-shaped MCP tools accept format: "gcx" on input — and known clients (Claude Code, Cursor, VS Code, Zed, Aider, Kilo Code, OpenCode, OpenClaw, Codex) get it served by default. Returns a published, round-trippable text format instead of JSON. format: "toon" is the second-tier fallback (~10–15% smaller than JSON, lossy but human-friendly) for clients that don't yet speak GCX.

  • Median −27.4% savings vs JSON (tiktoken cl100k_base) · −27.3% under Claude Opus 4.7 · 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, find_overrides, get_class_hierarchy, get_file_summary, get_editing_context, smart_context, flow_between, find_clones
  • 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 257-language matrix: extensions, what each tier (deep tree-sitter / regex / forest signature-only) 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: 115 tools · 16 resources · 3 prompts
mcp: stdio · /mcp · http: :4747 · daemon: socket
v0.33.0
apache 2.0