# Promptminder CLI

> Use when running promptminder or promptminder-agent commands, setting PROMPTMINDER_TOKEN, passing --team for workspace scoping, handling JSON stderr errors like "Missing token" or HTTP 401, or using the agent wrapper with dot-notation actions and --input JSON.

- Skill: `aircrushin/promptminder-cli` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add aircrushin/promptminder-cli`
- Raw SKILL.md: https://api.skillmd.com/api/skills/aircrushin/promptminder-cli/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: aircrushin (https://skillmd.com/u/aircrushin)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/aircrushin/promptminder-cli

---


# PromptMinder CLI

## Overview

`promptminder` is a JSON-in / JSON-out CLI for managing prompts, tags, and teams via the PromptMinder API. Every success response goes to **stdout**; every error goes to **stderr** as `{"error":{"message":"...","status":null}}`.

Install the CLI first:

```bash
npm i -g @aircrushin/promptminder-cli
```

## Auth and Token

Token resolution order: `--token` flag -> `PROMPTMINDER_TOKEN` env var -> saved config.

```bash
# One-time interactive login (saves token to ~/.promptminder/config.json)
promptminder auth login --token pm_xxx

# CI / scripts: prefer env var, no saved state needed
export PROMPTMINDER_TOKEN=pm_xxx
promptminder prompt list
```

`promptminder auth logout` removes the saved token.

## Quick Reference

```text
promptminder auth login --token <token>
promptminder team list
promptminder prompt list   [--team <id>] [--tag <tag>] [--search <text>] [--page <n>] [--limit <n>]
promptminder prompt get    <id> [--team <id>]
promptminder prompt create --title <text> --content <text> [--description <text>] [--tags <csv>] [--version <text>] [--team <id>]
promptminder prompt update <id> [--title <text>] [--content <text>] [--team <id>]
promptminder prompt delete <id> --yes [--team <id>]
promptminder tag list      [--team <id>] [--include-public <true|false>]
promptminder tag create    --name <text> [--team <id>]
promptminder tag update    <id> --name <text> [--team <id>]
promptminder tag delete    <id> --yes [--team <id>]
```

Run `promptminder help` for up-to-date full usage.

## Team Scoping

Pass `--team <uuid>` to target a non-personal workspace. Omitting `--team` targets the personal workspace. The flag is always `--team`, never `--team-id`.

```bash
promptminder prompt list --team team-uuid-xyz
```

## Content Input Sources

`prompt create` and `prompt update` accept content three ways - use exactly one:

| Flag | When to use |
|------|-------------|
| `--content "..."` | Inline short text |
| `--content-file path/to/file.txt` | Content from a local file |
| `--stdin` | Pipe content from another command |

## Agent Wrapper (`promptminder-agent`)

Use `promptminder-agent` in scripts and AI agent pipelines. Actions use **dot notation**, not space-separated subcommands. Input is a single `--input` JSON object, not individual flags.

```bash
# List prompts
promptminder-agent prompt.list

# Get a specific prompt
promptminder-agent prompt.get --input '{"id":"prompt-id"}'

# Create a prompt in a team
promptminder-agent prompt.create --input '{"title":"SQL helper","content":"Write clean SQL","team":"team-uuid"}'

# Pipe JSON from a file
cat payload.json | promptminder-agent prompt.create --stdin
```

Available actions: `team.list`, `prompt.list`, `prompt.get`, `prompt.create`, `prompt.update`, `prompt.delete`, `tag.list`, `tag.create`, `tag.update`, `tag.delete`.

Run `promptminder-agent help` for the full list with input field requirements.

## Error Triage

| Stderr message | Cause | Fix |
|---|---|---|
| `Missing token. Pass --token or run promptminder auth login.` | No token found | Set `PROMPTMINDER_TOKEN` or run `auth login` |
| HTTP 401 | Token invalid or expired | Re-run `auth login` with a fresh token |
| `Destructive commands require --yes` | Delete without confirmation flag | Add `--yes` |
| `Use only one of --content, --content-file, or --stdin` | Multiple content sources | Keep only one |

## Common Mistakes

- **Wrong agent wrapper syntax**: `promptminder-agent prompt list` fails - use `promptminder-agent prompt.list` (dot notation).
- **Wrong team flag**: `--team-id` does not exist - use `--team <uuid>`.
- **Piping with jq**: pipe `promptminder prompt list | jq .` - stdout is always JSON.
- **Token in CI**: prefer `PROMPTMINDER_TOKEN` env var; avoid checking in the token or running interactive `auth login` in pipelines.

