Skip to content

Canvas

The canvas command group pushes artifacts onto the canvas of a Hutly conversation and inspects what has already been pushed. Use it to surface generated HTML or Markdown to the user mid-conversation — either from an artifact that already exists, or directly from content piped on stdin.

hutly canvas <verb> [options]

Every subcommand targets a single conversation. The conversation ID comes from --conversation-id or, when omitted, the HUTLY_CONVERSATION_ID environment variable. If neither is set, the command fails with Need --conversation-id or HUTLY_CONVERSATION_ID. Authentication uses your configured HUTLY_API_KEY and org credentials (see Configuration); access is scoped to the conversation, and pushing to a conversation that has ended returns a 410.

Subcommands

push

Push an artifact that already exists to the canvas. By default the artifact’s current version is pushed; pass --version to pin a specific version.

# Push the current version of an artifact
hutly canvas push art_123 --conversation-id conv_abc

# Push a specific version
hutly canvas push art_123 --version ver_456
Option Description
--version <id> Specific version ID to push. Defaults to the artifact’s current version.
--conversation-id <id> Target conversation. Defaults to HUTLY_CONVERSATION_ID.
--json Emit machine-readable JSON instead of the human summary.

On success the command reports the resulting canvas push ID.

push-inline

Read content from stdin, publish it as a new artifact, and push it to the canvas in one step. The required <kind> argument selects the content type and must be either html or markdown; any other value fails with kind must be 'html' or 'markdown'. Empty stdin fails with No input received on stdin.

# Push a generated HTML report straight from a pipe
generate-report | hutly canvas push-inline html --name "Q2 Summary"

# Push Markdown from a file via stdin redirection
hutly canvas push-inline markdown < notes.md
Option Description
--name <name> Display title for the published artifact. Defaults to a timestamp-based name.
--conversation-id <id> Target conversation. Defaults to HUTLY_CONVERSATION_ID.
--json Emit machine-readable JSON instead of the human summary.

On success the command reports the new artifact’s ID.

push vs push-inline. Use push when the artifact already exists and you have its ID — it references existing stored content. Use push-inline when you have raw content (from a pipe, file, or generator) and no artifact yet — it publishes the content as a new artifact and pushes it in a single command.

list

List the canvas pushes for the conversation, most recent first. Each entry shows its name, push ID, source artifact and version, kind, and push timestamp.

hutly canvas list --conversation-id conv_abc

# Machine-readable output for scripting
hutly canvas list --json
Option Description
--conversation-id <id> Conversation to inspect. Defaults to HUTLY_CONVERSATION_ID.
--json Emit machine-readable JSON instead of the human summary.