Installation

The GasPackᵐ CLI requires Node.js 18 or later.

Install globally

npm install -g @gaspackm/gpm

Verify installation

$ gpm --version
1.0.1

Get help

# General help
gpm --help

# Command-specific help
gpm install --help

Authentication

Log in to access private packages and publish your own.

Login

$ gpm login
Starting secure authentication flow...
Opening browser for authentication...
Browser opened successfully
Waiting for authentication in browser...
Authentication successful!
Welcome, you.gmail.com!

Check current user

gpm whoami

Logout

gpm logout
CommandDescription
gpm loginAuthenticate with Google account
gpm login --token <token>Login with a token directly
gpm logoutClear stored credentials
gpm whoamiShow current authenticated user

Project Commands

Commands for managing dependencies in your Apps Script project.

CommandDescription
gpm initInitialize GasPackᵐ in existing project
gpm create project <name>Create a new project from scratch
gpm installInstall all dependencies from gpm.json
gpm install <package>Install a package
gpm install <package> --ver <version>Install specific version
gpm install <package> --save-devInstall as dev dependency
gpm uninstall <package>Remove a package
gpm updateUpdate all packages
gpm update <package>Update specific package
gpm listList installed packages
gpm list --verboseShow detailed package info
gpm list --exportsShow module exports
gpm auditCheck for security issues
gpm buildBundle project with dependencies
gpm build --check-updatesCheck for available updates during build
gpm build --strict-depsTurn dependency warnings into errors

Build options

FlagDescription
--minifyMinify module code with terser
--compactCompact metadata (single-line header/manifest)
--no-headerExclude documentation header from bundle
--no-manifestExclude __GASPACKM__ runtime manifest
--strip-commentsStrip comments from module code
--check-updatesCheck for available non-breaking updates
--strict-depsTurn dependency warnings into build errors

Package Commands

Commands for creating and managing packages.

CommandDescription
gpm create package <name>Create a new package
gpm create module <name>Add a module to existing package
gpm create module <name> --namespace <NS>Create module with specific namespace
gpm addAdd OAuth scopes or Advanced Services (interactive)
gpm removeRemove scopes or services (interactive)
gpm scopesList configured scopes and services
gpm scopes --verboseShow detailed scope information
gpm buildBuild package for publishing
gpm verifyVerify package integrity
gpm bump <module> <type>Bump module version (package auto-calculated)
gpm bump <mod> <type> <mod> <type>Bump multiple modules at once
gpm publishPublish to registry
gpm publish --access publicPublish as public package
gpm publish --dry-runPreview without publishing
gpm linkLink package globally for local testing
gpm link <package>Link a global package into current project
gpm unlink <package>Remove package link

Dependency commands

CommandDescription
gpm dep add <mod> --dep <ref>Add dependency by canonical ref (@scope/pkg/mod)
gpm dep add <mod> --dep-ns <ns>Add dependency by namespace (registry lookup)
gpm dep remove <mod> --dep <ref>Remove a dependency
gpm dep list <mod>List dependencies for a module
gpm dep detect <mod>Scan code and suggest missing dependencies

Create options

FlagDescription
--description <desc>Package description
--author <name>Author name
--license <license>License (default: MIT)
--module <name>Initial module name (default: base)
--namespace <NS>Module namespace in ALL_CAPS
--no-interactiveSkip prompts, use defaults

Registry Commands

Commands for searching and viewing packages in the registry.

CommandDescription
gpm search <query>Search for packages
gpm search <query> --limit <n>Limit results (default: 20)
gpm search <query> --jsonOutput as JSON
gpm info <package>View package details
gpm info <package> --ver <version>View specific version
gpm info <package> --jsonOutput as JSON

Configuration

CommandDescription
gpm config listShow all configuration
gpm config get <key>Get configuration value
gpm config set <key> <value>Set configuration value
gpm config delete <key>Delete configuration value

Environment variables

Set GPM_REGISTRY_URL to use a custom registry.