Skip to main content

Command-line interface for TheFluxTrain APIs

Project description

thefluxtrain-cli

Command-line interface for TheFluxTrain APIs.

Install

pip install thefluxtrain-cli
# or
uv tool install thefluxtrain-cli

Commands

tft login      # Device-code sign-in via thefluxtrain.com
tft logout     # Clear local credentials and local CLI data
tft sync       # Refresh the CLI command list
tft whoami     # Show signed-in email
tft commands   # List all available API commands
tft media info # Get video, audio, or image metadata via the API
tft jobs wait  # Poll until an async generation job completes

Quick start

tft login
tft commands
tft whoami

Output format

Manifest commands print compact single-line JSON by default:

tft files upload --file ./photo.png --fields data.url
tft flow-studio create --name "My flow" --fields data.flow_id
tft video-editor get --project-id PID --output pretty
Flag Effect
--output json (default) Compact single-line JSON
--output pretty Indented JSON
--output yaml YAML
--fields data.url Plain value(s), comma-separated for multiple paths

API failures print a JSON envelope to stdout (data: null, error: { code, message }) with exit code 1.

For --actions JSON (flow-studio apply, video-editor apply-*), pass inline JSON, @path/to/file.json, or - for stdin.

Async jobs: tft jobs wait --editor-id JOB_ID (or poll with tft jobs check-status).

How login works

  1. tft login requests a device code from the API.
  2. Open https://thefluxtrain.com/cli/authorize and sign in if needed.
  3. Enter the code from your terminal and click Authorize CLI.
  4. The CLI stores an API key in ~/.config/thefluxtrain/credentials.json.
  5. The CLI command list is refreshed automatically after login.

Command list refresh

The CLI keeps its command list and help text up to date automatically. Run tft sync to refresh manually, then use tft commands and tft <group> <command> --help to discover what is available.

Media metadata

Probing runs on the render service (MoviePy + ffmpeg):

tft media info --file ./clip.mp4
tft media info --url UPLOAD_URL --fields data.duration

Optional env var: THEFLUXTRAIN_RENDER_API (default https://render.thefluxtrain.com, same as frontend VITE_RENDER_API).

Use data.duration for audio clips; use data.width, data.height, and data.duration for video/image createAsset apply actions after tft files upload.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thefluxtrain_cli-0.1.29.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thefluxtrain_cli-0.1.29-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file thefluxtrain_cli-0.1.29.tar.gz.

File metadata

  • Download URL: thefluxtrain_cli-0.1.29.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for thefluxtrain_cli-0.1.29.tar.gz
Algorithm Hash digest
SHA256 840a02ef773824c5d61b274089855106111e4935869971cd0548d8636fa78c42
MD5 32a98133a436a5ce268a8b78b71d6aa1
BLAKE2b-256 88249ab03e582b6312438ed5aea09d7390c5d6ce1315812ab78af0f7b1e53cfa

See more details on using hashes here.

File details

Details for the file thefluxtrain_cli-0.1.29-py3-none-any.whl.

File metadata

  • Download URL: thefluxtrain_cli-0.1.29-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for thefluxtrain_cli-0.1.29-py3-none-any.whl
Algorithm Hash digest
SHA256 93ae0b3ecc45de8abc2485f5048b0f635d03b09b96d7c360324263a804077f12
MD5 91194cb680f99ab13f0d560cff92af6e
BLAKE2b-256 18c595fa9647c09f14ce2a043ebbbb83ee4ceb757d036eb4349c80bc027e5828

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page