A modern, secure command-line interface for the GPM (Game Package Manager) registry - designed specifically for game development workflows with npm-compatible commands and Unity Package Manager (UPM) support.
- npm-compatible workflows - Familiar commands for JavaScript/Node.js developers
- Unity Package Manager (UPM) support - Reverse-DNS package naming and Unity-specific metadata
- Studio-scoped registries - Multi-tenant architecture with subdomain-based access control
- Secure authentication - Encrypted token storage and secure credential handling
- Professional CLI experience - Rich terminal output, progress indicators, and helpful error messages
- Cross-platform - Supports Windows, macOS, and Linux
One-liner installation:
# Using curl
curl -fsSL https://gpm.sh/install.sh | bash
# Using wget
wget -qO- https://gpm.sh/install.sh | bashCustom installation:
# Install specific version
curl -fsSL https://gpm.sh/install.sh | bash -s -- -v v0.1.0-alpha.2
# Install to custom directory
curl -fsSL https://gpm.sh/install.sh | bash -s -- -d ~/.local/bin
# Force reinstall
curl -fsSL https://gpm.sh/install.sh | bash -s -- --forceDownload the latest release for your platform from the releases page.
Requirements:
- Go 1.21 or later
- Git
# Clone the repository
git clone https://github.com/gpm-sh/gpm-cli.git
cd gpm-cli
# Build and install
make build
sudo mv gpm /usr/local/bin/ # or add to your PATH
# Or install directly with Go
go install gpm.sh/gpm/gpm-cli@latestgpm --version
gpm --help# Set your GPM registry URL
gpm config set registry https://your-studio.gpm.sh
# Or use the global registry
gpm config set registry https://gpm.sh# Register a new account
gpm register
# Login with existing credentials
gpm login# Install a package
gpm install com.unity.ugui
# Install specific version
gpm install [email protected]
# Install and save to package.json
gpm install --save com.company.analytics
gpm install --save-dev com.company.test-utils# Create a package tarball
gpm pack
# Publish to registry
gpm publish your-package-1.0.0.tgz| Command | Description | Example |
|---|---|---|
gpm install [package] |
Install packages | gpm install [email protected] |
gpm uninstall <package> |
Remove packages | gpm uninstall com.unity.ugui |
gpm list |
List installed packages | gpm list --production |
gpm info <package> |
Show package information | gpm info com.unity.ugui |
gpm search <term> |
Search for packages | gpm search analytics |
| Command | Description | Example |
|---|---|---|
gpm pack |
Create package tarball | gpm pack |
gpm publish <tarball> |
Publish package | gpm publish my-package-1.0.0.tgz |
| Command | Description | Example |
|---|---|---|
gpm register |
Create new account | gpm register |
gpm login |
Authenticate with registry | gpm login |
gpm logout |
Clear authentication | gpm logout |
gpm whoami |
Show current user | gpm whoami |
| Command | Description | Example |
|---|---|---|
gpm config set <key> <value> |
Set configuration | gpm config set registry https://gpm.sh |
gpm config get <key> |
Get configuration | gpm config get registry |
gpm config list |
List all settings | gpm config list |
| Command | Description | Example |
|---|---|---|
gpm version |
Show CLI version | gpm version |
gpm help [command] |
Show help | gpm help install |
All commands support these global flags:
| Flag | Description |
|---|---|
--verbose, -v |
Enable verbose output |
--debug |
Enable debug output |
--quiet, -q |
Suppress non-essential output |
--json |
Output in JSON format |
GPM supports standard npm package.json with Unity-specific extensions:
{
"name": "com.company.my-package",
"version": "1.0.0",
"displayName": "My Unity Package",
"description": "A Unity package for amazing features",
"unity": "2022.3",
"license": "MIT",
"author": {
"name": "Your Name",
"email": "[email protected]"
},
"dependencies": {
"com.unity.ugui": "1.0.0"
},
"devDependencies": {
"com.company.test-utils": "^2.0.0"
},
"keywords": ["unity", "ui", "game-development"]
}name- Reverse-DNS package name (e.g.,com.company.package)version- Semantic version (e.g.,1.0.0)description- Package description
displayName- Human-readable name shown in Unityunity- Minimum Unity version (e.g.,2022.3)
# Install dependencies
make deps
# Format code
make fmt
# Run linter
make lint
# Build binary
make build
# Build for all platforms
make build-all# Run all tests
make test
# Run unit tests only
make test-unit
# Run integration tests
make test-integration
# Generate coverage report
make test-coverageVersion information is automatically injected at build time:
# Show build variables
make version
# Build with custom version
VERSION=1.2.3 make build- Passwords are cleared from memory immediately after use
- Input validation prevents injection attacks
- HTTPS-only communication with registries
- Secure file permissions on configuration files
GPM stores configuration in ~/.gpmrc:
registry: https://gpm.sh
username: your-username
token: your-auth-token| Variable | Description | Default |
|---|---|---|
GPM_REGISTRY |
Registry URL | https://gpm.sh |
GPM_TOKEN |
Authentication token | - |
NO_COLOR |
Disable colored output | - |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Run the test suite (
make test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Go best practices and idioms
- Add tests for all new functionality
- Update documentation for user-facing changes
- Use conventional commit messages
- Ensure all tests pass before submitting
Licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
- Documentation: https://docs.gpm.sh
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Package dependency resolution and lock files
- Workspace support for monorepos
- Plugin system for custom commands
- Integration with CI/CD platforms
- Advanced package validation rules
- Offline package caching