Skip to content

Install PackC

Install the packc compiler on your system.

Get packc installed and ready to compile prompt packs.

Section titled “Method 1: Homebrew (macOS/Linux - Recommended)”
Terminal window
# Install PromptKit (includes PackC)
brew install promptkit
# Verify installation
packc version

Expected output:

packc v0.1.0

This installs the latest version directly:

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

Visit the PromptKit Releases page and download the appropriate binary for your platform.

Terminal window
# Example for macOS (adjust version and platform as needed)
curl -LO https://github.com/AltairaLabs/PromptKit/releases/latest/download/packc-darwin-amd64
chmod +x packc-darwin-amd64
sudo mv packc-darwin-amd64 /usr/local/bin/packc
# Verify
packc version

Run packc in a container:

Terminal window
# Pull image (when available)
docker pull ghcr.io/AltairaLabs/packc:latest
# Or build locally from the repo
docker build -t packc -f Dockerfile.packc .
# Run packc
docker run --rm -v $(pwd):/workspace packc version

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

Homebrew is the recommended method:

Terminal window
brew install promptkit

Use Go install or download the binary:

Terminal window
# Download binary
curl -LO https://github.com/AltairaLabs/PromptKit/releases/latest/download/packc-linux-amd64
chmod +x packc-linux-amd64
sudo mv packc-linux-amd64 /usr/local/bin/packc

Download the binary and add to PATH:

Terminal window
# Download from GitHub releases
# https://github.com/AltairaLabs/PromptKit/releases
# Or use go install
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'
}
}
FROM golang:1.22
RUN go install github.com/AltairaLabs/PromptKit/tools/packc@latest
RUN 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