Skip to content
CLI reference for ChalkSurf CLI v0.5.0. 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]
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]
--dry-run Preview eligibility and effects without submitting work [boolean]
--request-id Explicit request identity for an intentional exact resend [string]
--request-file Exclusive private attempt artifact destination [string]
--spec Editable library specification file or - for stdin [string]
--spec-out Save a local editable specification; use --dry-run to also prepare it [string]
--plan-out Save a guarded library plan; requires --dry-run [string]
--keyless Submit without a recovery key; cannot combine with --request-id [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]
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