Skip to content
CLI reference for ChalkSurf CLI v0.3.6. Your installed chalksurf --help output remains authoritative for that binary.

chalksurf exercise figure upload

chalksurf exercise figure upload <exerciseId> [source]
Upload and attach a reviewed figure image to an exercise
Positionals:
exerciseId Exercise ID to attach the figure to [string] [required]
source Local image file path. Omit when using --input-json for HTTPS/base64/rendered sources. [string]
Options:
--json Write machine-readable JSON to stdout [boolean] [default: false]
--result-file Publish the complete JSON result envelope to a new private file [string]
--base-url Base URL of the ChalkSurf API [string]
--organization Organization ID to use for this command [string]
--profile CLI profile to use for this command [string]
-v, --version Show the CLI version [boolean]
--help Show help [boolean]
--input-json JSON object matching the figure upload contract [string]
--figure-type Whether this figure belongs with the exercise text or solution [string] [choices: "text", "solution"]
--width-cm Display width in centimeters [number]
--original-file-name Original file name to store in figure provenance [string]
--allow-needs-revision Allow uploading a rendered figure whose quality status is needs_revision [boolean] [default: false]
Examples:
chalksurf exercise figure upload 00000000-0000-4000-8000-000000000001 ./triangle.png --figure-type text --json Upload a local figure image
chalksurf exercise figure upload 00000000-0000-4000-8000-000000000001 --input-json '{"exerciseId":"00000000-0000-4000-8000-000000000001","figureType":"text","source":{"kind":"https_url","url":"https://example.com/figure.png"}}' --json Upload a figure from an HTTPS image URL