Goal: Add plit api subcommand tree that wraps the generated pipelit-client crate, providing CLI access to all Pipelit API endpoints.
Context: The generated client handles HTTP + serialization. This ticket adds the clap subcommand structure, argument parsing, and output formatting. Uses the token from plit auth login.
Subcommand tree:
plit api
├── workflow list [--limit N] [--offset N]
├── workflow get <slug>
├── workflow create --name <name> --slug <slug> [--description ...]
├── workflow update <slug> [--name ...] [--description ...]
├── workflow delete <slug>
├── workflow validate <slug>
├── workflow import-dsl --file <path>
├── workflow export-dsl <slug>
├── node list <workflow-slug>
├── node create <workflow-slug> --type <component_type> [--label ...] [--config ...]
├── node update <workflow-slug> <node-id> [--label ...] [--config ...]
├── node delete <workflow-slug> <node-id>
├── edge list <workflow-slug>
├── edge create <workflow-slug> --source <id> --target <id> [--type direct|conditional]
├── edge delete <workflow-slug> <edge-id>
├── execution list [--workflow <slug>] [--status ...]
├── execution get <execution-id>
├── execution cancel <execution-id>
├── credential list
├── credential create --name <name> --type <llm|gateway|git|tool>
├── credential test <id>
└── credential models <id>
Output modes (existing plit pattern):
- TTY: human-readable tables
- Piped: JSON
--json flag: force JSON
Acceptance Criteria:
Dependencies: Generated API client crate (plit #12)
Priority: P0 (agents need this to interact with Pipelit)
Goal: Add
plit apisubcommand tree that wraps the generatedpipelit-clientcrate, providing CLI access to all Pipelit API endpoints.Context: The generated client handles HTTP + serialization. This ticket adds the clap subcommand structure, argument parsing, and output formatting. Uses the token from
plit auth login.Subcommand tree:
Output modes (existing plit pattern):
--jsonflag: force JSONAcceptance Criteria:
plit api workflow listworks end-to-endplit api workflow get <slug>shows nodes/edgesplit api node createwith--configJSON flagplit api execution listwith status filteringplit api workflow import-dslreads DSL file and creates workflowplit api workflow export-dsloutputs DSL text--jsonoutput mode for all commandsDependencies: Generated API client crate (plit #12)
Priority: P0 (agents need this to interact with Pipelit)