This directory contains installation scripts for Claude Code CLI on Databricks clusters.
| Script | Purpose | Network Required |
|---|---|---|
install-claude.sh |
Full online installation with MLflow tracing | Yes |
install-claude-minimal.sh |
Minimal installation (Claude CLI only) | Yes |
vscode-setup.sh |
VS Code/Cursor Remote SSH helper | No |
check-network-deps.sh |
Network connectivity preflight check | Yes |
Note: For offline/air-gapped installations, use the separate
adb-coding-assistants-cluster-offlinemodule.
For clusters with internet access:
resource "databricks_cluster" "claude_cluster" {
cluster_name = "claude-coding-assistant"
spark_version = data.databricks_spark_version.latest_lts.id
node_type_id = "Standard_D8pds_v6"
autotermination_minutes = 60
num_workers = 0
init_scripts {
dbfs {
destination = "dbfs:/init-scripts/install-claude.sh"
}
}
}The script installs:
- ✅ Node.js 20.x - Required runtime for Claude CLI
- ✅ Claude Code CLI - AI coding assistant
- ✅ MLflow - For tracing Claude interactions
- ✅ System tools - curl, git, jq
- ✅ Bash helpers - Convenience functions for using Claude
After installation, these commands are available:
# Verify installation
check-claude
# Show debug info
claude-debug
# Refresh authentication
claude-refresh-token
# Token management
claude-token-status # Check token freshness
claude-setup-token-refresh # Enable automatic hourly refresh
claude-remove-token-refresh # Disable automatic refresh
# Enable MLflow tracing
claude-tracing-enable
# Check tracing status
claude-tracing-status
# Disable tracing
claude-tracing-disable
# VS Code/Cursor Remote SSH helpers
claude-vscode-setup # Show setup guide
claude-vscode-env # Get Python virtual environment path
claude-vscode-check # Verify VS Code/Cursor setup
claude-vscode-config # Generate VS Code settings.json snippetFor remote development using VS Code or Cursor, follow these steps:
-
Get Python interpreter path (after SSH connection):
claude-vscode-env # Or manually: echo $DATABRICKS_VIRTUAL_ENV -
Show complete setup guide:
claude-vscode-setup
-
Generate VS Code settings:
claude-vscode-config
- VS Code: Install "Remote - SSH" extension from marketplace
- Cursor: Built-in Remote SSH extension (already included)
Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
- Type:
Remote-SSH: Settings - Or manually edit
settings.json:
{
"remote.SSH.defaultExtensions": [
"ms-Python.python",
"ms-toolsai.jupyter"
]
}- Command Palette →
Remote-SSH: Connect to Host - Enter your cluster SSH connection details
After connecting:
- Run
claude-vscode-envto get the Python path - Command Palette →
Python: Select Interpreter - Enter or browse to:
/databricks/python*/pythonEnv-*/bin/python
Important: Always select the pythonEnv-xxx interpreter for full Databricks Runtime library access.
# Check setup status
claude-vscode-check
# Test in a Python file
import pyspark
import pandas
import mlflow
print("Setup successful!")- IPYNB notebooks and
*.pyDatabricks notebooks have access to Databricks globals (dbutils,spark, etc.) - Regular Python
*.pyfiles do NOT have access to Databricks globals - Always select the
pythonEnv-xxxinterpreter for full Databricks Runtime library access
A standalone helper script is also available:
# Show setup guide
./scripts/vscode-setup.sh --guide
# Get Python interpreter path
./scripts/vscode-setup.sh --env
# Check current setup
./scripts/vscode-setup.sh --check
# Generate settings.json
./scripts/vscode-setup.sh --settings# Interactive mode
claude
# One-shot query
echo "Write a Python function to reverse a string" | claude --print
# From file
claude < prompt.txt
# With streaming
claude --stream < task.mdThe online installer requires access to:
| Domain | Purpose |
|---|---|
claude.ai |
Claude CLI installer script |
storage.googleapis.com |
Claude CLI binaries (GCS bucket) |
deb.nodesource.com |
Node.js repository |
archive.ubuntu.com |
APT packages (x86_64) |
ports.ubuntu.com |
APT packages (ARM64) |
registry.npmjs.org |
NPM packages |
pypi.org |
Python package index |
files.pythonhosted.org |
Python package downloads |
raw.githubusercontent.com |
Databricks skills |
${DATABRICKS_HOST} |
Databricks API endpoints |
Tip: Run
./scripts/check-network-deps.shto verify all dependencies are accessible before installation.
If using a firewall, allow HTTPS (443) and HTTP (80) to these domains, or use the offline installation method.
DATABRICKS_HOST- Workspace URLDATABRICKS_TOKEN- Authentication token
MLFLOW_EXPERIMENT_NAME- Custom experiment name (default:/Workspace/Shared/claude-code-tracing)
The installer supports:
- ✅ amd64 (x86_64) - Default
- ✅ arm64 (aarch64) - Auto-detected
Before installation, you can verify that all required domains are accessible using the network dependency checker:
# Standard check
./scripts/check-network-deps.sh
# Detailed output with HTTP status codes
./scripts/check-network-deps.sh --verboseExample output:
=== Claude Code Network Dependency Check ===
Checking required domains...
[OK] claude.ai
[OK] storage.googleapis.com
[OK] deb.nodesource.com
[OK] archive.ubuntu.com
[OK] ports.ubuntu.com
[OK] registry.npmjs.org
[OK] pypi.org
[OK] files.pythonhosted.org
[OK] raw.githubusercontent.com
----------------------------------------
Result: 9/9 dependencies reachable
SUCCESS: All dependencies are accessible
If any dependencies fail, the script provides troubleshooting guidance:
[OK] claude.ai
[FAIL] deb.nodesource.com - Connection timed out
...
Result: 8/9 dependencies reachable
FAILED: Some dependencies are not accessible
Troubleshooting tips:
- Check firewall rules allow HTTPS (443) to the failed domains
- Verify proxy settings if behind a corporate proxy
- For air-gapped environments, use the offline installation module
Check the init script logs:
cat /tmp/init-script-claude.logReload bashrc:
source ~/.bashrcRefresh token:
claude-refresh-tokenCheck configuration:
check-claude
claude-debugscripts/
├── install-claude.sh # Full online installer with MLflow
├── install-claude-minimal.sh # Minimal installer (Claude CLI only)
├── vscode-setup.sh # VS Code/Cursor Remote SSH helper
├── check-network-deps.sh # Network dependency checker
└── README.md # This file
Offline Installation: See the
adb-coding-assistants-cluster-offlinemodule for offline/air-gapped installation support.
- Databricks Runtime: 13.0+ LTS recommended
- Python: 3.9+ (included in DBR)
- Node.js: 20.x (installed by script)
- MLflow: 3.4+ (installed by script)
- Uses Databricks personal access tokens (auto-configured)
- Tokens are ephemeral and cluster-scoped
- No long-lived credentials stored
- All traffic uses HTTPS
- Authentication via
ANTHROPIC_AUTH_TOKENenvironment variable - Custom headers for Databricks integration
- Claude CLI Issues: Claude AI Documentation
- Databricks Issues: Contact Databricks Support
- Script Issues: Open issue in repository
See repository LICENSE file.