TutorFlow CLI Overview

Install and configure @tutorflow/cli for agent platform workflows, JSON output, auth, and CI automation.

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 --help

Authenticate the CLI

Most commands require a Platform API key.

export TUTORFLOW_API_KEY="tf_platform_..."
tutorflow platform health

Authenticated 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 get

Environment variables take precedence over local config.

VariableDescription
TUTORFLOW_API_KEYPlatform API key used for authenticated requests
TUTORFLOW_BASE_URLOverride the API base URL
TUTORFLOW_JSONSet to 1 for machine-readable output
TUTORFLOW_DEBUGSet to 1 to print stack traces on errors

Use JSON and Non-Interactive Mode

Use --json for agent-readable stdout.

tutorflow --json platform pricing

In 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

CommandPurpose
tutorflow agentRegister and manage an agent platform workspace, email verification, billing, and checkout
tutorflow platformInspect public platform metadata, pricing, and API-key health
tutorflow moduleGenerate and manage standalone lesson modules
tutorflow testGenerate and manage tests
tutorflow slideGenerate and manage slide decks
tutorflow videoGenerate and manage videos
tutorflow courseGenerate and manage courses
tutorflow evaluateEvaluate learner answers
tutorflow authStore or inspect local CLI credentials
tutorflow configManage local CLI configuration