Version Control Systems
Briefcase AI supports 8 VCS backends through a modular provider architecture, enabling seamless integration with your preferred versioning solution.
Overview
Briefcase AI provides native support for multiple version control and data versioning systems through a unified abstraction layer. This modular architecture allows you to choose the VCS backend that best fits your workflow without changing your application code.
The supported VCS backends include:
- SQLite — Lightweight, file-based versioning (default)
- lakeFS — Data lake versioning with Iceberg/Delta support
- DVC — Data Version Control for ML workflows
- Nessie — REST API-based data lake versioning (Project Nessie)
- Pachyderm — ML pipeline versioning and lineage
- ArtiVC — Simple artifact versioning
- DuckLake — DuckDB-based analytics versioning
- Iceberg — Apache Iceberg REST Catalog with time travel
- Git+LFS — Git with Large File Storage for binary artifacts
How It Works
Architecture
Briefcase AI uses a two-layer abstraction:
VcsProvidertrait — Simple interface for raw object I/O (write_object,read_object,list_objects,delete_object,create_version).VcsStorageBackend<P: VcsProvider>— Generic adapter that implements the fullStorageBackendtrait (snapshot/decision CRUD, query filtering, batching) on top of anyVcsProvider.
┌──────────────────────────────┐
│ Application Code │
│ (Uses StorageBackend) │
└───────────────┬──────────────┘
│
▼
┌──────────────────────────────┐
│ VcsStorageBackend Adapter │
│ (Serialization, queries, │
│ batching, flush-to-commit)│
└───────────────┬──────────────┘
│
┌─────────┼─────────┬──────────┐
│ │ │ │
▼ ▼ ▼ ▼
DVC Nessie Pachyderm Iceberg
ArtiVC DuckLake Git+LFS (custom)
Core Concepts
- VcsProvider Trait: Each backend implements ~7 methods for raw byte I/O and versioning
- VcsProviderConfig: Unified config struct with builder pattern and
from_env()loader - Feature Flags: Compile-time selection of backends (e.g.,
vcs-nessie,vcs-all) - Environment Variables: Runtime configuration via
BRIEFCASE_{PROVIDER}_{KEY}pattern
Provider Comparison
| Provider | Protocol | Best For | Auth Methods |
|---|---|---|---|
| DVC | Git + filesystem | Local data science workflows | Git credentials |
| Nessie | REST API (v2) | Data lake versioning (Iceberg/Delta) | Bearer token |
| Pachyderm | REST API | ML pipeline versioning & lineage | Bearer token |
| ArtiVC | CLI + filesystem | Simple artifact versioning | Cloud credentials |
| DuckLake | Filesystem + JSON | DuckDB-based analytics | Local filesystem |
| Iceberg | REST Catalog API | Table-format time travel queries | Bearer token, Basic auth |
| Git+LFS | Git + LFS | Large file versioning (>threshold) | Git credentials |
| lakeFS | REST API | Multi-cloud data lake versioning | Access key + secret key |
| SQLite | Embedded DB | Local development & testing | File-based |
Quick Setup
Feature Flags
Enable the VCS backends you need in Cargo.toml:
[dependencies]
briefcase-core = { version = "0.1", features = ["vcs-nessie"] }
# Or enable all 7 VCS providers:
briefcase-core = { version = "0.1", features = ["vcs-all"] }
Individual feature flags: vcs-dvc, vcs-nessie, vcs-pachyderm, vcs-artivc, vcs-ducklake, vcs-iceberg, vcs-gitlfs. All depend on the vcs-storage base feature (which pulls in async + networking).
Environment Variables
Each provider reads configuration from BRIEFCASE_{PROVIDER}_{KEY} environment variables via VcsProviderConfig::from_env(). Standard keys: ENDPOINT, TOKEN, ACCESS_KEY, SECRET_KEY, REPOSITORY, BRANCH.
DVC
export BRIEFCASE_DVC_ENDPOINT="/path/to/dvc/repo" # repo_path via ENDPOINT
export BRIEFCASE_DVC_REPOSITORY="my-repo"
export BRIEFCASE_DVC_BRANCH="main"
Nessie
export BRIEFCASE_NESSIE_ENDPOINT="https://nessie.example.com/api/v2"
export BRIEFCASE_NESSIE_TOKEN="your-bearer-token"
export BRIEFCASE_NESSIE_BRANCH="main"
Pachyderm
export BRIEFCASE_PACHYDERM_ENDPOINT="https://pachd.example.com:30650"
export BRIEFCASE_PACHYDERM_TOKEN="your-bearer-token"
export BRIEFCASE_PACHYDERM_REPOSITORY="my-project"
ArtiVC
export BRIEFCASE_ARTIVC_ENDPOINT="/path/to/artivc/repo"
export BRIEFCASE_ARTIVC_REPOSITORY="my-artifacts"
DuckLake
export BRIEFCASE_DUCKLAKE_ENDPOINT="/path/to/storage/root"
export BRIEFCASE_DUCKLAKE_REPOSITORY="my-analytics"
Iceberg
export BRIEFCASE_ICEBERG_ENDPOINT="https://iceberg-catalog.example.com/v1"
export BRIEFCASE_ICEBERG_TOKEN="your-bearer-token"
export BRIEFCASE_ICEBERG_REPOSITORY="my-warehouse" # warehouse name
export BRIEFCASE_ICEBERG_BRANCH="main" # namespace
Git+LFS
export BRIEFCASE_GITLFS_ENDPOINT="/path/to/git/repo"
export BRIEFCASE_GITLFS_BRANCH="main"
lakeFS
export LAKEFS_ENDPOINT="https://lakefs.example.com/api/v1"
export LAKEFS_ACCESS_KEY="your_access_key"
export LAKEFS_SECRET_KEY="your_secret_key"
Rust Usage
use briefcase_core::storage::vcs::{create_vcs_backend, create_vcs_backend_from_env, VcsProviderConfig};
use briefcase_core::storage::StorageBackend;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Option 1: From environment variables
let backend = create_vcs_backend_from_env("nessie").await?;
// Option 2: Explicit config
let config = VcsProviderConfig::new("nessie")
.with_endpoint("https://nessie.example.com/api/v2")
.with_token("my-token")
.with_branch("main");
let backend = create_vcs_backend(config).await?;
// Use as StorageBackend — same API as SQLite or lakeFS
let snapshot_id = backend.save_snapshot(&snapshot).await?;
let loaded = backend.load_snapshot(&snapshot_id).await?;
let results = backend.query_snapshots(&query).await?;
// Flush pending writes (creates a commit/version in the VCS)
backend.flush().await?;
Ok(())
}
Dynamic Provider Selection
Select the provider at runtime without recompilation:
let provider_name = std::env::var("VCS_PROVIDER").unwrap_or("sqlite".to_string());
let backend = create_vcs_backend_from_env(&provider_name).await?;
Python Usage
from briefcase.integrations.vcs import NessieClient, DvcClient
# Create a Nessie VCS client
nessie = NessieClient(
endpoint="https://nessie.example.com/api/v2",
token="your-bearer-token",
repository="my-catalog",
branch="main"
)
# Use as context manager for automatic cleanup
with nessie:
data = nessie.read_object("data/training.csv")
nessie.write_object("results/output.json", result_bytes)
nessie.create_version("Updated results")
# Or create DVC client for local workflows
dvc = DvcClient(
repository="my-ml-repo",
branch="main",
briefcase_client=client
)
Available clients: DvcClient, NessieClient, PachydermClient, ArtiVCClient, DuckLakeClient, IcebergClient, GitLFSClient. All inherit from VcsClientBase at briefcase.integrations.vcs.base.
Adding Custom Providers
See Writing a Custom VCS Provider for a step-by-step guide to implementing your own backend. Each provider is ~150-250 lines focused purely on API specifics.
API Reference
See Integrations API for detailed API documentation on each provider's interface.