Prompd CLI
The command-line toolkit for compiling, running, and publishing composable AI prompts. Automate everything from local development to CI/CD.
Installation
Section titled “Installation”Node.js CLI (Recommended)
Section titled “Node.js CLI (Recommended)”npm install -g @prompd/cliThe Node.js CLI is the most feature-complete implementation with full MCP integration, workflow support (.pdflow), and all registry operations.
Python CLI
Section titled “Python CLI”pip install prompdThe Python CLI supports core .prmd operations and asset extraction. Workflow (.pdflow) support is coming soon.
Quick Start
Section titled “Quick Start”1. Install the CLI
Section titled “1. Install the CLI”npm install -g @prompd/cli2. Create your first .prmd file
Section titled “2. Create your first .prmd file”prompd init my-prompt3. Compile the prompt
Section titled “3. Compile the prompt”prompd compile my-prompt.prmd4. Run it against a provider
Section titled “4. Run it against a provider”prompd run my-prompt.prmd --provider openaiCore Commands
Section titled “Core Commands”prompd compile
Section titled “prompd compile”Resolve inheritance, inject context, substitute parameters, and output provider-ready prompts.
prompd compile summarizer.prmd --output compiled.jsonprompd run
Section titled “prompd run”Compile and execute a .prmd file against a configured provider in a single step.
prompd run summarizer.prmd --provider openaiprompd validate
Section titled “prompd validate”Check .prmd files and packages for syntax errors, missing fields, and schema violations.
prompd validate my-prompt.prmdprompd install
Section titled “prompd install”Install a package from the registry with automatic dependency resolution.
prompd install @acme/summarizerprompd search
Section titled “prompd search”Search the registry by keyword, namespace, or package type.
prompd search summarizerprompd publish
Section titled “prompd publish”Pack and publish your project to the Prompd registry for others to use.
prompd publish --access publicConfiguration
Section titled “Configuration”Providers
Section titled “Providers”Configure API keys and defaults for OpenAI, Anthropic, and other LLM providers. Switch providers per-prompt or per-project.
prompd config provider add openai --key sk-...Environment Files
Section titled “Environment Files”Store secrets in .env files. The CLI automatically loads project-level and global .env on every command.
config.yaml
Section titled “config.yaml”Project-level configuration for default provider, output format, compilation flags, and registry endpoint.
provider: openaioutput: markdownregistry: https://registry.prompdhub.aiExamples
Section titled “Examples”Compile with context injection
Section titled “Compile with context injection”Compile a .prmd file that inherits from a registry package and includes local context files.
prompd compile summarizer.prmd --output compiled.jsonRun with parameter overrides
Section titled “Run with parameter overrides”Execute a prompt with custom parameter values passed from the command line.
prompd run summarizer.prmd -p topic="Kubernetes" -p audience="beginners"Publish a package
Section titled “Publish a package”Bundle your project into a .pdpkg archive and publish it to the registry.
prompd publish --access publicNext Steps
Section titled “Next Steps”- Full CLI Commands Reference for detailed command documentation
- Providers for configuring LLM providers
- Packages for package management details
- Browse the Registry for packages to install