Skip to main content

DataSpring CLI

Query metrics and manage dashboards from the terminal.

Installation

# 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

Metadata

Release files for dataspring-cli 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dataspring-cli 0.4.0
File Size Uploaded Provenance
dataspring_cli-0.4.0.tar.gz 103.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dataspring-cli 0.4.0
File Interpreter ABI Platform
dataspring_cli-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 213.9 kB

Release files / dataspring_cli-0.4.0.tar.gz

Download URL dataspring_cli-0.4.0.tar.gz
Size 103.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9ca684eeda2ea5783f03ef6e686e6e2f9c2b1c859c9faefecbb9d0f0ac04057f
BLAKE2b-256 checksum
How to use checksums
3e12e80079028059a5e7586b4c35ddd5bc4d3e9c7a35b8a1a9a3989229d34d09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / dataspring_cli-0.4.0-py3-none-any.whl

Download URL dataspring_cli-0.4.0-py3-none-any.whl
Size 110.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
619a9412b9e110f83cf565b8c37d9afb02c88f30d61f4a60f776c3d8eec5b6b9
BLAKE2b-256 checksum
How to use checksums
26e3c0a312f93ea6c253e95063b53503ff2304ecffff9e9bf2e4be7945b19285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Security for dataspring-cli 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dataspring_cli-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page