{"_id":"@anusha-hegde-08/spec-pilot","_rev":"2-269234326d7aefdafdfd5bea2fb05902","name":"@anusha-hegde-08/spec-pilot","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@anusha-hegde-08/spec-pilot","version":"0.1.0","keywords":["cli","ai","openai","typescript","code-generation","spec-driven-development","developer-tools"],"author":{"name":"Sindhoor"},"license":"MIT","_id":"@anusha-hegde-08/spec-pilot@0.1.0","maintainers":[{"name":"anusha-hegde-08","email":"anusarkuli@gmail.com"}],"bin":{"spec-pilot":"bin/run.js"},"dist":{"shasum":"dd812bda594c6bafa7875495a1326a99dd6ffce0","tarball":"https://registry.npmjs.org/@anusha-hegde-08/spec-pilot/-/spec-pilot-0.1.0.tgz","fileCount":8,"integrity":"sha512-1H4HZm0VeJ4QEb3SdWfCf9aSbiL921xNQCuXnArAtBZbFXLwcHyvD56osni/tuZWxopsZrU7qjLF7KRh5e3ZZA==","signatures":[{"sig":"MEYCIQD68ti9zz6ViJdQnD2lBORvxQp6M/LVbFt42nO3HcZnRgIhANHic5VI9OKcelDZyCwVQy8kSeaWrDSfGWPotYKEEDy7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13725},"type":"module","gitHead":"978243709a2959f331be2d5dfb171a9e45c4c675","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"tsc"},"_npmUser":{"name":"anusha-hegde-08","email":"anusarkuli@gmail.com"},"_npmVersion":"10.9.2","description":"A CLI tool that converts plain English feature specs into production-ready TypeScript code and tests using the OpenAI API","directories":{},"_nodeVersion":"22.15.0","dependencies":{"dotenv":"^16.0.0","openai":"^4.0.0","commander":"^12.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.0.0","vitest":"^1.0.0","typescript":"^5.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/spec-pilot_0.1.0_1775002400924_0.3450006603050739","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@anusha-hegde-08/spec-pilot","version":"0.1.1","description":"A CLI tool that converts plain English feature specs into production-ready TypeScript code and tests using the OpenAI API","type":"module","bin":{"spec-pilot":"bin/run.js"},"scripts":{"dev":"tsx src/index.ts","build":"tsc","test":"vitest run"},"keywords":["cli","ai","openai","typescript","code-generation","spec-driven-development","developer-tools"],"author":{"name":"Sindhoor"},"license":"MIT","dependencies":{"openai":"^4.0.0","commander":"^12.0.0","dotenv":"^16.0.0"},"devDependencies":{"@types/node":"^20.0.0","tsx":"^4.0.0","typescript":"^5.0.0","vitest":"^1.0.0"},"_id":"@anusha-hegde-08/spec-pilot@0.1.1","gitHead":"e46f32013f22bc26ff14f0da0d8d1b305843e290","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-VSEODf1Fa+PIlkhOkX0Sm/fIz4jwQaVFDu81B19+udUVix1vm7P/8lBUVnkLVGGJ+lDDd7PM9fpYu9aOOyaHIw==","shasum":"7849860597bd92671d103f64e830bcb9d709c2a2","tarball":"https://registry.npmjs.org/@anusha-hegde-08/spec-pilot/-/spec-pilot-0.1.1.tgz","fileCount":8,"unpackedSize":13810,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGFNI+Eb2Fl97woSyPIm61cQqJYeD84yGY4ek1JNxRZXAiAjnEISGW5HbVKR9l8Iki4R1SCILpjl5xij+9dfhfRMkQ=="}]},"_npmUser":{"name":"anusha-hegde-08","email":"anusarkuli@gmail.com"},"directories":{},"maintainers":[{"name":"anusha-hegde-08","email":"anusarkuli@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/spec-pilot_0.1.1_1775004176618_0.03273350125787822"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-01T00:13:20.789Z","modified":"2026-04-01T00:42:56.880Z","0.1.0":"2026-04-01T00:13:21.075Z","0.1.1":"2026-04-01T00:42:56.768Z"},"author":{"name":"Sindhoor"},"license":"MIT","keywords":["cli","ai","openai","typescript","code-generation","spec-driven-development","developer-tools"],"description":"A CLI tool that converts plain English feature specs into production-ready TypeScript code and tests using the OpenAI API","maintainers":[{"name":"anusha-hegde-08","email":"anusarkuli@gmail.com"}],"readme":"# Spec Pilot\r\n\r\nA CLI tool that converts a plain English feature spec into production-ready TypeScript code and tests using the OpenAI API.\r\n\r\n## The Problem\r\n\r\nEvery 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.\r\n\r\n## How It Works\r\n\r\nYou write this (`login.md`):\r\n\r\n```markdown\r\n## User Login\r\n\r\n- POST /login accepts email and password\r\n- Validate that email and password are not empty\r\n- Return a JWT token if credentials are correct\r\n- Return 401 error if credentials are wrong\r\n```\r\n\r\nYou run this:\r\n\r\n```bash\r\nnpx @anusha-hegde-08/spec-pilot generate --spec login.md\r\n```\r\n\r\nYou get this:\r\n\r\n```\r\ncontroller -> output/user-login.controller.ts\r\nservice    -> output/user-login.service.ts\r\ntests      -> output/user-login.spec.ts\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install -g @anusha-hegde-08/spec-pilot\r\n```\r\n\r\nOr use it without installing:\r\n\r\n```bash\r\nnpx @anusha-hegde-08/spec-pilot generate --spec your-feature.md\r\n```\r\n\r\n## Setup\r\n\r\n1. Get an OpenAI API key from [platform.openai.com](https://platform.openai.com)\r\n2. Create a `.env` file in your project root:\r\n\r\n```\r\nOPENAI_API_KEY=your_key_here\r\n```\r\n\r\n## Usage\r\n\r\n### Generate code from a spec file\r\n\r\n```bash\r\nspec-pilot generate --spec examples/login.md\r\n```\r\n\r\n### Use a custom output directory\r\n\r\n```bash\r\nspec-pilot generate --spec examples/login.md --out ./src/features\r\n```\r\n\r\n### Preview files without generating them\r\n\r\n```bash\r\nspec-pilot generate --spec examples/login.md --dry-run\r\n```\r\n\r\n### Help\r\n\r\n```bash\r\nspec-pilot --help\r\n```\r\n\r\n## Options\r\n\r\n| Option      | Description                          | Required | Default    |\r\n| ----------- | ------------------------------------ | -------- | ---------- |\r\n| `--spec`    | Path to your markdown spec file      | Yes      | —          |\r\n| `--out`     | Output directory for generated files | No       | `./output` |\r\n| `--dry-run` | Preview files without calling the AI | No       | false      |\r\n\r\n## Writing a Good Spec\r\n\r\nA spec file is a markdown file with a `##` heading and bullet points.\r\n\r\n```markdown\r\n## Feature Name\r\n\r\n- requirement one\r\n- requirement two\r\n- requirement three\r\n```\r\n\r\nTips for better output:\r\n\r\n- Be specific — the more detail you add, the better the generated code\r\n- Use HTTP methods when describing endpoints — `POST /login`, `GET /users`\r\n- Describe both success and error cases\r\n- Aim for at least 3-5 bullet points per feature\r\n\r\n## Example Specs\r\n\r\n### User Authentication\r\n\r\n```markdown\r\n## User Authentication\r\n\r\n- POST /login accepts email and password\r\n- Validate that email and password are not empty\r\n- Return a JWT token if credentials are correct\r\n- Return 401 error if credentials are wrong\r\n- Hash passwords using bcrypt before comparing\r\n```\r\n\r\n### Todo List\r\n\r\n```markdown\r\n## Todo List\r\n\r\n- GET /todos returns all todos\r\n- POST /todos creates a new todo\r\n- DELETE /todos/:id deletes a todo by id\r\n- Each todo has a title and completed status\r\n```\r\n\r\n## Tech Stack\r\n\r\n- **TypeScript** — type-safe codebase\r\n- **Node.js** — runtime environment\r\n- **OpenAI API** — code generation\r\n- **Commander.js** — CLI framework\r\n- **Vitest** — unit testing\r\n- **dotenv** — environment variable management\r\n\r\n## Running Tests\r\n\r\n```bash\r\nnpm test\r\n```\r\n\r\n## Project Structure\r\n\r\n```\r\nspec-pilot/\r\n├── src/\r\n│   ├── index.ts        - CLI entry point\r\n│   ├── parser.ts       - reads and validates markdown spec files\r\n│   ├── generator.ts    - calls OpenAI API and returns generated code\r\n│   └── writer.ts       - saves generated files to disk\r\n├── tests/\r\n│   ├── parser.test.ts\r\n│   ├── writer.test.ts\r\n│   └── generator.test.ts\r\n└── examples/\r\n    ├── login.md\r\n    └── todo.md\r\n```\r\n\r\n## Contributing\r\n\r\nContributions are welcome. Please open an issue before submitting a pull request so we can discuss the change.\r\n\r\n1. Fork the repository\r\n2. Create a feature branch — `git checkout -b feat/your-feature`\r\n3. Commit your changes — `git commit -m \"feat: add your feature\"`\r\n4. Push to the branch — `git push origin feat/your-feature`\r\n5. Open a pull request\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}