stmo-cli 0.11.0

Turn Claude Code into a data analyst on sql.telemetry.mozilla.org
Documentation
# Changelog

## [0.11.0] - 2026-09-07

### Features
- `init [PATH]`: scaffold a directory of your choice instead of always the current directory (defaults to `.` when omitted)
- `init` is now an interactive wizard: git repo, initial commit, linter configs, pre-commit hooks and `CLAUDE.md` are each opt-in questions instead of always happening, and it needs a real terminal to ask them in ([#2]https://github.com/mozilla/stmo-cli/issues/2)

### Fixes
- `init`: refuse to scaffold into a directory containing unrelated files (e.g. your home directory), which previously ran `git add .`/`git commit` over everything in it ([#42]https://github.com/mozilla/stmo-cli/issues/42)
- `deploy` / `snippets deploy`: no args now compares each tracked query/snippet against its server copy instead of asking git what changed — a freshly fetched, unmodified query or snippet no longer deploys just because it's untracked, and deploying twice in a row no longer redeploys everything the second time ([#22]https://github.com/mozilla/stmo-cli/issues/22)

## [0.10.0] - 2026-09-02

### Features
- `login`: store your Redash API key in the macOS Keychain; `REDASH_API_KEY` now falls back to it automatically (with a hidden first-run prompt in interactive terminals), so you no longer need to export the key in every shell/session

## [0.9.1] - 2026-07-17

### Fixes
- `execute`: cancel the Redash job when it times out or is interrupted (Ctrl-C), instead of leaving it running server-side with nobody waiting for the result ([#21]https://github.com/mozilla/stmo-cli/issues/21)
- `execute --format table`: fix a panic when truncating a cell containing multi-byte, non-ASCII characters near the truncation boundary

## [0.9.0] - 2026-07-16

### Features
- `execute --data-source ID`: run arbitrary SQL against a data source (stdin or `--file PATH`), creating no stored query
- `snippets list|fetch|deploy|delete`: manage Redash query snippets, mirroring the queries/dashboards file model (`snippets/{id}-{trigger}.sql` + `.yaml`)

### Fixes
- `execute ID`: deploy local changes automatically before executing, so it never silently runs a stale server copy (previously it always ran whatever was last deployed, ignoring unsynced local edits)
- `execute`: tolerate a null column `type` in query results (some data sources, e.g. Postgres, don't always report a type; previously caused a deserialization error)

## [0.8.0] - 2026-07-02

### Features
- `schedule <IDs> --interval <SECONDS> [--time HH:MM] [--day-of-week N]`: set a query's refresh schedule in the local YAML (run `deploy` to push to Redash)
- `schedule <IDs> --clear`: remove the refresh schedule from the local YAML
- `discover --search`/`-q`: full-text search across all queries and dashboards (with `--limit`, default 50)
- `execute` now resolves dynamic date tokens client-side

### Fixes
- `discover`/`fetch`: tolerate string `interval` values in query schedules returned by Redash (previously caused a deserialization error)

## [0.7.0] - 2026-05-27

### Features
- Add LLM-optimized `--help` output when running inside an AI coding assistant

### Fixes
- `execute --interactive`: fall back to parameter defaults when no TTY is available, instead of blocking
- `update`: detect `~/.cargo/` write restrictions and show a clear error with instructions
- `init`: produce a single clean initial commit (no more `git commit --amend`); clear inherited git environment variables so commands work correctly inside worktrees

## [0.6.1] - 2026-05-22

### Fixes
- `execute`: coerce numeric `--param` values to strings for text/date parameters (fixes Redash 400 errors)

## [0.6.0] - 2026-05-22

### Features
- Add `cargo binstall` support for pre-built binary installation
- Replace custom update checker with `moz-cli-version-check` (shared cache with other Mozilla CLI tools)
- `update` subcommand now tries `cargo binstall` first, falling back to `cargo install`
- Add CI workflow for tests, formatting, clippy checks, and cross-platform release builds

### Fixes
- `init`: skip pre-commit setup and "Next steps" message when repository is already initialized

## [0.5.4] - 2026-04-29

### Fixes
- Switch reqwest TLS backend from `native-tls` to `rustls-tls` to fix HTTPS connections through HTTP CONNECT proxies on macOS (`OSStatus -26276`)

## [0.5.3] - 2026-04-02

### Fixes
- `dashboards deploy`: update existing widgets (non-zero ID) when `visualization_name` or `position` changes in the YAML

## [0.5.2] - 2026-03-25

### Fixes
- `dashboards deploy`: resolve `visualization_id` from `query_id` + `visualization_name` so query-backed widgets are no longer created as empty widgets

## [0.5.1] - 2026-03-24

### Fixes
- `deploy`: fix visualizations with explicit IDs being overwritten when adding a new visualization of the same type

## [0.5.0] - 2026-03-18

### Features
- Track `Cargo.lock` for reproducible binary builds
- `execute`: output a plain JSON rows array; progress messages go to stderr for clean piping; no default row limit
- `deploy`: use `null` visualization id to signal new visualizations (replaces id=0 convention; existing YAMLs with `id: 0` still work)
- `deploy`: no longer requires git — falls back gracefully when git is unavailable or outside a repo

### Fixes
- Add `width` field to `Widget` and `WidgetMetadata` for correct API/YAML round-trips
- Fix `Widget.text` deserialization when API returns `null`
- Fix `dashboards archive` — use POST by ID instead of DELETE (DELETE returns 500)

## [0.4.1] - 2026-03-04

### Fixes
- Fix text widget creation by serializing `visualization_id` as `null` instead of omitting it

## [0.4.0] - 2026-03-03

### Features
- Add `--version` flag to CLI
- Add automatic update check on invocation (checks crates.io, cached for 24h)
- Add `update` subcommand to update stmo-cli via `cargo install`
- Sort visualizations by ID and rewrite YAML on deploy

## [0.3.0] - 2026-02-27

### Features
- Auto-populate `parameterMappings` with `type: dashboard-level` for new widgets during dashboard deploy
- Auto-enable `dashboard_filters_enabled` when any new widget has parameters

## [0.2.0] - 2026-02-27

### Features
- Reuse auto-created visualizations when deploying new queries
- Auto-favorite dashboards after creating with id: 0
- Auto-rename query files after deploying with id: 0

### Fixes
- Fix `archive_dashboard` to use slug instead of ID
- Fix widget creation: add required `width` and `text` fields
- Include response body in API error messages

### Docs
- Improve deploy docs: default behavior and commit ordering
- Add `cargo install stmo-cli` to template Quick Reference
- Update installation docs to use `cargo install stmo-cli`

## [0.1.0] - 2026-02-26

Initial release.