npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@anusha-hegde-08/spec-pilot

v0.1.1

Published

A CLI tool that converts plain English feature specs into production-ready TypeScript code and tests using the OpenAI API

Downloads

233

Readme

Spec Pilot

A CLI tool that converts a plain English feature spec into production-ready TypeScript code and tests using the OpenAI API.

The Problem

Every time a developer starts a new feature, they spend hours writing the same boilerplate — a controller, a service, and a test file. Spec Pilot eliminates that by letting you describe what you want in plain English and generating all three files instantly.

How It Works

You write this (login.md):

## User Login

- POST /login accepts email and password
- Validate that email and password are not empty
- Return a JWT token if credentials are correct
- Return 401 error if credentials are wrong

You run this:

npx @anusha-hegde-08/spec-pilot generate --spec login.md

You get this:

controller -> output/user-login.controller.ts
service    -> output/user-login.service.ts
tests      -> output/user-login.spec.ts

Installation

npm install -g @anusha-hegde-08/spec-pilot

Or use it without installing:

npx @anusha-hegde-08/spec-pilot generate --spec your-feature.md

Setup

  1. Get an OpenAI API key from platform.openai.com
  2. Create a .env file in your project root:
OPENAI_API_KEY=your_key_here

Usage

Generate code from a spec file

spec-pilot generate --spec examples/login.md

Use a custom output directory

spec-pilot generate --spec examples/login.md --out ./src/features

Preview files without generating them

spec-pilot generate --spec examples/login.md --dry-run

Help

spec-pilot --help

Options

| Option | Description | Required | Default | | ----------- | ------------------------------------ | -------- | ---------- | | --spec | Path to your markdown spec file | Yes | — | | --out | Output directory for generated files | No | ./output | | --dry-run | Preview files without calling the AI | No | false |

Writing a Good Spec

A spec file is a markdown file with a ## heading and bullet points.

## Feature Name

- requirement one
- requirement two
- requirement three

Tips for better output:

  • Be specific — the more detail you add, the better the generated code
  • Use HTTP methods when describing endpoints — POST /login, GET /users
  • Describe both success and error cases
  • Aim for at least 3-5 bullet points per feature

Example Specs

User Authentication

## User Authentication

- POST /login accepts email and password
- Validate that email and password are not empty
- Return a JWT token if credentials are correct
- Return 401 error if credentials are wrong
- Hash passwords using bcrypt before comparing

Todo List

## Todo List

- GET /todos returns all todos
- POST /todos creates a new todo
- DELETE /todos/:id deletes a todo by id
- Each todo has a title and completed status

Tech Stack

  • TypeScript — type-safe codebase
  • Node.js — runtime environment
  • OpenAI API — code generation
  • Commander.js — CLI framework
  • Vitest — unit testing
  • dotenv — environment variable management

Running Tests

npm test

Project Structure

spec-pilot/
├── src/
│   ├── index.ts        - CLI entry point
│   ├── parser.ts       - reads and validates markdown spec files
│   ├── generator.ts    - calls OpenAI API and returns generated code
│   └── writer.ts       - saves generated files to disk
├── tests/
│   ├── parser.test.ts
│   ├── writer.test.ts
│   └── generator.test.ts
└── examples/
    ├── login.md
    └── todo.md

Contributing

Contributions are welcome. Please open an issue before submitting a pull request so we can discuss the change.

  1. Fork the repository
  2. Create a feature branch — git checkout -b feat/your-feature
  3. Commit your changes — git commit -m "feat: add your feature"
  4. Push to the branch — git push origin feat/your-feature
  5. Open a pull request

License

MIT