{"_id":"-ai-code-optimizer-","name":"-ai-code-optimizer-","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"-ai-code-optimizer-","version":"1.0.1","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["ai","code-optimizer","performance","node","cli","grok","openai"],"author":{"name":"NDDonman"},"license":"ISC","bin":{"ai-code-optimizer":"bin/ai-code-optimizer.js"},"description":"AI-powered tool to scan and optimize Node.js code for performance.","repository":{"type":"git","url":"git+https://github.com/NDDonman/ai-code-optimizer.git"},"dependencies":{"@types/node":"^25.2.3","chalk":"^4.1.2","commander":"^14.0.3","dotenv":"^16.6.1","figlet":"^1.10.0","glob":"^8.1.0","inquirer":"^8.2.7","openai":"^6.21.0","ora":"^5.4.1","ts-node":"^10.9.2","typescript":"^5.9.3"},"devDependencies":{"@types/glob":"^8.1.0","@types/inquirer":"^8.2.12"},"_id":"-ai-code-optimizer-@1.0.1","gitHead":"a3c0d30c2d366c44d6837ff258ddf8a73c5b5643","bugs":{"url":"https://github.com/NDDonman/ai-code-optimizer/issues"},"homepage":"https://github.com/NDDonman/ai-code-optimizer#readme","_nodeVersion":"20.15.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-4a4lulMEbVZL+xqVXQ9GwSIorv9WnGKW7mvIG3w0JdlXmVveiEpO77zqv1S4CEJXOqqCS1fCCGA8uECpquhTwQ==","shasum":"fa8ff0bd2bebda45db1dbedd410589b10e16077c","tarball":"https://registry.npmjs.org/-ai-code-optimizer-/-/-ai-code-optimizer--1.0.1.tgz","fileCount":10,"unpackedSize":11822,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID7X5C34oNB64uc7GtnUU4b60DFkzeRcYXftS+eTmLzoAiBEBzqcAWLYnmv4rSzJmO8/v5/GNe8saOvPSGtU9SzzgA=="}]},"_npmUser":{"name":"nddonman","email":"nddonman@gmail.com"},"directories":{},"maintainers":[{"name":"nddonman","email":"nddonman@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/-ai-code-optimizer-_1.0.1_1770882027698_0.19630561573994654"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-12T07:40:27.611Z","1.0.1":"2026-02-12T07:40:27.838Z","modified":"2026-02-12T07:40:28.051Z"},"maintainers":[{"name":"nddonman","email":"nddonman@gmail.com"}],"description":"AI-powered tool to scan and optimize Node.js code for performance.","homepage":"https://github.com/NDDonman/ai-code-optimizer#readme","keywords":["ai","code-optimizer","performance","node","cli","grok","openai"],"repository":{"type":"git","url":"git+https://github.com/NDDonman/ai-code-optimizer.git"},"author":{"name":"NDDonman"},"bugs":{"url":"https://github.com/NDDonman/ai-code-optimizer/issues"},"license":"ISC","readme":"# AI Code Optimizer\r\n\r\n\r\n**AI Code Optimizer** is a CLI tool that uses AI (OpenAI or Grok) to scan your Node.js codebase for performance issues and automatically suggests or applies fixes.\r\n\r\n## Features\r\n\r\n- 🚀 **AI-Powered Scanning**: Detects performance bottlenecks, anti-patterns, and inefficiencies.\r\n- 🤖 **Multi-Model Support**: Works with OpenAI (GPT-4) and xAI (Grok-2, Grok-3).\r\n- 🛠️ **Auto-Fix**: Interactively apply AI-suggested fixes directly to your code.\r\n- ⚙️ **Configurable**: use `.env` or `.ai-optimizer-rc` for flexible configuration.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install -g ai-code-optimizer\r\n```\r\n\r\n## Usage\r\n\r\n### 1. Configuration\r\n\r\nCreate a `.env` file in your project root:\r\n\r\n```env\r\n# Choose your AI provider\r\nAI_MODEL=grok  # or openai\r\n\r\n# API Keys\r\nGROK_API_KEY=your_xai_api_key\r\n# OPENAI_API_KEY=your_openai_api_key\r\n\r\n# Optional: Specific Model Version\r\n# GROK_MODEL=grok-2\r\n```\r\n\r\n### 2. Run a Scan\r\n\r\nTo scan the current directory for issues:\r\n\r\n```bash\r\nai-code-optimizer scan\r\n```\r\n\r\nThe tool will analyze `.js` and `.ts` files, report issues, and offer to fix them.\r\n\r\n### 3. Check Configuration\r\n\r\n```bash\r\nai-code-optimizer config\r\n```\r\n\r\n## Development\r\n\r\n1.  Clone the repository.\r\n2.  Install dependencies: `npm install`\r\n3.  Run locally: `npm run dev` (requires `ts-node`)\r\n\r\n## License\r\n\r\nISC\r\n","readmeFilename":"README.md","_rev":"1-ecd6b2d75ba63b92abe529ddc8d3736b"}