@promptatoz/cli
v0.1.1
Published
PromptAtoZ CLI — Prompt engineering toolkit for testing, diffing, and validating AI prompts
Maintainers
Readme
PromptAtoZ CLI
Command-line interface for PromptAtoZ — test, diff, and validate AI prompts from your terminal.
Installation
npm install -g @promptatoz/cliQuick Start
# Initialize a new PromptAtoZ project
promptatoz init
# Create a new prompt
promptatoz new my-prompt
# Run tests
promptatoz test
# Compare prompt versions
promptatoz diff
# Validate outputs against contracts
promptatoz contract validateCommands
promptatoz init
Initialize a new PromptAtoZ project in the current directory.
promptatoz new <name>
Create a new prompt with the given name.
promptatoz test
Run test suites for your prompts.
Options:
--suite <name>— Run specific test suite--model <model>— Override model for all providers--watch— Watch for changes and re-run--json— Output as JSON
promptatoz diff
Compare two versions of a prompt.
promptatoz contract validate
Validate outputs against contracts.
promptatoz config
Manage CLI configuration.
Subcommands:
config list— Show all config valuesconfig get <key>— Get specific valueconfig set <key> <value>— Update configconfig reset— Reset to defaults
promptatoz completions
Generate shell completions.
Subcommands:
completions bash— Generate bash completionscompletions zsh— Generate zsh completionscompletions fish— Generate fish completions
Configuration
Configuration is stored in ~/.promptatoz/config.json.
Default values:
defaultModel:gpt-4o-miniconcurrency:4tokenizerModel:gpt-4o
CI/CD Integration
GitHub Actions
Use the composite action in your workflows:
- name: Run PromptAtoZ Tests
uses: promptatoz/promptatoz/.github/actions/promptatoz-test@main
with:
working-directory: '.'
promptatoz-version: 'latest'
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}GitLab CI
Include the template in your .gitlab-ci.yml:
include:
- remote: 'https://raw.githubusercontent.com/promptatoz/promptatoz/main/.gitlab-ci/promptatoz.yml'
promptatoz-test:
extends: .promptatoz-testDocumentation
Full documentation: https://promptatoz.dev/docs/cli
License
MIT
