Adds a custom HTTP header definition to the Alpic playground for an environment. Headers can be marked as required or secret to control how users provide them when accessing the playground.
Usage
alpic playground headers add
Prompts for header details interactively.
Extended Usage
Add a required secret header non-interactively:
alpic playground headers add --name "X-Api-Key" --description "API key for authentication" --required --secret
Add an optional, visible header:
alpic playground headers add --name "X-Tenant-Id" --description "Tenant identifier" --no-required --no-secret
Add a header to a specific environment:
alpic playground headers add --environment-id <environmentId> --name "X-Api-Key" --description "API key for authentication" --required --secret
Options
| Flag | Description |
|---|
--environment-id | The ID of the environment (optional — read from local config if omitted) |
--name | The header name (max 100 characters) |
--description | The header description (max 200 characters) |
--required | Whether the header is required. Use --no-required to make it optional |
--secret | Whether the header value is secret. Use --no-secret to keep it visible |
--non-interactive | Disable interactive prompts. Requires --name and --description. |
When running from a directory linked to an Alpic project, --environment-id is optional — the CLI reads it from the
local .alpic config file.