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.1.tar.gz (13.2 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.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: thefluxtrain_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 13.2 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.1.tar.gz
Algorithm Hash digest
SHA256 9bb5f1d49b13df6e401e0a37ada9591eb6f916cb58e06e7ee41d4ad7f4f82933
MD5 7ed6107d6bd67c0543c86e3cf7e40ae6
BLAKE2b-256 269e884c8266c26fef218ecf7bceddbc6912547be9feb8dd5187d657e8c4e8cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: thefluxtrain_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54f0005804d1464efd7a81715bc9ed1bfef5138707bebe6932de32c302635375
MD5 dc6211edcca7d0e7f83947981e8f9f5c
BLAKE2b-256 a803a4fdb3eb814141dbe7988629b517829397c74e418e31f8bb61a6d13f1779

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