| name | aaplot |
| description | Renders terminal charts (bar, line, area, scatter, histogram) from JSON data. Use when the user needs to visualize data in the terminal, create charts from BigQuery output, plot CSV/JSON data, or generate quick data visualizations without leaving the command line. |
| allowed-tools | Bash(aaplot:*) |
Terminal Charts with aaplot
Quick start
echo '[{"category":"A","count":"10"},{"category":"B","count":"25"}]' | aaplot bar --x category --y count
echo '[{"date":"2024-01","value":"10"},{"date":"2024-02","value":"25"}]' | aaplot line --x date --y value
echo '[{"x":"1.5","y":"10"},{"x":"3.2","y":"22"}]' | aaplot scatter --x x --y y
echo '[{"score":"72"},{"score":"85"},{"score":"91"}]' | aaplot histogram --x score
echo '[{"date":"2024-01","value":"10"},{"date":"2024-02","value":"25"}]' | aaplot area --x date --y value
Commands
Bar chart
aaplot bar --x <field> --y <field> [options]
Renders a vertical bar chart using Unicode block elements for 1/8 character precision.
Line chart
aaplot line --x <field> --y <field> [options]
Renders a line chart using Bresenham's algorithm with markers.
Area chart
aaplot area --x <field> --y <field> [options]
Renders an area chart with filled region below the line.
Scatter plot
aaplot scatter --x <field> --y <field> [options]
Renders a scatter plot using braille characters (U+2800-U+28FF) for 2x4 pixel resolution per cell.
Histogram
aaplot histogram --x <field> [--bins <n>] [options]
Renders a histogram with automatic binning (Sturges' rule) or manual bin count.
Common options
--width <n>
--height <n>
--theme <t>
--title <t>
--json <data>
--dry-run
--color
--group <field>
Input format
aaplot accepts JSON array or NDJSON (newline-delimited JSON) via stdin or --json flag. All values are strings (BigQuery format).
bq query --format=json "SELECT date, count FROM dataset.table" | aaplot line --x date --y count
aaplot bar --x name --y value --json '[{"name":"A","value":"10"},{"name":"B","value":"20"}]'
echo '{"x":"1","y":"2"}
{"x":"3","y":"4"}' | aaplot scatter --x x --y y
Multi-series
Use --group <field> to split data by a field for multi-series charts. Each series gets a distinct color with a legend.
echo '[{"date":"Jan","sales":"10","region":"East"},{"date":"Jan","sales":"15","region":"West"}]' | aaplot line --x date --y sales --group region
Agent introspection
aaplot schema
aaplot schema bar
Validation-only mode
aaplot bar --x category --y count --json '[...]' --dry-run