Problem
Developers repeatedly switch context to external terminal commands, password generators, or web tools to generate random tokens (JWT secrets, session encryption keys), identify available local TCP ports, or generate mock data when setting up local environments.
Proposed Solution
Introduce template comment annotations that dynamically generate values directly within the interactive setup flow (e.g., # @generate secret:<length>, # @generate port:<fallback>, # @generate uuid, # @generate hex:<bytes>).
Expected Behavior
# @generate secret:32: Generates a cryptographically secure random alphanumeric string.
# @generate hex:32: Generates a 32-byte hex-encoded string.
# @generate uuid: Generates a standard UUID v4.
# @generate port:3000: Checks if port 3000 is open locally; if bound, probes and suggests the next available TCP port.
- In non-interactive mode (
--defaults), generated values are automatically populated for empty keys.
Acceptance Criteria
- Cryptographic generation uses a cryptographically secure random source (
crypto/rand).
- Port checker reliably detects local socket availability without leaving lingering listeners.
- Generated values are pre-filled in the form with clear visual indication of auto-generation.
Problem
Developers repeatedly switch context to external terminal commands, password generators, or web tools to generate random tokens (JWT secrets, session encryption keys), identify available local TCP ports, or generate mock data when setting up local environments.
Proposed Solution
Introduce template comment annotations that dynamically generate values directly within the interactive setup flow (e.g.,
# @generate secret:<length>,# @generate port:<fallback>,# @generate uuid,# @generate hex:<bytes>).Expected Behavior
# @generate secret:32: Generates a cryptographically secure random alphanumeric string.# @generate hex:32: Generates a 32-byte hex-encoded string.# @generate uuid: Generates a standard UUID v4.# @generate port:3000: Checks if port 3000 is open locally; if bound, probes and suggests the next available TCP port.--defaults), generated values are automatically populated for empty keys.Acceptance Criteria
crypto/rand).