A lightweight bridge that lets the Claude Code CLI authenticate and run through Databricks Foundation Models using Databricks OAuth.
Project description
DB Claude Bridge
A lightweight bridge that lets the Claude Code CLI authenticate and run through Databricks Foundation Models using Databricks OAuth.
This lightweight bridge provides seamless integration between Claude Code CLI and Databricks Foundation Models, handling Databricks OAuth authentication automatically so you can focus on using powerful language models.
Installation
pip install db-claude-bridge
Quick Start
Setup
# Authenticate with Databricks OAuth to enable Claude Code CLI access to Foundation Models
db-claude-bridge login
Usage
# Run Claude Code CLI through Databricks Foundation Models
db-claude-bridge
# Quick responses through Foundation Models
db-claude-bridge --print "What is Python?"
# Check Claude Code CLI and Databricks OAuth status
db-claude-bridge status
How it Works
This lightweight bridge handles Databricks OAuth authentication and configures Claude Code CLI to run through Databricks Foundation Models. Simply authenticate once with your Databricks workspace, and the bridge automatically manages OAuth tokens, enabling Claude Code CLI to seamlessly access Foundation Models hosted on Databricks.
Configuration
The bridge stores configuration in:
~/.db-claude-bridge/config.json- Bridge settings and OAuth tokens~/.claude/settings.json- Claude Code CLI config (managed automatically by the bridge)
Managing Configuration
# View current bridge configuration
db-claude-bridge config
# Update Databricks workspace URL
db-claude-bridge config --host https://your-workspace.databricks.com
# Reset bridge settings and OAuth tokens
db-claude-bridge config --reset
# Use different workspace for one session
db-claude-bridge --host https://your-workspace.databricks.com login
Commands
db-claude-bridge- Run Claude Code CLI through Databricks Foundation Modelsdb-claude-bridge login- Authenticate with Databricks OAuth for Foundation Models accessdb-claude-bridge logout- Clear OAuth authentication tokensdb-claude-bridge status- Check Claude Code CLI and Databricks OAuth statusdb-claude-bridge config- Manage bridge configuration and OAuth settings
Requirements
- Python 3.8+
- Claude Code CLI (automatically installed by the bridge if missing)
- Databricks workspace with Foundation Models access
Development
git clone https://github.com/ahdbilal/db-claude-bridge.git
cd db-claude-bridge
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Code formatting
black src tests
isort src tests
Troubleshooting
OAuth authentication issues:
db-claude-bridge logout
db-claude-bridge login
Bridge configuration issues:
db-claude-bridge config --reset
Debug the bridge:
db-claude-bridge --debug status
License
Apache License 2.0 - see LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file db_claude_bridge-0.1.1.tar.gz.
File metadata
- Download URL: db_claude_bridge-0.1.1.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b121f5f693fa8a38e38267128974707774db31b39a296dd41ff19c7372b9b500
|
|
| MD5 |
de157c8d2bd31ed6547c86a62af51931
|
|
| BLAKE2b-256 |
a1449f3043535dbfaed11a729e7cee19907503e395490338988622384567a5c0
|
File details
Details for the file db_claude_bridge-0.1.1-py3-none-any.whl.
File metadata
- Download URL: db_claude_bridge-0.1.1-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c85e54cac228f6169be5d734cd9e29b4ba331f0bfec1851ca8a3576475b269d
|
|
| MD5 |
ea7ea6bf306e9f00cf7454f1c6683f53
|
|
| BLAKE2b-256 |
42ac6c77705d6a959cfa5ccf9e895df3d40ba6c046e50139997e097f1533ba4f
|