CLI Reference
Complete command-line reference for all prompd CLI implementations (Python, Node.js, Go).
Note: Commands are consistent across all CLI implementations.
Examples shown use the generic prompd command.
Global Options
| Option | Description |
|---|---|
| --version | Show version number |
| --help | Show help message |
| --verbose, -v | Enable verbose logging |
| --quiet, -q | Suppress all output except errors |
Commands
prompd init
Initialize a folder with example.prmd and manifest.json.
prompd init <path> Examples: prompd init . or prompd init ./my-project
prompd compile
Compile a .prmd file to various output formats.
prompd compile <file> [options]| Option | Description |
|---|---|
| --to-markdown | Compile to markdown format |
| --to-openai-json | Compile to OpenAI JSON format |
| --to-anthropic-json | Compile to Anthropic JSON format |
| --output, -o | Output file path |
| --param | Set parameter values (repeatable) |
Example: prompd compile my-prompt.prmd --to-markdown --param language="Python"
prompd run
Compile and execute a prompt with specified parameters.
prompd run <file> [options]| Option | Description |
|---|---|
| --param | Set parameter values (key="value") |
| --provider | AI provider (openai, anthropic, custom) |
| --model | Model name (gpt-4o, claude-sonnet-4, etc.) |
| --stream | Enable streaming output |
Example: prompd run my-prompt.prmd --provider anthropic --param topic="AI ethics"
prompd package
Manage package creation and validation.
prompd package <command> [options]Subcommands:
create- Create a new packagevalidate- Validate package structureinfo- Show package information
Example: prompd package create . my-package.pdpkg
prompd pack
Shortcut for prompd package create. Creates a .pdpkg package from a directory.
prompd pack <source-directory> [output-file]Options:
-n, --name- Package name (overrides manifest.json)-V, --version- Package version (overrides manifest.json)-d, --description- Package description-a, --author- Package author
Examples:
prompd pack . my-package.pdpkg
prompd pack ./my-project (auto-generates filename)
prompd login
Authenticate with the prompd registry.
prompd loginOpens browser for authentication flow with registry.prompdhub.ai.
prompd publish
Publish a package to the registry.
prompd publish <package-file> Example: prompd publish my-package.pdpkg
prompd install
Install a package from the registry.
prompd install <package-name>[@version] Example: prompd install @prompd.io/core-patterns@2.0.0
prompd search
Search for packages in the registry.
prompd search <query> Example: prompd search "code review"
prompd list
List installed packages.
prompd list [options]| Option | Description |
|---|---|
| --global | List global packages |
| --json | Output in JSON format |
prompd uninstall
Uninstall a package.
prompd uninstall <package-name> Example: prompd uninstall @prompd.io/core-patterns
Advanced Usage
Working with Binary Assets
The Python CLI supports binary file extraction (Excel, Word, PDF, PowerPoint, Images).
---
id: document-analyzer
name: Document Analyzer
assets:
- path: ./data.xlsx
type: excel
extract: all
- path: ./report.pdf
type: pdf
extract: text
---
Analyze the following data:
{assets.data}Using with MCP Servers
Connect to Model Context Protocol (MCP) servers for extended capabilities.
prompd run my-prompt.prmd --mcp-server "file://localhost:3000"Environment Variables
| Variable | Description |
|---|---|
| PROMPD_REGISTRY_URL | Custom registry URL |
| PROMPD_API_KEY | API key for authentication |
| PROMPD_CACHE_DIR | Custom cache directory |
Examples
Complete Workflow Example
# Initialize current directory
prompd init .
# Edit the example.prmd file that was created
# Compile to markdown
prompd compile example.prmd --to-markdown
# Run with parameters
prompd run example.prmd \
--param text="Great product!" \
--provider openai \
--model gpt-4o
# Package for distribution
prompd package create . sentiment-analyzer.pdpkg
# Publish to registry
prompd login
prompd publish sentiment-analyzer.pdpkgRelated Documentation
- Getting Started - Installation and setup
- prompd.app Editor - Visual IDE guide
- Examples - Real-world use cases
- CLI Source Code - Contribute or report issues