Description
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.
- Automatically install the
-
Generate Configuration Files:
- Create a default
shortest.config.ts
file with boilerplate configuration. - Add
.shortest/
to.gitignore
if not already present.
- Create a default
-
Create Environment Files:
- Generate a
.env.local
file with placeholders for required environment variables such as:ANTHROPIC_API_KEY
- Add it to
.gitignore
- Generate a
-
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 throughnpx @antiwork/shortest init
, enabling a zero-install setup experience.
- Allow the
-
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
Labels
Type
Projects
Status
No status