Skip to content
safran

Type to search. Enter opens the first result.

    Requirements

    Safran needs three things on the machine: Bun, git and an embedder. This page says which versions, what each is for, and how to check them with one command.

    $ safran doctor
    ✔ bun          Bun 1.3.2
    ✔ git          git version 2.50.1 (Apple Git-155)
    ✔ launch       started through bin/safran: Bun loaded no .env or bunfig.toml from this directory
    ✔ profile      safran.yaml (acme): 0 trackers, 1 code host
    ✔ environment  the profile references no environment variables
    ✔ embedder     ollama:bge-m3 answered in 40 ms (1024 dimensions)
    ✔ repos        3 repos listed
    ✔ index        3 repos, 6 chunks, embedder ollama:bge-m3, oldest index 5 min ago
    ✔ links        not applicable: no code host in the profile lists pull requests
    
    ✔ Everything is in place.

    What you need

    RequirementVersionUsed for
    Bun1.3.0 or newerThe runtime. Safran is TypeScript run directly by Bun; the index and the work-history store use Bun's built-in SQLite, and the profile is parsed with Bun's YAML parser. Node.js cannot run it.
    gitAny recent version on PATHCloning and fetching the repositories of remote code hosts into the data directory.
    An embedderOllama with bge-m3 by defaultTurning code chunks and queries into vectors for the dense half of search.
    A checkout of Safran—Safran is not published to a package registry. You clone it and run bun install.
    Claude CodeOptionalOnly for the plugin, the skills and the MCP server. The CLI and the SDK work without it.

    There is no database server, no vector database and no native extension to install. The index is one SQLite file.

    The command is a POSIX sh launcher (bin/safran), so it needs a POSIX shell.

    Bun

    safran doctor fails the bun check below 1.3.0 and tells you to run bun upgrade. Install the dependencies once after cloning:

    cd /work/safran
    bun install

    How the CLI is started matters, and it is the one thing that differs from most Bun tools: use bin/safran, not a bare bun run in your project. Quickstart step 1 explains why, and the launch line of safran doctor reports how this run was started.

    git

    Safran runs your git to clone and fetch. Tokens are handed to git through the environment of that one process, never written into a clone's configuration. Repositories of a local code host are read in place and are not fetched, but safran doctor checks for git either way.

    An embedder

    The default profile uses a local Ollama with the bge-m3 model, a multilingual embedding model, at http://localhost:11434:

    ollama pull bge-m3
    type: ollama
    model: bge-m3

    Any server with an OpenAI-compatible /embeddings endpoint works instead. The URL goes up to and including the version segment; token_env is optional and names the environment variable that holds the key:

    type: openai-compatible
    url: http://localhost:8080/v1
    model: bge-m3

    Two things to know before choosing:

    • With a remote endpoint, the text of every code chunk is sent to it. With Ollama nothing leaves the machine.
    • Vectors of different models cannot be compared. After you change embeddings, the repositories indexed with the old model must be indexed again; until then search refuses them with INDEX_NOT_READY, and safran doctor fails its index check and names them.

    The embedder is needed for safran sync and safran search. Reading tickets, safran grep and safran read on an existing index, and safran profile check do not call it. See Ollama and OpenAI-compatible for every option.

    Disk space

    The source states no fixed requirement. What takes space is under the data directory: a shallow clone of every repository of the remote code hosts, and the index (chunks, a full-text table and one vector per chunk). Both grow with the amount of code. safran status shows the number of repositories and chunks; everything under the data directory can be deleted and rebuilt.

    What safran doctor checks

    The command makes one tiny call to the embedder and lists repositories from the code hosts. It exits with code 1 when a check fails; warnings do not change the exit code.

    CheckFails or warns when
    bunFails below Bun 1.3.0.
    gitFails when git is not on PATH or does not run.
    launchWarns when the CLI was not started through bin/safran and the current directory holds a .env or bunfig.toml that Bun may have loaded.
    profileFails when the profile is missing or invalid, with the same message safran profile check gives.
    env <NAME>Fails for every environment variable the profile names that is not set. Shown as environment when the profile names none.
    embedderFails when the embedder cannot be built, does not answer within 60 seconds, or returns no vector.
    reposWarns when there is no code host or the hosts list no repositories; fails when listing fails.
    indexWarns when it is not built, when a sync did not finish, when listed repositories are not indexed, or when a repository's index is older than 7 days. Fails when repositories were indexed with another embedder than the profile configures.
    linksWarns when a code host can list pull requests but the work-history store is empty. Fails when the store cannot be read.

    A run with problems looks like this. Every failing line carries the next step:

    $ safran doctor
    ✔ bun             Bun 1.3.2
    ✔ git             git version 2.50.1 (Apple Git-155)
    ✔ launch          started through bin/safran: Bun loaded no .env or bunfig.toml from this directory
    ✔ profile         safran.yaml (acme): 1 tracker, 0 code hosts
    ✔ env JIRA_EMAIL  set (used by trackers.jira.email_env)
    ✘ env JIRA_TOKEN  not set (used by trackers.jira.token_env)
                      → Export JIRA_TOKEN in your shell, or put it in the .env file next to the profile.
    ✘ embedder        ollama:bge-m3: Cannot reach Ollama at http://localhost:11500
                      → Start it with `ollama serve`, or set `embeddings.url` in the profile.
    ! repos           no code host in the profile
                      → Add one under `code.hosts:`; without it there is no code to index.
    ! index           not built yet
                      → Run `safran sync`.
    ✔ links           not applicable: no code host in the profile lists pull requests
    
    ✘ 2 checks failed, 2 warnings.

    safran doctor --json prints the same checks as one JSON document (ok, failed, warnings, and a checks array of name, status, detail, hint), for scripts.

    Next