Synced package doc
Docs/prompts-gpt Package/prompts-gpt init

prompts-gpt init

Save a project token for authenticating with the prompts-gpt.com API.

Usage

prompts-gpt init [--token <token> | --token-stdin | --token-prompt] [--api-url <url>] [--cwd <path>]

Options

FlagDescription
--token <token>Project API token (must start with pgpt_)
--token-stdinRead token from stdin (for CI/CD)
--token-promptPrompt for token without echoing
--api-url <url>Custom API base URL for self-hosted instances
--cwd <path>Target project directory

Examples

# Interactive prompt
prompts-gpt init

# Direct token
prompts-gpt init --token pgpt_abc123

# CI/CD pipeline
printf '%s' "$TOKEN" | prompts-gpt init --token-stdin

What It Creates

  • .prompts-gpt/.credentials.json — Stores token and API URL
  • Adds .prompts-gpt/.credentials.json to .gitignore
  • Sets file permissions to 0600 on Unix

See Also