@altairalabs/packc
v1.1.7
Published
PromptKit Pack Compiler - Compile and validate prompt packs for LLM applications
Maintainers
Readme
@altairalabs/packc
PromptKit Pack Compiler - Compile and validate prompt packs for LLM applications
Installation
npx (No Installation Required)
npx @altairalabs/packc compile -c arena.yaml
npx @altairalabs/packc validate -c arena.yamlGlobal Installation
npm install -g @altairalabs/packc
# Use directly
packc version
packc compile -c arena.yamlProject Dev Dependency
npm install --save-dev @altairalabs/packc
# Use via npm scripts
# Add to package.json:
{
"scripts": {
"build:prompts": "packc compile -c arena.yaml",
"validate:prompts": "packc validate -c arena.yaml"
}
}What is PackC?
PackC is the PromptKit Pack Compiler - a tool for compiling and validating prompt configurations. It helps you:
- 📦 Compile prompts from YAML configurations into optimized packs
- ✅ Validate configurations before deployment
- 🔍 Inspect prompts to understand structure and metadata
- 🚀 Optimize prompt loading for production use
Quick Start
- Create a configuration file:
# arena.yaml
name: My Application
version: 1.0.0
prompts:
- name: assistant
system_prompt: |
You are a helpful AI assistant.
- name: code-helper
system_prompt: |
You are an expert programmer.
context:
- type: file
path: ./docs/guidelines.md- Compile the prompts:
packc compile -c arena.yaml -o prompts.pack- Validate the configuration:
packc validate -c arena.yaml- Inspect a specific prompt:
packc inspect -c arena.yaml -p assistantCommands
compile
Compile all prompts from a configuration file into a single pack:
packc compile -c arena.yaml -o output.packOptions:
-c, --config: Path to arena.yaml configuration file (required)-o, --output: Output pack file path (default: prompts.pack)
compile-prompt
Compile a single prompt:
packc compile-prompt -c arena.yaml -p assistant -o assistant.jsonOptions:
-c, --config: Path to configuration file (required)-p, --prompt: Name of the prompt to compile (required)-o, --output: Output file path (default: stdout)
validate
Validate configuration file without compiling:
packc validate -c arena.yamlChecks for:
- YAML syntax errors
- Missing required fields
- Invalid prompt references
- Malformed context definitions
- File path validation
inspect
Inspect a specific prompt's configuration:
packc inspect -c arena.yaml -p assistantShows:
- Prompt name and metadata
- System prompt content
- Context sources
- Variable definitions
- Formatting details
version
Display version information:
packc versionUse Cases
CI/CD Validation
Add prompt validation to your CI pipeline:
# .github/workflows/validate.yml
- name: Validate prompts
run: npx @altairalabs/packc validate -c config/arena.yamlBuild Scripts
Compile prompts as part of your build process:
{
"scripts": {
"prebuild": "packc compile -c arena.yaml",
"build": "your-build-command"
}
}Local Development
Quickly validate changes during development:
# Watch for changes and validate
watch -n 2 'packc validate -c arena.yaml'How It Works
This npm package downloads pre-built Go binaries from GitHub Releases during installation. The binaries are:
- Downloaded for your specific OS and architecture
- Extracted from the release archive
- Made executable (Unix-like systems)
- Invoked through a thin Node.js wrapper
No Go toolchain is required on your machine.
Supported Platforms
- macOS (Intel and Apple Silicon)
- Linux (x86_64 and arm64)
- Windows (x86_64 and arm64)
Documentation
Troubleshooting
Binary Download Fails
If the postinstall script fails:
- Check your internet connection
- Verify the version exists in GitHub Releases
- Check npm proxy/registry settings
- Try manual installation:
# Download binary directly
curl -L https://github.com/AltairaLabs/PromptKit/releases/download/v0.0.1/PromptKit_v0.0.1_Darwin_arm64.tar.gz -o packc.tar.gz
tar -xzf packc.tar.gz packc
chmod +x packcPermission Denied
On Unix-like systems:
chmod +x node_modules/@altairalabs/packc/packcAlternative Installation Methods
- Homebrew:
brew install altairalabs/tap/promptkit - Go Install:
go install github.com/AltairaLabs/PromptKit/tools/packc@latest - Direct Download: GitHub Releases
- Build from Source: Clone repo and run
make install-tools
Related Tools
- @altairalabs/promptarena - Test and evaluate your prompts
- PromptKit SDK - Production deployment library
License
Apache-2.0 - see LICENSE
Contributing
Contributions welcome! See CONTRIBUTING.md
