Metadata-Version: 2.5
Name: usebridger
Version: 0.1.0
Summary: Repository intelligence and knowledge system for AI coding agents
Project-URL: Homepage, https://github.com/thpnt/bridger
Project-URL: Repository, https://github.com/thpnt/bridger
Project-URL: Issues, https://github.com/thpnt/bridger/issues
License-Expression: Apache-2.0
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES/Graphify/ATTRIBUTION.md
License-File: THIRD_PARTY_NOTICES/Graphify/LICENSE
License-File: THIRD_PARTY_NOTICES/Graphify/LICENSE-MIT
License-File: THIRD_PARTY_NOTICES/Graphify/NOTICE
Requires-Python: >=3.11
Requires-Dist: graspologic<4,>=3.4
Requires-Dist: huggingface-hub>=0.34
Requires-Dist: keyring>=25.0
Requires-Dist: mcp<3,>=2
Requires-Dist: networkx>=3.4
Requires-Dist: numpy<2.5,>=1.21
Requires-Dist: openai>=2.43.0
Requires-Dist: orjson>=3.10
Requires-Dist: platformdirs>=4.0
Requires-Dist: pydantic>=2.10
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rapidfuzz>=3.0
Requires-Dist: readchar>=4.2
Requires-Dist: rich>=13.0
Requires-Dist: sentence-transformers>=5.0.0
Requires-Dist: tiktoken>=0.14.0
Requires-Dist: tree-sitter-bash<0.27,>=0.23
Requires-Dist: tree-sitter-c-sharp<0.25,>=0.23
Requires-Dist: tree-sitter-c<0.25,>=0.23
Requires-Dist: tree-sitter-cpp<0.25,>=0.23
Requires-Dist: tree-sitter-elixir<0.5,>=0.3
Requires-Dist: tree-sitter-fortran<0.8,>=0.6
Requires-Dist: tree-sitter-go<0.26,>=0.23
Requires-Dist: tree-sitter-groovy<0.3,>=0.1
Requires-Dist: tree-sitter-java<0.25,>=0.23
Requires-Dist: tree-sitter-javascript<0.26,>=0.23
Requires-Dist: tree-sitter-json<0.26,>=0.23
Requires-Dist: tree-sitter-julia<0.25,>=0.23
Requires-Dist: tree-sitter-kotlin<2.0,>=1.0
Requires-Dist: tree-sitter-lua<0.6,>=0.2
Requires-Dist: tree-sitter-objc<4.0,>=3.0
Requires-Dist: tree-sitter-php<0.25,>=0.23
Requires-Dist: tree-sitter-powershell<0.28,>=0.26
Requires-Dist: tree-sitter-python<0.26,>=0.23
Requires-Dist: tree-sitter-ruby<0.25,>=0.23
Requires-Dist: tree-sitter-rust<0.25,>=0.23
Requires-Dist: tree-sitter-scala<0.27,>=0.23
Requires-Dist: tree-sitter-swift<0.9,>=0.7
Requires-Dist: tree-sitter-typescript<0.25,>=0.23
Requires-Dist: tree-sitter-verilog<2.0,>=1.0
Requires-Dist: tree-sitter-zig<2.0,>=1.0
Requires-Dist: tree-sitter<0.26,>=0.23.0
Requires-Dist: typer>=0.15
Description-Content-Type: text/markdown

# Bridger

Bridger is a repository intelligence and knowledge system for AI coding agents.
The design is documented in [`docs/bridger`](docs/bridger).

## Local development

```shell
uv sync
uv run pytest
uv run ruff check .
uv run ruff format .
uv run mypy src
```

## Install and connect a coding agent

Install Bridger once, then initialize each repository you want it to serve:

```shell
uv tool install usebridger
bridger auth set-key
cd ~/my-project
bridger init --reasoning low
```

`bridger auth set-key` prompts for a hidden OpenAI API key and stores it in the
system credential store. Use `bridger auth status` to check the active source or
`bridger auth remove` to delete the stored key. For CI or a temporary override,
set `OPENAI_API_KEY` instead. It takes precedence over the stored credential.
Bridger does not store API keys in the repository, `.bridger/`, or `config.toml`.

Successful `bridger auth set-key` setup creates an editable, non-secret
`config.toml` in the platform-specific Bridger user config directory if one
does not exist. Its initial contents come from Bridger's bundled `config.toml`:

```toml
schema_version = 1

[openai]
model = "gpt-6-sol"
reasoning = "xhigh"
```

`--reasoning` overrides the configured reasoning value. Existing
`BRIDGER_OPENAI_MODEL` environment settings continue to override the configured
model. Without a user config file, Bridger reads the bundled defaults and does
not create files in the home directory.

Register a local stdio MCP server in your coding agent. For Codex, a minimal
configuration is:

```toml
[mcp_servers.bridger]
command = "bridger"
args = ["mcp"]
```

For a project-local Cursor configuration, pass the workspace explicitly:

```json
{
  "mcpServers": {
    "bridger": {
      "type": "stdio",
      "command": "bridger",
      "args": ["mcp", "--repository", "${workspaceFolder}"]
    }
  }
}
```

`bridger mcp` uses the coding agent's subprocess working directory by default.
It resolves nested directories to the Git repository root. Use
`bridger mcp --repository /path/to/repository` when the host starts the process
elsewhere. Each server process serves one repository and stops with its host
session. It exposes understand, impact, query_graph, search_repository,
get_graph_entity, get_graph_neighbors, get_graph_subgraph, get_graph_path,
list_graph_communities, and get_graph_community.

## CLI commands

```shell
uv run bridger init
uv run bridger understand "How does repository initialization work?"
uv run bridger impact RepositoryLoader
uv run bridger understand "How does repository initialization work?" --json
```

Run consumption commands from inside an initialized repository. UNDERSTAND
combines Repository Brain knowledge with structural context. IMPACT accepts
exact repository symbols and reports potential structural impact. Use `--json`
for the canonical machine-readable result.

Bridger is licensed under Apache-2.0. Vendored Graphify remains third-party
code; its license and attribution notices are in
[THIRD_PARTY_NOTICES/Graphify](THIRD_PARTY_NOTICES/Graphify).
