{"_id":"@0xdevabir/enhance","_rev":"5-39bb700500a9cabec64a8472b17ac976","name":"@0xdevabir/enhance","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@0xdevabir/enhance","version":"0.1.0","keywords":["ai","cli","prompt","developer-tools","claude","codex","opencode","prompt-engineering"],"author":{"name":"0xdevabir"},"license":"MIT","_id":"@0xdevabir/enhance@0.1.0","maintainers":[{"name":"0xdevabir","email":"devabir.me@gmail.com"}],"homepage":"https://github.com/0xdevabir/agent-enhance#readme","bugs":{"url":"https://github.com/0xdevabir/agent-enhance/issues"},"bin":{"enhance":"bin/enhance.js"},"dist":{"shasum":"e56b5d7212f44c81f9d8b20c52e232d4d57adc75","tarball":"https://registry.npmjs.org/@0xdevabir/enhance/-/enhance-0.1.0.tgz","fileCount":4,"integrity":"sha512-tyKaQqT17xQMl6WJkb1xGD7UMg4Nlgd6S8C14J4ViXqSGM45j1gT0dwyvqwfUHCGQGh58S7WARdYVia4cLqKLA==","signatures":[{"sig":"MEUCIQCuBEQjJPFYPbUePIBW73G9pTB+z4ue+4+TVq9fJ8z/RQIgdJwxE8i6G4/a5+amelX05+TyTj//KNvDuL2I9SWHoxc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39682},"type":"module","engines":{"node":">=20"},"gitHead":"6da1b3620177d7923dd7609cc3f78b9e28739005","scripts":{"dev":"tsx src/cli/index.ts","test":"vitest run","build":"tsup","start":"node bin/enhance.js","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"0xdevabir","email":"devabir.me@gmail.com"},"repository":{"url":"git+https://github.com/0xdevabir/agent-enhance.git","type":"git"},"_npmVersion":"11.11.0","description":"AI prompt middleware — intelligently rewrites developer prompts before sending to coding agents","directories":{},"_nodeVersion":"24.14.1","dependencies":{"ora":"^9.4.0","chalk":"^5.6.2","commander":"^14.0.3","fast-glob":"^3.3.3","cosmiconfig":"^9.0.1","@anthropic-ai/sdk":"^0.98.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1"},"_npmOperationalInternal":{"tmp":"tmp/enhance_0.1.0_1779609327119_0.26996085778264867","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0xdevabir/enhance","version":"0.1.1","keywords":["ai","cli","prompt","developer-tools","claude","codex","opencode","prompt-engineering"],"author":{"name":"0xdevabir"},"license":"MIT","_id":"@0xdevabir/enhance@0.1.1","maintainers":[{"name":"0xdevabir","email":"devabir.me@gmail.com"}],"homepage":"https://github.com/0xdevabir/agent-enhance#readme","bugs":{"url":"https://github.com/0xdevabir/agent-enhance/issues"},"bin":{"enhance":"bin/enhance.js"},"dist":{"shasum":"8bdbbc6ff92eca678332a7ee97550a9bfdcea5b5","tarball":"https://registry.npmjs.org/@0xdevabir/enhance/-/enhance-0.1.1.tgz","fileCount":4,"integrity":"sha512-TeE+9jbvGKiVex5WWOeEWL/Si74qFK6tVV+l7dXlaRIDo5bG3nfqa8DwUT/0CjVa6aye3eVVnZnLt5aRBrCyXw==","signatures":[{"sig":"MEUCIHezWPbOk6GM9l0M/XCHllwLVvDCHZ1+zcPcPqNgrd1mAiEA6JMxDNChEMWwdfU8UyHKYopUY4ChYMGsh20zAjJN6pw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59560},"type":"module","engines":{"node":">=20"},"gitHead":"8ea7b1a4051108aab1118aaefaf3c89873ee7b0a","scripts":{"dev":"tsx src/cli/index.ts","test":"vitest run","build":"tsup","start":"node bin/enhance.js","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"0xdevabir","email":"devabir.me@gmail.com"},"repository":{"url":"git+https://github.com/0xdevabir/agent-enhance.git","type":"git"},"_npmVersion":"11.11.0","description":"AI prompt middleware — intelligently rewrites developer prompts before sending to coding agents","directories":{},"_nodeVersion":"24.14.1","dependencies":{"ora":"^9.4.0","chalk":"^5.6.2","commander":"^14.0.3","fast-glob":"^3.3.3","cosmiconfig":"^9.0.1","@anthropic-ai/sdk":"^0.98.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1"},"_npmOperationalInternal":{"tmp":"tmp/enhance_0.1.1_1779634327726_0.3816218056589016","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@0xdevabir/enhance","version":"0.1.2","keywords":["ai","cli","prompt","developer-tools","claude","codex","opencode","prompt-engineering"],"author":{"name":"0xdevabir"},"license":"MIT","_id":"@0xdevabir/enhance@0.1.2","maintainers":[{"name":"0xdevabir","email":"devabir.me@gmail.com"}],"homepage":"https://github.com/0xdevabir/agent-enhance#readme","bugs":{"url":"https://github.com/0xdevabir/agent-enhance/issues"},"bin":{"enhance":"bin/enhance.js"},"dist":{"shasum":"481228dec01110351bb40efabd78ebc30ba15e40","tarball":"https://registry.npmjs.org/@0xdevabir/enhance/-/enhance-0.1.2.tgz","fileCount":4,"integrity":"sha512-b7ThvEr8kI9ZlPjnnYH1Iiog7qiLmcgXT+VTLzxNG54Vn3250GBcmLtuj+qa0CEXG+uWsYp8mObWUiUYUesJOw==","signatures":[{"sig":"MEQCIBfBuy1zdW9+hv2hv6FKG4UUcGHDTCV+/qTU8VqLZy8aAiAhZmVHsITyKQlLsVoiEczEeIn6Pwfumlv0w5WvBFyKSg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66396},"type":"module","engines":{"node":">=20"},"gitHead":"6379cfa3b8758f5501e2f88a4012d0c0f774d02c","scripts":{"dev":"tsx src/cli/index.ts","test":"vitest run","build":"tsup","start":"node bin/enhance.js","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"0xdevabir","email":"devabir.me@gmail.com"},"repository":{"url":"git+https://github.com/0xdevabir/agent-enhance.git","type":"git"},"_npmVersion":"11.11.0","description":"AI prompt middleware — intelligently rewrites developer prompts before sending to coding agents","directories":{},"_nodeVersion":"24.14.1","dependencies":{"ora":"^9.4.0","chalk":"^5.6.2","commander":"^14.0.3","fast-glob":"^3.3.3","cosmiconfig":"^9.0.1","@anthropic-ai/sdk":"^0.98.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1"},"_npmOperationalInternal":{"tmp":"tmp/enhance_0.1.2_1779635615644_0.3087754694433211","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@0xdevabir/enhance","version":"0.1.3","keywords":["ai","cli","prompt","developer-tools","claude","codex","opencode","prompt-engineering"],"author":{"name":"0xdevabir"},"license":"MIT","_id":"@0xdevabir/enhance@0.1.3","maintainers":[{"name":"0xdevabir","email":"devabir.me@gmail.com"}],"homepage":"https://github.com/0xdevabir/agent-enhance#readme","bugs":{"url":"https://github.com/0xdevabir/agent-enhance/issues"},"bin":{"enhance":"bin/enhance.js"},"dist":{"shasum":"c9fd473959a65ea715b90902136983058cc0d44d","tarball":"https://registry.npmjs.org/@0xdevabir/enhance/-/enhance-0.1.3.tgz","fileCount":4,"integrity":"sha512-rCztm75t356YL75cqB9MfEi8h4S3LcqN2K1akidS6hrNOO6mOpPrretxd3N2PjkFE0UZs9PjRyOEmC1zYzX63w==","signatures":[{"sig":"MEQCIDqHEw6+IPkKp2JTOvp7ipt8cqujbOyYxAZ4RzxOx2vRAiBc7ibsydaO5DNf5XF81uphEjJ3nC4GzHafPoIB2pPpEw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66404},"type":"module","engines":{"node":">=20"},"gitHead":"e48cc6cf8b222226f7411ebe61e74c659c131035","scripts":{"dev":"tsx src/cli/index.ts","test":"vitest run","build":"tsup","start":"node bin/enhance.js","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"0xdevabir","email":"devabir.me@gmail.com"},"repository":{"url":"git+https://github.com/0xdevabir/agent-enhance.git","type":"git"},"_npmVersion":"11.11.0","description":"AI prompt middleware — intelligently rewrites developer prompts before sending to coding agents","directories":{},"_nodeVersion":"24.14.1","dependencies":{"ora":"^9.4.0","chalk":"^5.6.2","commander":"^14.0.3","fast-glob":"^3.3.3","cosmiconfig":"^9.0.1","@anthropic-ai/sdk":"^0.98.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.22.3","tsup":"^8.5.1","vitest":"^4.1.7","typescript":"^6.0.3","@types/node":"^25.9.1"},"_npmOperationalInternal":{"tmp":"tmp/enhance_0.1.3_1779636004230_0.6250732182832053","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@0xdevabir/enhance","version":"0.1.4","description":"AI prompt middleware — intelligently rewrites developer prompts before sending to coding agents","bin":{"enhance":"bin/enhance.js"},"scripts":{"dev":"tsx src/cli/index.ts","build":"tsup","start":"node bin/enhance.js","test":"vitest run","prepublishOnly":"npm run build && npm test"},"repository":{"type":"git","url":"git+https://github.com/0xdevabir/agent-enhance.git"},"keywords":["ai","cli","prompt","developer-tools","claude","codex","opencode","prompt-engineering"],"author":{"name":"0xdevabir"},"license":"MIT","type":"module","bugs":{"url":"https://github.com/0xdevabir/agent-enhance/issues"},"homepage":"https://github.com/0xdevabir/agent-enhance#readme","engines":{"node":">=20"},"dependencies":{"@anthropic-ai/sdk":"^0.98.0","chalk":"^5.6.2","commander":"^14.0.3","cosmiconfig":"^9.0.1","fast-glob":"^3.3.3","ora":"^9.4.0"},"devDependencies":{"@types/node":"^25.9.1","tsup":"^8.5.1","tsx":"^4.22.3","typescript":"^6.0.3","vitest":"^4.1.7"},"gitHead":"8c0c1ee131bf6749226b7b31a3e3e53c50dd954e","_id":"@0xdevabir/enhance@0.1.4","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-4cmPjgWmKGVIkxYKHy9dPDW+qMEHsovDt3s8eGu+NAPN7xxq87j+CLWzK8zKU0+3Q/oSE6rfnmu2tLgXmIhQGw==","shasum":"fced7faf5a6219d1682f9de0c1d9bbb33226b847","tarball":"https://registry.npmjs.org/@0xdevabir/enhance/-/enhance-0.1.4.tgz","fileCount":4,"unpackedSize":66852,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCHxgBz8FUbT8SH3OZJK0oi9r4nmreZog5eScBVJILyswIhANa+Y8Qz6FZE7vu7fU+Qi5GaErgLZL/yhB9HUCGrFnaz"}]},"_npmUser":{"name":"0xdevabir","email":"devabir.me@gmail.com"},"directories":{},"maintainers":[{"name":"0xdevabir","email":"devabir.me@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/enhance_0.1.4_1779638971374_0.2032742570889865"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-24T07:55:26.976Z","modified":"2026-05-24T16:09:31.634Z","0.1.0":"2026-05-24T07:55:27.277Z","0.1.1":"2026-05-24T14:52:07.899Z","0.1.2":"2026-05-24T15:13:35.811Z","0.1.3":"2026-05-24T15:20:04.387Z","0.1.4":"2026-05-24T16:09:31.525Z"},"bugs":{"url":"https://github.com/0xdevabir/agent-enhance/issues"},"author":{"name":"0xdevabir"},"license":"MIT","homepage":"https://github.com/0xdevabir/agent-enhance#readme","keywords":["ai","cli","prompt","developer-tools","claude","codex","opencode","prompt-engineering"],"repository":{"type":"git","url":"git+https://github.com/0xdevabir/agent-enhance.git"},"description":"AI prompt middleware — intelligently rewrites developer prompts before sending to coding agents","maintainers":[{"name":"0xdevabir","email":"devabir.me@gmail.com"}],"readme":"# Enhance\n\n> AI prompt middleware — upgrades vague developer prompts into production-quality instructions before sending to coding agents.\n\n## What it does\n\nInstead of sending `build login page` directly to Claude/Codex/OpenCode:\n\n1. Scans your project (stack, frameworks, folder structure)\n2. Analyzes your intent\n3. Finds relevant existing files for context\n4. Rewrites the prompt with structure, best practices, and project awareness\n5. Sends the enhanced prompt to the AI\n\n**Same effort. Dramatically better output.**\n\n---\n\n## Installation\n\n### Prerequisites\n\n- Node.js 20+\n- At least one AI coding tool: [Claude Code](https://claude.ai/code), [OpenCode](https://opencode.ai), or [Codex CLI](https://github.com/openai/codex)\n\n### Option A — No install (npx)\n\n```bash\nnpx @0xdevabir/enhance@latest \"build a login page\"\n```\n\nRuns directly without installing anything globally. Great for trying it out or if you hit permission errors.\n\n### Option B — Global install\n\n```bash\nnpm install -g @0xdevabir/enhance\n```\n\n> **Permission error (EACCES)?** Fix npm's global prefix first, then retry:\n> ```bash\n> mkdir -p ~/.npm-global\n> npm config set prefix '~/.npm-global'\n> echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.zshrc\n> source ~/.zshrc\n> npm install -g @0xdevabir/enhance\n> ```\n\n### Step 2 — Run setup\n\n### Step 2 — Run setup\n\n```bash\nenhance setup\n```\n\nDetects which AI coding tools you have installed and automatically adds the `/enhance` slash command to each one.\n\n```\nEnhance — Setup\n\nDetected: Claude Code, OpenCode\nNot found: Codex CLI\n\n✓ Claude Code → ~/.claude/commands/enhance.md\n✓ OpenCode    → ~/.opencode/commands/enhance.md\n\nReady. In any project, type:\n\n  /enhance build a login page\n  /enhance fix the auth bug\n  /enhance refactor the user service\n```\n\n**Options:**\n```bash\nenhance setup --force   # overwrite existing installations\nenhance setup --all     # install for all tools even if not detected\n```\n\n### Step 3 — Use it\n\nOpen Claude Code, OpenCode, or Codex CLI in any project and type:\n\n```\n/enhance build a login page with email and password\n```\n\n---\n\n## Usage\n\n### Inside Claude Code / OpenCode / Codex CLI (after `enhance setup`)\n\n```\n/enhance build a login page with email and password\n/enhance fix the auth bug\n/enhance create a payment form with Stripe\n/enhance refactor the user service to use dependency injection\n/enhance add dark mode support\n```\n\n### Standalone CLI (calls AI directly)\n\nRequires API key:\n```bash\nexport ANTHROPIC_API_KEY=sk-ant-...\n```\n\n```bash\n# Basic — scans project, enhances prompt, calls Claude\nenhance \"build a login page\"\n\n# Dry run — see the enhanced prompt without calling AI\nenhance \"fix the auth bug\" --dry-run\n\n# Show enhanced prompt AND call AI\nenhance \"create dashboard component\" --print-prompt\n\n# See detected stack and intent\nenhance \"refactor user service\" --verbose\n\n# Use a different provider\nenhance \"add payment form\" --provider codex\n```\n\n---\n\n## Configuration\n\nCreate `.enhancerc.json` in your project root to customize behavior per-project:\n\n```json\n{\n  \"provider\": \"claude\",\n  \"model\": \"claude-sonnet-4-6\",\n  \"maxContextTokens\": 3000,\n  \"customInstructions\": \"Always use React Query. Prefer named exports.\"\n}\n```\n\n| Key | Default | Description |\n|---|---|---|\n| `provider` | `claude` | AI provider: `claude`, `codex`, `opencode` |\n| `model` | `claude-sonnet-4-6` | Model ID |\n| `maxContextTokens` | `3000` | Max characters of project files to include |\n| `customInstructions` | — | Extra instructions always injected into every prompt |\n\n---\n\n## Providers\n\n### Claude (default)\n\nRequires `ANTHROPIC_API_KEY`. Get one at [console.anthropic.com](https://console.anthropic.com/).\n\n```bash\nexport ANTHROPIC_API_KEY=sk-ant-...\nenhance \"build login page\"\n```\n\n### Codex CLI\n\n```bash\nnpm install -g @openai/codex\nenhance \"build login page\" --provider codex\n```\n\n### OpenCode\n\n```bash\nnpm install -g opencode\nenhance \"build login page\" --provider opencode\n```\n\n---\n\n## What Enhance Detects\n\n| Category | Detected |\n|---|---|\n| Frameworks | Next.js, React, Vue, Svelte, Nuxt, Remix, Astro, Express, Fastify, Hono, NestJS |\n| Styling | TailwindCSS, shadcn/ui, Material UI, Chakra UI, Ant Design |\n| ORMs | Prisma, Drizzle, TypeORM, Mongoose |\n| Testing | Vitest, Jest, Playwright, Cypress |\n| Language | TypeScript vs JavaScript |\n| Router | Next.js App Router vs Pages Router |\n| Package manager | npm, yarn, pnpm, bun |\n\n---\n\n## Example Enhancement\n\n**Input:**\n```\nenhance \"build login page\"\n```\n\n**Enhanced prompt sent to AI:**\n```\nYou are working inside a Next.js TypeScript project.\n\n## Project Stack\n- Language: TypeScript\n- Frameworks: Next.js, React, TailwindCSS, shadcn/ui\n- UI Library: shadcn/ui\n- ORM: Prisma\n- Next.js Router: App Router\n\n## Task\nCreate: build login page\n\n## Requirements\n- Use TypeScript throughout — no `any`, prefer `unknown` with type guards\n- Use Server Components by default — only add \"use client\" when needed\n- Follow App Router conventions: page.tsx, layout.tsx, route.ts\n- Use `next/navigation` for navigation\n- Use Tailwind classes — no custom CSS unless unavoidable\n- Use shadcn/ui components over building from scratch\n- Never store plain text passwords — use bcrypt or argon2\n- Use httpOnly, secure cookies for session tokens — never localStorage\n- Validate and sanitize all auth inputs server-side\n- Consider rate limiting on login/signup endpoints\n- ...\n```\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/0xdevabir/agent-enhance.git\ncd agent-enhance\nnpm install\n\n# Run without building\nnpm run dev -- \"build login page\" --dry-run\n\n# Run tests\nnpm test\n\n# Build\nnpm run build\n```\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}