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
| Flag | Description |
|---|---|
--token <token> | Project API token (must start with pgpt_) |
--token-stdin | Read token from stdin (for CI/CD) |
--token-prompt | Prompt 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.jsonto.gitignore - Sets file permissions to
0600on Unix