Skip to content

Install PackC

Install the packc compiler on your system.

Get packc installed and ready to compile prompt packs.

Install via go install (the only supported installation method):

Terminal window
# Install latest version
go install github.com/AltairaLabs/PromptKit/tools/packc@latest
# Verify installation
packc version

To install a specific version:

Terminal window
# Install specific version
go install github.com/AltairaLabs/PromptKit/tools/packc@v0.1.0

For development or custom builds:

Terminal window
# Clone repository
git clone https://github.com/AltairaLabs/PromptKit.git
cd PromptKit
# Build packc
make build-packc
# Binary is at ./bin/packc
./bin/packc version

Check that packc is properly installed:

Terminal window
# Check version
packc version
# Check help
packc help
# Check location
which packc

Expected outputs:

packc v0.1.0
packc - PromptKit Pack Compiler
Usage: packc <command> [options]
...
/Users/yourname/go/bin/packc

Enable tab completion for commands and flags:

Terminal window
# Bash
packc completion bash > ~/.local/share/bash-completion/completions/packc
# Zsh
packc completion zsh > ~/.zsh/completions/_packc
# Fish
packc completion fish > ~/.config/fish/completions/packc.fish

See Configure Shell Completions for detailed setup instructions.

If packc is not found, add Go’s bin directory to your PATH:

Add to ~/.zshrc or ~/.bashrc:

Terminal window
export PATH="$PATH:$(go env GOPATH)/bin"

Apply changes:

Terminal window
source ~/.zshrc # or ~/.bashrc

Add to PATH in System Environment Variables:

  1. Open System Properties > Environment Variables
  2. Edit Path variable
  3. Add: %USERPROFILE%\go\bin
  4. Restart terminal
Terminal window
# Reinstall latest
go install github.com/AltairaLabs/PromptKit/tools/packc@latest
# Verify new version
packc version
Terminal window
cd PromptKit
git pull origin main
make build-packc
Terminal window
# Find packc location
which packc
# Remove binary
rm $(which packc)
Terminal window
# Clean module cache
go clean -modcache

Create an alias for convenience:

Terminal window
# Add to ~/.zshrc or ~/.bashrc
alias packc-compile='packc compile --config ./config/arena.yaml'

Configure default behavior:

Terminal window
# Set default output directory
export PACKC_OUTPUT_DIR="./packs"
# Use in scripts
packc compile --config arena.yaml --output "$PACKC_OUTPUT_DIR/app.pack.json" --id app

Use go install:

Terminal window
go install github.com/AltairaLabs/PromptKit/tools/packc@latest
Terminal window
go install github.com/AltairaLabs/PromptKit/tools/packc@latest
- name: Install packc
run: go install github.com/AltairaLabs/PromptKit/tools/packc@latest
- name: Verify installation
run: packc version
install_packc:
script:
- go install github.com/AltairaLabs/PromptKit/tools/packc@latest
- packc version
stage('Install packc') {
steps {
sh 'go install github.com/AltairaLabs/PromptKit/tools/packc@latest'
sh 'packc version'
}
}

Problem: packc not in PATH

Solution: Add Go’s bin directory to PATH:

Terminal window
export PATH="$PATH:$(go env GOPATH)/bin"

Problem: Binary not executable

Solution: Make binary executable:

Terminal window
chmod +x $(which packc)

Problem: Go version < 1.22

Solution: Update Go:

Terminal window
# macOS
brew upgrade go
# Linux
# Download from https://go.dev/dl/
# Verify
go version

Problem: Network or dependency issues

Solution: Check network and clean cache:

Terminal window
# Clean cache
go clean -modcache
# Try again
go install github.com/AltairaLabs/PromptKit/tools/packc@latest