Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions aai_cli/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,30 +205,20 @@ def emit_error(err: CLIError, *, json_mode: bool) -> None:
error_console.print(f"[aai.muted]Suggestion:[/aai.muted] {escape(err.suggestion)}")


# The `assembly` wordmark for the bare-command welcome screen: a compact two-row
# half-block letterform, tinted to the brand accent (see theme.BRAND). Interior
# spaces are load-bearing (they separate the glyphs); trailing spaces are not, so
# they're dropped to survive whitespace-trimming tooling.
_BANNER = """\
▄▀█ █▀ █▀ █▀▀ █▀▄▀█ █▄▄ █ █▄█
█▀█ ▄█ ▄█ ██▄ █ ▀ █ █▄█ █▄▄ █"""

# A one-line header: emoji + product + version, then the product tagline.
_TAGLINE = "AssemblyAI from your terminal"


def print_banner() -> None:
"""Print the welcome header — a version + tagline line, then the `assembly` wordmark in
the brand accent (the bare-command welcome screen)."""
"""Print the welcome header — a single emoji + product + version + tagline line
in the brand accent (the bare-command welcome screen)."""
# highlight=False so Rich's repr-highlighter doesn't recolor the version digits or
# the quoted tagline — the line stays a single muted tone behind the brand label.
console.print(
f"[aai.brand]🎙️ AssemblyAI CLI[/aai.brand] "
f"[aai.muted]{__version__} — {_TAGLINE}[/aai.muted]",
highlight=False, # pragma: no mutate (purely cosmetic: toggles Rich repr coloring, not text)
)
console.print()
console.print(Text(_BANNER, style="aai.brand"))


def print_code(code: str, *, language: str = "python") -> None:
Expand Down
41 changes: 41 additions & 0 deletions docs/datadog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Datadog dashboard — CLI usage & reliability

`cli-usage-dashboard.json` is an importable Datadog dashboard for the `aai` CLI's
anonymous usage telemetry (`aai_cli/telemetry.py`). The CLI ships one log per
command run to the Datadog **Logs** intake (`source:aai-cli`) — it is Logs, **not**
RUM. Each log line = one command run.

## Prerequisite: create the facets

Log-analytics widgets only work on attributes that are **facets**. Before the
dashboard shows data, add these in **Logs → Configuration → Facets** (or expand any
`source:aai-cli` log and click each attribute → *Create facet*):

- Facets: `@command`, `@outcome`, `@cli_version`, `@os`, `@python_version`,
`@exit_code`, `@ci`, `@device_id`
- Measure (numeric, not a plain facet): `@duration_ms`

`@device_id` (unique-device counts) and `@duration_ms` (latency percentiles) are the
two that matter most.

## Import

UI: **Dashboards → New Dashboard → ⚙️ → Import dashboard JSON**, paste the file.

API:

```sh
curl -X POST "https://api.datadoghq.com/api/v1/dashboard" \
-H "DD-API-KEY: $DD_API_KEY" -H "DD-APPLICATION-KEY: $DD_APP_KEY" \
-H "Content-Type: application/json" \
-d @docs/datadog/cli-usage-dashboard.json
```

## Notes

- "Error rate" counts any `@outcome != success` — that includes expected user errors
(e.g. `auth_failure`), not just crashes. Filter to `@outcome:internal_error` for a
crash-only view.
- `@device_id` is a per-machine random UUID, so it approximates installs, not people.
- Events take ~1–2 minutes to index; a fresh `source:aai-cli` search can look empty
for a minute even when delivery succeeded.
Loading
Loading