Metricly CLI - Query metrics and manage dashboards from the terminal
Project description
Metricly 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/metricly/metricly#subdirectory=backend
Using pip
pip install ./backend
Quick Start
# Login with Google OAuth
metricly login
# Check who you're logged in as
metricly whoami
# List available metrics
metricly metrics list
# Query metrics
metricly query -m total_revenue -g month --limit 5
# Get visualization suggestions
metricly query -m total_revenue -g month --suggest-viz
# Export to JSON
metricly query -m total_revenue --format json > data.json
Commands
Authentication
metricly login # Login via Google OAuth (opens browser)
metricly whoami # Show current user and organization
metricly logout # Clear stored credentials
metricly org list # List your organizations
metricly org switch ID # Switch to a different organization
Querying Metrics
# List available metrics
metricly metrics list
metricly metrics list --format json
# Get metric details
metricly metrics show total_revenue
# Query data
metricly query -m revenue -g month # Monthly revenue
metricly query -m revenue -d region --limit 10 # By region
metricly query -m revenue -m orders -g week # Multiple metrics
metricly query -m revenue --start 2024-01-01 --end 2024-12-31
# With visualization suggestion
metricly query -m revenue -g month --suggest-viz
# List dimensions
metricly dimensions list
Dashboard Management
# List dashboards
metricly dashboards list
# Show dashboard details
metricly dashboards show DASHBOARD_ID
# Create a new dashboard
metricly dashboards create "My Dashboard"
metricly dashboards create "Team Metrics" -v org # Visible to team
# Delete a dashboard
metricly dashboards delete DASHBOARD_ID
metricly dashboards delete DASHBOARD_ID --yes # Skip confirmation
Manifest Management (Admin Only)
# View manifest status
metricly manifest status
# Export manifest
metricly manifest export -o manifest.yaml
# Import manifest
metricly manifest upload manifest.yaml
metricly manifest upload manifest.yaml --force # Overwrite conflicts
# Semantic models
metricly models list
metricly models show orders
metricly models create model.yaml
metricly models update orders updated.yaml
metricly models delete orders
# Metrics
metricly metrics create metric.yaml
metricly metrics update total_revenue updated.yaml
metricly metrics delete total_revenue
metricly 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 |
metricly metrics list --format json | jq '.[0]'
metricly dashboards show abc123 --format yaml > dashboard.yaml
Configuration
Credentials are stored in ~/.metricly/:
~/.metricly/
├── 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/metricly_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 |
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
metricly_cli-0.1.6.tar.gz
(299.4 kB
view details)
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 metricly_cli-0.1.6.tar.gz.
File metadata
- Download URL: metricly_cli-0.1.6.tar.gz
- Upload date:
- Size: 299.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b79a517e1c5cee7f24d0bad22669b144752d36cead560333bf01837ffd8774c
|
|
| MD5 |
c8f2f548692a59d73eaf9173d76bef50
|
|
| BLAKE2b-256 |
d717a684c25365a4aa2cdeeeed59ed343eea11a7eaabbede5fd6299fdd61d165
|
File details
Details for the file metricly_cli-0.1.6-py3-none-any.whl.
File metadata
- Download URL: metricly_cli-0.1.6-py3-none-any.whl
- Upload date:
- Size: 71.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dd1b0e962e6f57a3fc190b2b16acfc7712ca9b9411cb73328893b1d5c1a84d0
|
|
| MD5 |
85d6a30e511271f1b6cf42a8e9dc831c
|
|
| BLAKE2b-256 |
1fc60d8def6d2bf0ab36df8f9aa63f2b852c57ab8eeb24c164ce44e50d093040
|