Skip to content

Add an interactive setup script for efficiency #22

Description

@cubrift

To make onboarding as frictionless as possible for new users and self-hosters, we should replace/supplement manual .env file creation with an interactive, terminal-based setup CLI.

Some people are seriously lazy!

Running npm run setup should walk the user through key configurations with friendly prompts and automatically generate a valid .env file.

Proposed Approach

  • Use @clack/prompts for clean terminal UI formatting.
  • Prompt the user step-by-step for key variables:
  • OpenAI API Key (OPENAI_API_KEY)
  • GIPHY API Key (GIPHY_API_KEY)
  • Preferred bot prefix / trigger settings
  • Optional configuration options (e.g., custom database path or debug mode)
  • Read from .env.example as a template to ensure all required fields are included.
  • Safely write/overwrite the local .env file with validated inputs.

Tasks

  • Add @clack/prompts CLI prompt dependency.
  • Create scripts/setup.js (or .ts) to handle user input and validation.
  • Add "setup": "node scripts/setup.js" to package.json scripts.
  • Update README.md quickstart instructions to highlight npm run setup.

Acceptance Criteria

  • Running npm run setup successfully generates a working .env file.
  • Existing .env files are not overwritten without explicit user confirmation.
  • Clear error messaging if a user provides an invalid format for required fields (like API key strings).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementPerformance update or requestfeatureNew feature requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions