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

For local development from this monorepo:

cd thefluxtrain-cli
uv sync
uv run tft --help

Configure

Optional override:

Variable Default
THEFLUXTRAIN_API_URL https://api.thefluxtrain.com/api/v1
THEFLUXTRAIN_CONFIG_DIR ~/.config/thefluxtrain
THEFLUXTRAIN_CACHE_DIR ~/.cache/thefluxtrain

Commands

tft login      # Device-code sign-in via thefluxtrain.com
tft logout     # Clear local credentials and manifest cache
tft sync       # Fetch latest manifest YAML from the API
tft whoami     # Show logged-in user and API key id
tft commands   # List all API commands from the cached manifest

Quick start

tft login
tft commands
tft whoami

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 manifest is synced automatically after login.

Manifest sync

The manifest (command list and help text) is fetched from GET /api/v1/cli/manifest and cached at ~/.cache/thefluxtrain/manifest.yaml. It syncs automatically when missing or older than 7 days. Run tft sync to refresh manually.

Development

cd thefluxtrain-cli
uv sync --group dev
uv run pytest

Local API testing:

export THEFLUXTRAIN_API_URL="http://127.0.0.1:5021/api/v1"
uv run tft login

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.0.tar.gz (12.7 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.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: thefluxtrain_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.0.tar.gz
Algorithm Hash digest
SHA256 2704a8418a5eb7bcab367e728a3a6ec115504393e652623cae0468dbdb1bec2b
MD5 b3ece85de4abb7e61b510ac968b0f963
BLAKE2b-256 a6eb4286a2852fd71c638d7e5847e548351c8dc8d0592f33f341b8e2425790d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: thefluxtrain_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db6864fa66e3eaf6592a5df4b6580a9c7434a7b0da5646cc380a06d6685d4fc6
MD5 7bc171a97b9ba3c11e6a7261a620afe0
BLAKE2b-256 75e3afc0e748a5e107f5691e5c53050d6e4397bf750468d7a52c7cec405743f3

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