Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "bridge-cli"
version = "1.0.3"
edition = "2021"
rust-version = "1.94.1"
description = "One CLI. Any storage. Every agent."
description = "Any storage. Any agent. One CLI"
license = "AGPL-3.0-only"
repository = "https://github.com/usebridgeai/cli"
homepage = "https://bridge.ls"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Bridge CLI - One CLI. Any storage. Every agent.
Bridge CLI - Any storage. Any agent. One CLI
Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran

This program is free software: you can redistribute it and/or modify
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a href="https://bridge.ls"><img src="https://img.shields.io/badge/website-bridge.ls-blueviolet.svg" alt="Website" /></a>
</p>

**One CLI. Any storage. Every agent.**
**Any storage. Any agent. One CLI**

Bridge gives AI agents a single interface to read structured context from any storage backend. One config file, one binary, JSON on stdout. The missing layer between your agent framework and your data.

Expand Down Expand Up @@ -135,6 +135,7 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for the full design.
| Provider | URI | `ls` returns | `read` returns |
| ---------- | ------------------------- | --------------------- | --------------------------------------------- |
| Filesystem | `file://./path` | Files and directories | File contents (text, JSON, or base64) |
| SQLite | `sqlite://./local.db` | Tables | All rows (`users`) or single row (`users/42`) |
| Postgres | `postgres://host:port/db` | Tables | All rows (`users`) or single row (`users/42`) |

## Commands
Expand All @@ -159,6 +160,9 @@ providers:
files:
type: filesystem
uri: file://./docs
localdb:
type: sqlite
uri: sqlite://./local.db?mode=rwc
db:
type: postgres
uri: ${DATABASE_URL}
Expand All @@ -171,15 +175,17 @@ Bridge supports two setup patterns:
- For quick local setup, pass a literal URI such as `postgres://localhost:5432/mydb`.
- For safer shared or production setups, pass a bare environment variable name such as `DATABASE_URL` together with `--type postgres`. Bridge writes `uri: ${DATABASE_URL}` into `bridge.yaml` and resolves the real value at runtime.

SQLite is also supported through literal URIs such as `sqlite://./local.db`, or `sqlite://./local.db?mode=rwc` when you want SQLite to create the file on first use.

Bridge reads environment variables from the process environment when commands run. It does not automatically load a `.env` file for you.

## Security

- **Path traversal protection:** Filesystem provider uses `canonicalize()` + `starts_with()` to block directory escape
- **SQL injection protection:** Postgres provider validates identifiers with strict regex and uses parameterized queries
- **SQL injection protection:** SQLite and Postgres providers validate identifiers with strict regex and use parameterized row reads
- **Credential redaction:** URIs with passwords are redacted in all user-facing output
- **Supply chain:** GitHub Actions pinned to SHA hashes
- **Testing:** 56 tests across CLI integration, filesystem, and Postgres (including Docker-based Postgres tests in CI)
- **Testing:** Integration coverage across the CLI, filesystem, SQLite, and Postgres providers (including Docker-based Postgres tests in CI)

## Roadmap

Expand All @@ -189,8 +195,8 @@ Bridge reads environment variables from the process environment when commands ru
- [x] Shell completions (bash, zsh, fish, PowerShell)
- [x] Structured JSON output with metadata
- [x] Environment variable expansion in config
- [x] SQLite provider
- [ ] Write support (`bridge write`)
- [ ] SQLite provider
- [ ] S3 provider
- [ ] Vector store providers (Qdrant, Pinecone)

Expand Down
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand All @@ -20,7 +20,7 @@ use clap_complete::Shell;
#[command(
name = "bridge",
version,
about = "One CLI. Any storage. Every agent.",
about = "Any storage. Any agent. One CLI",
long_about = "Bridge is a unified CLI that lets AI agents read context from any data source through a single interface."
)]
pub struct Cli {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/connect.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/commands/init.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ls.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/commands/read.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/commands/remove.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/commands/status.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/context.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/provider/filesystem.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/provider/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/provider/postgres.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion tests/cli_test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion tests/filesystem_test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion tests/postgres_test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Bridge CLI - One CLI. Any storage. Every agent.
// Bridge CLI - Any storage. Any agent. One CLI
// Copyright (c) 2026 Gabriel Beslic & Tomer Li Ran
//
// This program is free software: you can redistribute it and/or modify
Expand Down
Loading