Skip to content

Add shortest init command for simplified setup #294

@rmarescu

Description

@rmarescu

What

Introduce a shortest init command to streamline the process of setting up Shortest in a new or existing project. This command will:

  • Install Dependencies:

    • Automatically install the @antiwork/shortest package as a dev dependency if it is not already installed.
  • Generate Configuration Files:

    • Create a default shortest.config.ts file with boilerplate configuration.
    • Add .shortest/ to .gitignore if not already present.
  • Create Environment Files:

    • Generate a .env.local file with placeholders for required environment variables such as:
      • ANTHROPIC_API_KEY
    • Add it to .gitignore
  • Provide Meaningful Feedback:

    • Output details of the installation and configuration process, such as installed dependencies, created files, and next steps for users.
  • Seamless Integration with npx:

    • Allow the shortest init command to work even when invoked through npx @antiwork/shortest init, enabling a zero-install setup experience.
  • Updade README

Why

  • Streamline onboarding for new users, making it easy to start using the framework without manual setup.
  • Reduce errors caused by missing dependencies, misconfigured environments, or skipped steps.
  • Encourage adoption by lowering the barrier to entry for first-time users.
  • Provide consistency across projects by generating standardized configuration and environment files.

Example

npx shortest init

Expected output:

Installing @antiwork/shortest...
Setting up Shortest...

✔ Dependencies installed
✔ shortest.config.ts created
✔ .env.local created/updated
✔ .gitignore created/updated

Initialization complete. Add your API key to `.env.local` and start testing!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions