CLI
Install the FLORA CLI and run your first Technique from the terminal.
The flora CLI wraps the FLORA REST API. Useful for shell scripts, CI jobs, quick experiments, and inspecting your workspace from the terminal.
Install
Section titled “Install”go install github.com/florafauna-ai/flora-cli/cmd/flora@latestThis drops a flora binary into $GOPATH/bin (or $GOBIN). Ensure that directory is on your PATH.
flora --versionConfigure
Section titled “Configure”Set your API key in the environment:
export FLORA_API_KEY="sk_live_XXXX"Or pass --api-key on each command:
flora workspaces list --api-key "sk_live_XXXX"First run, end to end
Section titled “First run, end to end”# 1. List Techniquesflora techniques list
# 2. Retrieve a Technique to see its inputsflora techniques retrieve --technique-id thumbnail-v3
# 3. Start a runflora techniques:runs create \ --technique-id thumbnail-v3 \ --input '{id: prompt, type: text, value: "Smart living, simple — warm minimalism"}' \ --mode async
# 4. Poll the run by IDflora techniques:runs retrieve \ --technique-id thumbnail-v3 \ --run-id run_abc123Output formats
Section titled “Output formats”By default the CLI prints JSON. Most commands support --output for alternative formats and --jq for inline filtering:
# Just the URLs from a completed runflora techniques:runs retrieve \ --technique-id thumbnail-v3 \ --run-id run_abc123 \ --jq '.outputs[].url'Polling with a shell loop
Section titled “Polling with a shell loop”RUN_ID=$(flora techniques:runs create \ --technique-id thumbnail-v3 \ --input '{id: prompt, type: text, value: "..."}' \ --mode async \ --jq '.runId' -r)
while true; do STATUS=$(flora techniques:runs retrieve \ --technique-id thumbnail-v3 \ --run-id "$RUN_ID" \ --jq '.status' -r)
case "$STATUS" in completed) echo "done"; break ;; failed) echo "failed"; exit 1 ;; *) sleep 2 ;; esacdone
flora techniques:runs retrieve \ --technique-id thumbnail-v3 \ --run-id "$RUN_ID" \ --jq '.outputs[].url' -rIdempotency
Section titled “Idempotency”Pass --idempotency-key on any mutation you might retry:
flora techniques:runs create \ --technique-id thumbnail-v3 \ --input '...' \ --mode async \ --idempotency-key "q3-thumb-DE"See Idempotency for the full semantics.
Errors and request IDs
Section titled “Errors and request IDs”Non-2xx responses print to stderr with the request ID and error code. Capture both:
if ! flora techniques:runs retrieve --technique-id ... --run-id ... 2> err.log; then cat err.log exit 1fiSee Errors.
What’s next
Section titled “What’s next”- Authentication — keys, rotation, security.
- Recipes — common end-to-end patterns.
- API Reference — every command, subcommand, and flag.