Skip to main content
Version: Next

lhc charts

Manage Lakehousecat analytics charts. Charts are generated by the AI during chat sessions and can be shared, cloned, or deleted via CLI.

Commands​

charts list​

lhc charts list

charts get <id>​

lhc charts get <chart-id>

charts search [query]​

Search matches a substring of the chart title — the one set on the chart, the one carried in its final metadata, or the one the model suggested. It does not search the chart's content, which is encrypted at rest.

lhc charts search "revenue"
lhc charts search --tag RED # every red chart, across all pages

--tag restricts results to charts tagged with that color; repeat it to OR-combine colors. Valid colors are RED, YELLOW, GREEN, BLUE, PURPLE, and tags are per user — --tag RED always means charts you tagged red, including ones only shared with you. Tags themselves are assigned in the UI; the CLI can only filter by them. The query is optional when --tag is given, but at least one of the two is required.


charts clone <id>​

Create an independent copy of a chart:

lhc charts clone <chart-id>

charts count​

Total number of charts:

lhc charts count

charts update <id>​

Update a chart's status. --status is required and must be draft, published, or archived:

lhc charts update <chart-id> --status published
FlagDescription
--statusNew status: draft, published, or archived (required)

Other chart fields (chart type, content, lock/enable state) are not editable here — the lock and enable states have their own commands below, and the chart content holds the embedded chart definition, which is not meant to be hand-edited from the command line.


charts data <id>​

Get a chart's current data — a live re-query, not a cached value. This is what the Refresh button in the app does, and it is the deterministic way to check whether a chart's numbers changed after a data load, without invoking the AI again:

lhc charts data <chart-id>
lhc charts data <chart-id> --type chart
lhc charts data <chart-id> --limit 500
FlagDescription
--typeWhat to fetch: sample (sample rows from the warehouse), chart (the chart's query result), or all (default)
--limitMaximum number of rows to return, 1–1000 (default: 100)

charts context <id>​

Get the same data as charts data, pre-rendered as a markdown block that the AI Agent reads to answer questions about what a chart shows. No AI call is made:

lhc charts context <chart-id>

charts types <id>​

List the chart types a chart can be converted into. Each entry shows whether the type is available and, if it isn't, why (reason). For a chart you don't own, or one that is locked, the command prints why instead of an empty table:

lhc charts types <chart-id>

charts convert <id> <viz_type>​

Change an existing chart to another chart type in place. The chart is reshaped for the target type without calling the AI and without re-running the query — the same action as the Chart Variation menu in the app. Only the owner can convert a chart, and not while it is locked. Run charts types first to see which types are available — a type that is not on that list is rejected and the chart stays unchanged:

lhc charts types <chart-id>
lhc charts convert <chart-id> pie

charts export <id>​

Export a chart as a ZIP archive containing its YAML definition. Unlike dashboards export, the result is binary, so the CLI always writes it to a file instead of stdout — defaulting to chart_<id>.zip:

lhc charts export <chart-id>
lhc charts export <chart-id> -f chart.zip
FlagDescription
-f, --output-fileWrite the export to this file (default: chart_<id>.zip)

charts delete <id>​

lhc charts delete <chart-id>

Availability and approval​

charts enable <id> / charts disable <id>​

Control whether a chart is available for use. A disabled chart stays in place but cannot be used:

lhc charts enable <chart-id>
lhc charts disable <chart-id>

charts lock <id> / charts unlock <id>​

Lock a chart to prevent edits, or unlock it to allow them again:

lhc charts lock <chart-id>
lhc charts unlock <chart-id>

charts approve <id> / charts revoke-approval <id>​

Approve a chart, or withdraw an approval that was granted earlier:

lhc charts approve <chart-id>
lhc charts revoke-approval <chart-id>

Sharing​

charts share <id>​

Share a chart with a specific user or group. Exactly one of --user or --group is required:

lhc charts share <chart-id> --user <user-id>
lhc charts share <chart-id> --group <group-id>
FlagDescription
--userTarget user ID (UUID)
--groupTarget group ID (integer)

charts unshare <id>​

Remove a share again. As with share, exactly one of --user or --group is required:

lhc charts unshare <chart-id> --user <user-id>
lhc charts unshare <chart-id> --group <group-id>
FlagDescription
--userUser ID (UUID) whose share is revoked
--groupGroup ID (integer) whose share is revoked

charts sharing <id>​

Show the sharing summary for one chart — who it is shared with and at which permission level:

lhc charts sharing <chart-id>

charts shared-by-me / charts shared-with-me​

List charts you have shared with others, or charts others have shared with you:

lhc charts shared-by-me
lhc charts shared-with-me