@trunkate-ai/cli
v0.3.0
Published
Command-line interface for Trunkate AI
Readme
Trunkate AI CLI
The trunkate CLI is the easiest way to integrate prompt optimization into CI/CD pipelines, shell scripts, or Makefile routines. It accepts direct flags and correctly handles STDOUT / STDERR routing to avoid breaking data pipes.
Installation
You can install the CLI globally via NPM:
npm install -g @trunkate-ai/cliAuthentication
Set your API token in your shell profile (~/.zshrc or ~/.bashrc), or pass it via the -k flag.
export TRUNKATE_API_KEY="tk_live_..."Usage
# 1. Provide your long prompt as text
# 2. Add flags for task, budget, and target model
trunkate-ai \
--text "Your very long context..." \
--task "Summarize this document" \
--budget 500 \
--model "gpt-4o"Global Flags
| Flag | Shorthand | Description |
| :--- | :--- | :--- |
| --text | -t | Required. The actual long prompt to optimize. |
| --task | | Recommended context instructions. |
| --budget | -b | Maximum target token budget. |
| --model | -m | Target model architecture. |
| --api-key | -k | Override environment key. |
| --url | -u | Override target endpoint for testing. |
