Install the PromptGuild CLI
Get battle-tested AI agent prompts into your terminal in 2 minutes. Works with Claude Code, Cursor, and any shell.
npx @promptguild/cli authRequires Node.js 18+, npm 7+. Need an API key? Get one in your dashboard β
Install the CLI
Install globally with npm. Requires node --version 18 or later and npm --version 7 or later. The pg command becomes available globally after install.
Verify with pg --version. You should see promptguild/cli vX.Y.Z ....
Authenticate
Pass your API key directly, or run pg auth without arguments to be prompted interactively. Your credentials are stored in ~/.promptguild/config.json β you only do this once per machine.
With your API key (recommended)
Interactive (prompts you for the key)
Search for prompts
Use pg search to find prompts by keyword. Results show the slug, star rating, and download count β the slug is what you pass to pg get.
Download a prompt
Run pg get <slug> to download any prompt as a Markdown file into your working directory. Drop it into CLAUDE.md or paste it directly into your agent session.
The file lands in your current directory as <slug>.md. Each download creates a checkout record β lessons tied to it improve the prompt for everyone.
Check it in
Once you've finished using a prompt in a real session, run pg checkin <slug> to close the checkout and record that you used it. This updates your history in the dashboard and unlocks the option to file a lesson.
File a lesson
After using a prompt in your project, run pg lesson to submit what worked, what failed, and any suggestions. Your lesson is attached to your checkout and surfaced to the prompt author. Every lesson makes the library smarter for the whole community.
Platform-specific setup
The npm command is identical on all platforms. A few things differ.
Install
If you see EACCES errors, see the troubleshooting section below.
Add to PATH (if needed)
Add this line to ~/.bashrc, ~/.zshrc, or ~/.profile and restart your terminal.
Verify
What you need
Node.js 18+
Check: node --version
Download from nodejs.org
npm 7+
Check: npm --version
Included with Node.js 16+ by default.
PromptGuild API key
Required for auth. Generate one β
Common issues
Hit a snag? Here are the most common issues and how to fix them.
Permission denied / EACCES on npm install
sudo. Instead, configure npm to use a user-writable prefix:npm install -g @promptguild/cli --prefix ~/.localOr set
npm config set prefix ~/.npm-global and add ~/.npm-global/bin to your PATH."pg" command not found after install
PATH. Run npm bin -g to find it, then add it to your shell profile (~/.bashrc, ~/.zshrc, or Windows $PROFILE). Restart your terminal after saving.Authentication fails β "Invalid API key"
pgk_live_ prefix. Keys are shown only once at generation time β if you missed it, revoke and generate a new one at /dashboard/keys.Windows: "pg" opens a different program
pg (e.g., PostgreSQL client) may be earlier on your PATH. Run where pg to see which binary wins. Move the npm global bin ahead of it in your system PATH, or run the CLI explicitly: node "$(npm bin -g)/pg".SSL / certificate errors behind a corporate proxy
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080Or set
NODE_EXTRA_CA_CERTS to your corporate CA bundle path.Authentication fails or session expired
pg auth --resetThis clears
~/.promptguild/config.json and prompts you for a fresh API key. Generate a new key at /dashboard/keys if needed.Access denied β "Membership required"
Free prompts are accessible without a membership β look for the
FREE label in pg search results.