GitHub CLI extension for the AI Primitives Hub CLI tool.
This is a sidecar repository that builds and distributes the AI Primitives Hub CLI as a GitHub CLI extension. The main AI Primitives Hub repository is at AmadeusITGroup/ai-primitives-hub.
gh extension install AmadeusITGroup/gh-ai-primitives-hub# Show help
gh ai-primitives-hub --help
# Validate collections
gh ai-primitives-hub collection validate
# Build bundles
gh ai-primitives-hub bundle build
# Install bundles
gh ai-primitives-hub install# Build for current platform only
make build-local
# Build for all platforms (handled by CI matrix)
make build
# Clean build artifacts
make clean# Build from specific ref (tag or branch)
./scripts/build.sh --ref v1.0.4
# Build from specific branch
./scripts/build.sh --ref main
# Build for current platform
./scripts/build.sh --local
# Build using local repository (with environment variable)
AI_PRIMITIVES_HUB_REPO=/path/to/ai-primitives-hub ./scripts/build.sh --local
# Build using local repository with specific ref (with environment variables)
AI_PRIMITIVES_HUB_REPO=/path/to/ai-primitives-hub AI_PRIMITIVES_HUB_REF=v1.0.4 ./scripts/build.sh --local
# Build using remote repository with specific branch (with environment variables)
AI_PRIMITIVES_HUB_REPO=https://github.com/user/ai-primitives-hub.git AI_PRIMITIVES_HUB_REF=main ./scripts/build.sh --local
# Build using local repository (with command-line flag)
./scripts/build.sh --local --local-repo /path/to/ai-primitives-hubEnvironment Variables:
AI_PRIMITIVES_HUB_REPO- Path or URL to ai-primitives-hub repository (overrides cloning from GitHub)AI_PRIMITIVES_HUB_REF- Git ref (tag or branch) to checkout (defaults to latest tag if not specified)- Legacy aliases remain supported:
PROMPT_REGISTRY_REPOandPROMPT_REGISTRY_REF
Note: The SEA (Single Executable Application) build process is now implemented in the new monorepo structure. The build produces standalone binaries for all platforms.
# Build locally
make build-local
# Install as local extension (requires SEA binaries)
gh extension install ./gh-ai-primitives-hub-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)
# Test the extension
gh ai-primitives-hub --help
# Uninstall when done
gh extension remove gh-ai-primitives-hubGitHub CLI extensions require specific naming for binary assets:
OS-ARCH[.exe]
Examples:
linux-amd64
linux-arm64
darwin-amd64
darwin-arm64
windows-amd64.exe
windows-arm64.exe
The extension name is inferred from the repository name (gh-ai-primitives-hub), not part of the binary filename.
Releases are automated via GitHub Actions:
- Create a release in the main AI Primitives Hub repository
- This repository's workflow triggers on the release
- Binaries are built for all platforms using SEA (Single Executable Application)
- Binaries are renamed to gh extension naming convention
- Checksums are generated
- Assets are uploaded to the release
gh-ai-primitives-hub/
├── .github/
│ └── workflows/
│ └── release.yml # CI/CD for building and releasing
├── scripts/
│ └── build.sh # Build script for all platforms
├── Makefile # Build targets for local development
└── README.md # This file
MIT License - see the main AI Primitives Hub repository for details.