Flytekit CLI
$ pyflyte Official Med Riskpyflyte is the command-line companion bundled with flytekit for executing Flyte tasks locally or remotely (pyflyte run --remote), serializing protobuf packages (pyflyte package), and registering workflows to a Flyte control plane. Note that Flyte 2.x succeeds pyflyte with the unified flyte CLI.
pip install flytekit pyflyte serializes local Python workflow ASTs and container image specs directly from the repo, which remote MCP servers cannot inspect or package.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Dynamic --help generation from Python type hints is helpful, but pyflyte lacks --json output across run/package/register subcommands.
- Generates typed
--helpflags from@workflowsignatures - No native
--jsonstdout formatting flag
Defaults to local execution unless --remote is explicitly passed and supports offline pyflyte package serialization, though remote runs lack --dry-run.
pyflyte rundefaults to local sandbox execution without--remotepyflyte packageproduces offline artifacts beforeregister
Distributed via PyPI (pip install flytekit) across macOS, Linux, and Windows, though container image building requires Docker or ImageSpec backends.
- Standard PyPI package
flytekit
Smoothly bridges local Python workflow iteration, serialization, and remote registration on Flyte 1.x clusters.
- Supports
run,package,register, andbackfill
Official flyteorg/flytekit project under Apache-2.0, though Flyte 2.x is transitioning users toward the newer flyte CLI.
- Official
flyteorg/flytekitrepo, succeeded byflyteCLI in Flyte 2.x
Clear docs.flyte.org CLI reference and dynamic --help output.
- Documented in Flytekit API/CLI reference at docs.flyte.org
Security, Auth & Guardrails
Reads Flyte endpoint and auth settings from ~/.flyte/config.yaml (or --config), FLYTECTL_CONFIG, or OAuth client credentials env vars.
Apache-2.0 open-source CLI; remote execution incurs Kubernetes or Union Cloud compute costs.
# Flytekit CLI (pyflyte) Agent Rules - Run workflows locally (omit `--remote`) or serialize with `pyflyte package` before targeting remote clusters. - Always pass explicit `-p <project>` and `-d <domain>` (e.g. `development`) when using `--remote` or `pyflyte register`. - Inspect typed inputs first with `pyflyte run <file.py> <workflow> --help`.
Agent-Ready Command Recipes
Safe Read-Only Queries
pyflyte run workflows/example.py my_workflow --help
Dynamically parses typed Python workflow inputs into CLI flags without executing any tasks.
Controlled Writes & Previews
pyflyte package --image ghcr.io/org/app:v1 -o ./dist
Serializes Flyte tasks and workflows to local protobuf files in ./dist without mutating a remote cluster.
Strengths for Agents
- + Automatically turns Python
@workflowparameters into self-describing CLI flags and--helpdocs. - + Local-by-default execution (
pyflyte runwithout--remote) prevents accidental cluster runs.
Caveats & Pitfalls
- ! Lacks
--jsonoutput formatting; execution URLs and status are printed as plain text. - ! Being superseded by the unified
flyteCLI in Flyte 2.x.