DataSpring CLI
Query metrics and manage dashboards from the terminal.
Installation
Using uv (Recommended)
# Install from local build
uv tool install ./backend
# Or install from GitHub (once published)
uv tool install git+https://github.com/dataspring/dataspring#subdirectory=backend
Using pip
pip install ./backend
Quick Start
# Login with Google OAuth
dataspring login
# Check who you're logged in as
dataspring whoami
# List available metrics
dataspring metrics list
# Query metrics
dataspring query -m total_revenue -g month --limit 5
# Get visualization suggestions
dataspring query -m total_revenue -g month --suggest-viz
# Export to JSON
dataspring query -m total_revenue --format json > data.json
Commands
Authentication
dataspring login # Login via Google OAuth (opens browser)
dataspring whoami # Show current user and organization
dataspring logout # Clear stored credentials
dataspring org list # List your organizations
dataspring org switch ID # Switch to a different organization
Querying Metrics
# List available metrics
dataspring metrics list
dataspring metrics list --format json
# Get metric details
dataspring metrics show total_revenue
# Query data
dataspring query -m revenue -g month # Monthly revenue
dataspring query -m revenue -d region --limit 10 # By region
dataspring query -m revenue -m orders -g week # Multiple metrics
dataspring query -m revenue --start 2024-01-01 --end 2024-12-31
# With visualization suggestion
dataspring query -m revenue -g month --suggest-viz
# List dimensions
dataspring dimensions list
Dashboard Management
# List dashboards
dataspring dashboards list
# Show dashboard details
dataspring dashboards show DASHBOARD_ID
# Create a new dashboard
dataspring dashboards create "My Dashboard"
dataspring dashboards create "Team Metrics" -v org # Visible to team
# Delete a dashboard
dataspring dashboards delete DASHBOARD_ID
dataspring dashboards delete DASHBOARD_ID --yes # Skip confirmation
Manifest Management (Admin Only)
# View manifest status
dataspring manifest status
# Export manifest
dataspring manifest export -o manifest.yaml
# Import manifest
dataspring manifest upload manifest.yaml
dataspring manifest upload manifest.yaml --force # Overwrite conflicts
# Semantic models
dataspring models list
dataspring models show orders
dataspring models create model.yaml
dataspring models update orders updated.yaml
dataspring models delete orders
# Metrics
dataspring metrics create metric.yaml
dataspring metrics update total_revenue updated.yaml
dataspring metrics delete total_revenue
dataspring metrics preview metric.yaml # Test before saving
Output Formats
All commands support --format:
| Format | Description |
|---|---|
table |
Human-readable ASCII table (default) |
json |
JSON output for scripting |
yaml |
YAML output for config editing |
dataspring metrics list --format json | jq '.[0]'
dataspring dashboards show abc123 --format yaml > dashboard.yaml
Configuration
Credentials are stored in ~/.dataspring/:
~/.dataspring/
├── credentials.json # OAuth tokens (encrypted)
└── config.json # User preferences
Development
# Build the wheel
cd backend
uv build
# Install locally for testing
uv tool install dist/dataspring_cli-*.whl --force
# Run tests
uv run pytest tests/ -v
Environment Variables
| Variable | Description |
|---|---|
FIRESTORE_EMULATOR_HOST |
Use Firestore emulator |
FIREBASE_AUTH_EMULATOR_HOST |
Use Auth emulator |
ENV |
Environment: production, development, test |
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 dataspring_cli-0.3.0.tar.gz.
File metadata
- Download URL: dataspring_cli-0.3.0.tar.gz
- Upload date:
- Size: 94.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54792025ece4b0d153a7b9daa38b8776ef7bfad359294606dbf8b939ebfbae37
|
|
| MD5 |
c17d11724948c2554654e049c90c4f2a
|
|
| BLAKE2b-256 |
66f97e2128572c196a6659c62a7d12407f130948e587852591d2df6b0c2a8b31
|
Provenance
The following attestation bundles were made for dataspring_cli-0.3.0.tar.gz:
Publisher:
release-cli.yml on pengelbrecht/dataspring
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dataspring_cli-0.3.0.tar.gz -
Subject digest:
54792025ece4b0d153a7b9daa38b8776ef7bfad359294606dbf8b939ebfbae37 - Sigstore transparency entry: 2886012328
- Sigstore integration time:
-
Permalink:
pengelbrecht/dataspring@480f10a4a2f35ae704565118710e9bb244f6862d -
Branch / Tag:
refs/tags/cli-v0.3.0 - Owner: https://github.com/pengelbrecht
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-cli.yml@480f10a4a2f35ae704565118710e9bb244f6862d -
Trigger Event:
push
-
Statement type:
File details
Details for the file dataspring_cli-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dataspring_cli-0.3.0-py3-none-any.whl
- Upload date:
- Size: 101.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cc617c72d8e9e75a1275d33611a25da2ef5f524bda4b9be0a916e396d0c465f
|
|
| MD5 |
949e4fa498a0939ab16cec52c03dfe17
|
|
| BLAKE2b-256 |
5ee32d7478a9807a937cadcd071caed3ec7b0aa54ea6794fb6b000ce6d5b197b
|
Provenance
The following attestation bundles were made for dataspring_cli-0.3.0-py3-none-any.whl:
Publisher:
release-cli.yml on pengelbrecht/dataspring
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dataspring_cli-0.3.0-py3-none-any.whl -
Subject digest:
8cc617c72d8e9e75a1275d33611a25da2ef5f524bda4b9be0a916e396d0c465f - Sigstore transparency entry: 2886012340
- Sigstore integration time:
-
Permalink:
pengelbrecht/dataspring@480f10a4a2f35ae704565118710e9bb244f6862d -
Branch / Tag:
refs/tags/cli-v0.3.0 - Owner: https://github.com/pengelbrecht
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-cli.yml@480f10a4a2f35ae704565118710e9bb244f6862d -
Trigger Event:
push
-
Statement type: