{"_id":"@avnish100/autodeps","_rev":"1-b160ae64613c17b8a60320710c78546a","name":"@avnish100/autodeps","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@avnish100/autodeps","version":"1.0.1","keywords":["npm","imports","dependencies","typescript","framework-agnostic"],"author":{"name":"Avnish Jha"},"license":"MIT","_id":"@avnish100/autodeps@1.0.1","maintainers":[{"name":"avnish100","email":"avnishjha1005@gmail.com"}],"bin":{"autodeps":"dist/cli.js"},"dist":{"shasum":"053c90e3f1f5e51bcce699536d129755697dacaa","tarball":"https://registry.npmjs.org/@avnish100/autodeps/-/autodeps-1.0.1.tgz","fileCount":7,"integrity":"sha512-1kMFuX2CV3v1oNu8+BdXddOfJaGhBWTZkkTyzTh2MwhAEnitdBjRs+JudpkNKpNXi9cpg1GbXvtl7Eqwnv47SA==","signatures":[{"sig":"MEYCIQCg+cy9NnG4wYVzbPOGSnE4QsyO+WQM5yAexOGYGgN+OQIhAMQB16laU3m/sMvsgg5t+FFwYoZE2bs+MFd2OkLHB8BZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9124},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"0892ac7c683eee569692cf3fa85d6c628fb8d197","scripts":{"build":"tsc","prepack":"npm run build","prepublishOnly":"npm run build"},"_npmUser":{"name":"avnish100","email":"avnishjha1005@gmail.com"},"_npmVersion":"10.7.0","description":"Automatically detect missing or unused imports and update packages while preserving essential dependencies","directories":{},"_nodeVersion":"20.12.2","dependencies":{"ts-morph":"^16.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.5.4","@types/node":"^16.11.12"},"peerDependencies":{"typescript":">=4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/autodeps_1.0.1_1725374098883_0.06207872492236577","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@avnish100/autodeps","version":"1.0.2","description":"Automatically detect missing or unused imports and update packages while preserving essential dependencies","main":"dist/index.js","types":"dist/index.d.ts","bin":{"autodeps":"dist/cli.js"},"scripts":{"build":"tsc","prepublishOnly":"npm run build","prepack":"npm run build"},"keywords":["npm","imports","dependencies","typescript","framework-agnostic"],"author":{"name":"Avnish Jha"},"license":"MIT","dependencies":{"ts-morph":"^16.0.0"},"devDependencies":{"@types/node":"^16.11.12","typescript":"^4.5.4"},"peerDependencies":{"typescript":">=4.0.0"},"_id":"@avnish100/autodeps@1.0.2","gitHead":"cb8fae67af8748bf60e26176398937d01b028c85","_nodeVersion":"20.12.2","_npmVersion":"10.7.0","dist":{"integrity":"sha512-hsseC9tOZGSg+HdjJmvIZEKTIOpqHK08UwWe2/+SLgaANrIKsTS2ipcdBlnD3pX38cTY5CqgZ+M9eGIw3mq7nA==","shasum":"a6b0007a554b36082ea5f12f12b94a0b99b237aa","tarball":"https://registry.npmjs.org/@avnish100/autodeps/-/autodeps-1.0.2.tgz","fileCount":7,"unpackedSize":9400,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6Wo/PZrbeRcYcI0JtlwcnKXseAWexiPFme7weVEDFzQIgeyng8cN0mfOulGAl7PZ10E+L77hzrCzQ6bcFthq5DnU="}]},"_npmUser":{"name":"avnish100","email":"avnishjha1005@gmail.com"},"directories":{},"maintainers":[{"name":"avnish100","email":"avnishjha1005@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autodeps_1.0.2_1725375448998_0.19521310496947586"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-03T14:34:58.821Z","modified":"2024-09-03T14:57:29.286Z","1.0.1":"2024-09-03T14:34:59.071Z","1.0.2":"2024-09-03T14:57:29.138Z"},"author":{"name":"Avnish Jha"},"license":"MIT","keywords":["npm","imports","dependencies","typescript","framework-agnostic"],"description":"Automatically detect missing or unused imports and update packages while preserving essential dependencies","maintainers":[{"name":"avnish100","email":"avnishjha1005@gmail.com"}],"readme":"# autodeps\r\n\r\nautodeps is a CLI tool designed to streamline dependency management in NextJS projects. It automatically detects missing or unused imports in your TypeScript/JavaScript files and updates your package dependencies accordingly, while preserving essential NextJS-related dependencies.\r\n\r\n## Features\r\n\r\n- Analyzes your NextJS project's TypeScript/JavaScript files (including TSX/JSX) to identify used packages\r\n- Detects and installs missing dependencies\r\n- Removes unused dependencies\r\n- \r\n- Runs as a pre-build script to ensure your dependencies are always up-to-date\r\n- \r\n\r\n## Key Benefits\r\n\r\n### Streamlined Dependency Management\r\n\r\nautodeps takes the hassle out of managing your project's dependencies. It ensures that your `package.json` file always reflects the actual dependencies used in your code, reducing bloat and potential conflicts.\r\n\r\n### Faster Iteration with LLM-Generated Code\r\n\r\nWhen working with code generated by Large Language Models (LLMs), you often need to quickly add new dependencies to your project. This tool automates that process, allowing you to paste LLM-generated code into your project and have the necessary dependencies automatically installed. This significantly speeds up the development process and reduces the friction of integrating AI-assisted code into your NextJS projects.\r\n\r\n## Installation\r\n\r\nInstall autodeps as a dev dependency in your project:\r\n\r\n```bash\r\nnpm install --save-dev npm i @avnish100/autodeps\r\n```\r\n\r\n## Usage\r\n\r\n### As a CLI Tool\r\n\r\nYou can run autodeps using npx:\r\n\r\n```bash\r\nnpx autodeps\r\n```\r\n\r\n### As a Pre-build Script\r\n\r\nTo automatically run autodeps before your build process, add it to your `package.json` scripts:\r\n\r\n```json\r\n{\r\n  \"scripts\": {\r\n    \"prebuild\": \"autodeps\",\r\n    \"build\": \"next build\"\r\n  }\r\n}\r\n```\r\n\r\nNow, whenever you run `npm run build`, autodeps will execute first, ensuring your dependencies are up-to-date before the build process starts.\r\n\r\n## How It Works\r\n\r\n1. Analyzes all TypeScript/JavaScript files in your NextJS project\r\n2. Identifies packages imported in your code\r\n3. Compares the used packages with your current dependencies\r\n4. Installs missing dependencies\r\n5. Removes unused dependencies\r\n6. Preserves essential NextJS dependencies (next, react, react-dom, etc.)\r\n\r\n## Essential NextJS Dependencies\r\n\r\nThe following dependencies are considered essential and will always be preserved:\r\n\r\n- next\r\n- react\r\n- react-dom\r\n- @types/react\r\n- @types/react-dom\r\n- @types/node\r\n- typescript\r\n- eslint\r\n- eslint-config-next\r\n\r\n## Configuration\r\n\r\nCurrently, autodeps works out of the box without any configuration. It's specifically tailored for NextJS projects and automatically preserves the essential NextJS dependencies.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License.\r\n\r\n## Support\r\n\r\nIf you encounter any issues or have questions, please file an issue on the GitHub repository.\r\n\r\n## Roadmap\r\n\r\nFuture improvements may include:\r\n\r\n- Support for custom configurations\r\n- Integration with other NextJS-related tools and libraries\r\n- Performance optimizations for larger projects\r\n- Support for other JS frameworks\r\n\r\nStay tuned for updates!\r\n","readmeFilename":"README.md"}