On this page

SDKs and APIs

Launcher and editor extension

Run the fabric-sync daemon with Codegraph (an editor extension for VS Code and its forks) or Wexa Connect (a command-line launcher), so the code graph tracks your working tree. You need a Wexa identity with access to a project, and a local git repository.

  1. In an editor, install Codegraph from the Wexa repository's install-all.sh and open the repository. Sign in, pick a project, then pick or auto-create the connector. It writes .fabric/sync.json, installs the git hooks and starts the first ingest.

  2. In a terminal, build Wexa Connect from source and put it on PATH:

    cd tools/fabric-connect
    npm install && npm run build
    npm link
  3. Point your agent client's server configuration at it. If the repository is already registered, for instance by the editor extension, the token can be omitted.

    {
      "mcpServers": {
        "fabric": {
          "command": "fabric-connect",
          "args": [],
          "env": {
            "FABRIC_GATEWAY_URL": "https://fabric.wexa.ai",
            "FABRIC_SYNC_TOKEN": "<oauth-or-bootstrap-bearer>"
          }
        }
      }
    }
  4. To keep a checkout in sync with no agent attached, run fabric-connect sync --cwd /path/to/repo.

Limits

BehaviorWhat happens
Uncommitted editsIncluded. The daemon watches the working tree.
DeletionsPropagated. A removed file is tombstoned, not left as a stale symbol.
Branch and commitStamped on each state in the graph.
Hookspost-commit, post-checkout, post-merge and post-rewrite wake the daemon.
Remote machine tokenShort-lived, with no refresh token.
Project pickerOffers only projects your role can reach.
What the daemon does

Wexa Connect and Codegraph are the two supported ways to run the fabric-sync daemon that keeps your local git working tree in step with the project's code graph.

You need a Wexa identity with access to a project, and a local git repository. Wexa Connect is a command-line launcher for agent clients driven from a terminal. Codegraph is an editor extension for VS Code and its forks.

A remote connection can read a repository that has already been synchronised, but it cannot see a file you edited thirty seconds ago and have not committed, so something has to run where the code lives. These steps are what the daemon does.

  1. The daemon watches your working tree, not the last commit, and mirrors it into the code graph: the files, the symbols in them and the calls between them.
  2. Git hooks wake it on events a file watcher handles poorly, such as a branch switch that changes a thousand files at once.
  3. search-code and fetch-code read the graph.
  4. Registration state lives in .fabric/sync.json at the repository root, which is added to .gitignore automatically because it is machine-local.
Choose a tool
Wexa ConnectCodegraph
What it isA command-line launcherAn editor extension
ForAgent clients driven from a terminalVS Code, Cursor, Windsurf and other forks
Starts the daemonYes, on every sessionYes, and supervises it across restarts
Also doesOpens a session against the Wexa MCP serverSign-in, project and connector selection, live status

Both are built from the Wexa repository. This page does not document a published package for either, so build them from source as shown below.

Connect a repository from an editor

Codegraph, "powered by Wexa", has publisher WexaAI and requires VS Code 1.85 or later. The repository's install-all.sh installs it into VS Code and its forks, including Cursor, Windsurf, VSCodium, Trae and Positron. It activates when a folder contains .git or an existing .fabric/sync.json, so opening a repository is enough to be offered a connection.

  1. Sign in with your Wexa identity. Your organization comes from the sign-in token and is never typed, so you cannot register a repository against an organization you do not belong to.
  2. Pick a project. The picker offers only projects your role can reach.
  3. Pick or auto-create the connector for the codebase.

The extension then writes .fabric/sync.json, installs the git hooks and starts the first ingest.

The Codegraph panel in the activity bar shows live sync status per repository: branch, element count and errors. One shared connection card names the organization, department, project and connector, each with a change button.

It is shown once, because the machine holds a single Wexa identity. The status bar carries the state in one word: synced, syncing, daemon-down or error.

The commands are prefixed Codegraph: in the palette: sign in, sign out, reconnect, change organization, department, project or connector, refresh, retry, sync now, and show daemon status.

The extension starts and supervises the daemon on sign-in, on every editor restart, and whenever it finds the daemon unreachable after a crash or a reboot.

You never run fabric-sync daemon by hand. It needs the fabric-sync binary on PATH or named in the fabricSync.binaryPath setting. The fabricSync.gatewayUrl setting points it at a self-hosted deployment, and fabricSync.autoConnect controls automatic connection.

Launch a terminal session with Wexa Connect

Configured as the command for a tool session, fabric-connect (package @wexa/fabric-connect) registers the checkout, starts or reuses the daemon, queues a catch-up ingest, and only then proxies the session to the gateway. Connecting and synchronising become one action. Done separately, the failure is silent: the session works and the answers are out of date.

cd tools/fabric-connect
npm install && npm run build
npm link                 # puts `fabric-connect` on PATH

Point a client's server configuration at it.

{
  "mcpServers": {
    "fabric": {
      "command": "fabric-connect",
      "args": [],
      "env": {
        "FABRIC_GATEWAY_URL": "https://fabric.wexa.ai",
        "FABRIC_SYNC_TOKEN": "<oauth-or-bootstrap-bearer>"
      }
    }
  }
}

If the repository is already registered, for instance by the editor extension, you can omit the token. The launcher reads .fabric/sync.json.

Keep a checkout in sync without a session

This supervises the daemon and nothing else. Use it on a build machine that should keep a checkout synchronised with no agent attached.

fabric-connect sync --cwd /path/to/repo
Sync a repository on another machine

An agent editing files on a different machine needs the daemon running there. Mint a short-lived credential for it.

curl -s -X POST "https://fabric.wexa.ai/v1/codesync/bootstrap" \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"repo_name":"acme/app","ttl_seconds":900}'

The response carries an access token, the connector id and the session URL. There is no refresh token: the credential is short-lived on purpose, because it goes onto a machine you are not sitting at.

Use terminal agents alongside the extension

A session opened against the Wexa MCP server does not start sync by itself. Once a repository is registered through the extension, install hooks for terminal agents separately.

fabric-sync supervise --repo . --json --install-agents
fabric-sync connect --repo .

That installs a fabric-sync shim on PATH, the git hooks and hooks for the terminal agents it knows about. Any local agent that writes a file then wakes the same daemon, so one daemon serves the editor and the terminal.

What's next
  • Code sync for what the code graph holds and how it stays current.
  • search-code and fetch-code for the tools that read what these keep synchronised.
  • Connectors for what a connector is, and why a repository connection is not one.