For the complete documentation index, see llms.txt. This page is also available as Markdown.

CLI quickstart

Install the flora command-line tool and run your first FLORA Technique from the terminal, with output filtering and a polling loop for scripts and CI.

The flora CLI wraps the FLORA API for shell scripts, CI jobs and quick checks from the terminal. Install it with Go, set your API key, and you can list, run and poll Techniques without writing code.

The CLI is generated from an earlier version of the API and covers Techniques, Technique runs, runs, generations, assets, workspaces, projects and models. For newer endpoints, such as bulk uploads or LoRA training, use the TypeScript SDK or curl.

Install

You need Go 1.22 or later.

go install 'github.com/florafauna-ai/flora-cli/cmd/flora@latest'

This puts a flora binary in your Go bin directory ($(go env GOPATH)/bin). If your shell can't find it, add that directory to your PATH:

export PATH="$PATH:$(go env GOPATH)/bin"
flora --version

Configure

Set your API key in the environment. Create one in Settings → API Keys (see Authentication).

export FLORA_API_KEY="ak_XXXX"

Or pass --api-key on a command:

flora workspaces list --api-key "ak_XXXX"

First run, end to end

Replace portrait-enhancer with your Technique's slug (the last part of its URL in FLORA) or its tech_ ID.

--input takes JSON or YAML. Repeat it once per input.

Output formats

Choose a format with --format (auto, json, jsonl, pretty, raw, yaml or explore). Pull out fields with --transform, which uses GJSON syntax, and add -r to print a string without quotes:

Polling with a shell loop

Each poll counts against your workspace's rate limit, so wait about 15 seconds between polls.

Idempotency

Pass --idempotency-key when you create a run you might retry. Reusing the key in the same workspace returns the run it first created:

Errors and request IDs

A non-2xx response exits with a non-zero status and prints the API error to stderr. Add --debug to print the full HTTP exchange, including the Flora-Request-Id response header that support asks for:

See Errors for every code.

What's next

  • Run flora --help, or flora <resource> <command> --help, for every command and flag.

  • Authentication: key scopes, rotation and security.

  • Recipes: end-to-end patterns, several with a CLI version.

Last updated

Was this helpful?