What the TutorFlow CLI Does
The TutorFlow CLI exposes the public agent platform API as shell commands. It is intended for AI agents, CI jobs, and local automation that need to register a workspace, inspect platform metadata, create educational content, or evaluate learner answers without writing direct HTTP client code.
The npm package is @tutorflow/cli and the executable is tutorflow.
Install @tutorflow/cli
Install globally:
Run without a global install:
npm exec --package @tutorflow/cli -- tutorflow --helpAuthenticate the CLI
Most commands require a Platform API key.
export TUTORFLOW_API_KEY="tf_platform_..."
tutorflow platform healthAuthenticated CLI requests send the key as Authorization: Bearer <apiKey>,
matching the public Platform API contract.
You can also save an API key locally:
tutorflow auth login
tutorflow config getEnvironment variables take precedence over local config.
| Variable | Description |
|---|---|
TUTORFLOW_API_KEY | Platform API key used for authenticated requests |
TUTORFLOW_BASE_URL | Override the API base URL |
TUTORFLOW_JSON | Set to 1 for machine-readable output |
TUTORFLOW_DEBUG | Set to 1 to print stack traces on errors |
Use JSON and Non-Interactive Mode
Use --json for agent-readable stdout.
tutorflow --json platform pricingIn JSON mode, successful responses are written to stdout and structured errors are written to stderr. Commands that need missing required input fail in non-interactive environments instead of launching prompts.
The CLI writes each successful JSON response as a single JSON line. The examples in this section are pretty-printed for readability.
Example error output in JSON mode:
{
"error": {
"code": "EAUTH",
"message": "Missing TutorFlow API key. Set TUTORFLOW_API_KEY or run tutorflow auth login."
}
}TutorFlow CLI Command Groups
| Command | Purpose |
|---|---|
tutorflow agent | Register and manage an agent platform workspace, email verification, billing, and checkout |
tutorflow platform | Inspect public platform metadata, pricing, and API-key health |
tutorflow module | Generate and manage standalone lesson modules |
tutorflow test | Generate and manage tests |
tutorflow slide | Generate and manage slide decks |
tutorflow video | Generate and manage videos |
tutorflow course | Generate and manage courses |
tutorflow evaluate | Evaluate learner answers |
tutorflow auth | Store or inspect local CLI credentials |
tutorflow config | Manage local CLI configuration |