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

Uploaded Python 3

File details

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

File metadata

  • Download URL: thefluxtrain_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 13.1 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.2.tar.gz
Algorithm Hash digest
SHA256 e93ddb3ca778727e5acc12868c73e2e64b7f8f4a8ffaa7f8e3620685bbde092e
MD5 363036e28a632ecd66c02c4cd49ac649
BLAKE2b-256 48781a37214fafa593880cea00be9fa0fe9a92a1d440e2b744917468edf208d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: thefluxtrain_cli-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9d4dacf617fbcc4486cfaa038e246de810e51f168d3d9f2c4bcbdee0201e8313
MD5 9a46d1be4a1d2213c9005fab4a57ce19
BLAKE2b-256 a801c41b9a2314c1974e6aef61da3b51f2f1420f00488f764ac41f605768a483

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