Skip to content

feat: support value generators for cryptographic secrets, open ports, and mock data #1

Description

@hammadmajid

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions