{"id":24743416,"url":"https://github.com/layerdynamics/dep-list-cli","last_synced_at":"2025-07-14T16:39:07.802Z","repository":{"id":269921266,"uuid":"886382464","full_name":"LayerDynamics/dep-list-cli","owner":"LayerDynamics","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-31T06:53:14.000Z","size":21,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T21:45:01.759Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LayerDynamics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-10T21:09:22.000Z","updated_at":"2024-11-10T22:12:20.000Z","dependencies_parsed_at":"2024-12-27T07:26:01.406Z","dependency_job_id":"b9ea7035-2338-47c8-8a03-04641d865bd7","html_url":"https://github.com/LayerDynamics/dep-list-cli","commit_stats":null,"previous_names":["layerdynamics/dep-list-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LayerDynamics/dep-list-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fdep-list-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fdep-list-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fdep-list-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fdep-list-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LayerDynamics","download_url":"https://codeload.github.com/LayerDynamics/dep-list-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LayerDynamics%2Fdep-list-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265319570,"owners_count":23746364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T01:36:07.851Z","updated_at":"2025-07-14T16:39:07.774Z","avatar_url":"https://github.com/LayerDynamics.png","language":"JavaScript","readme":"# dep-list-cli\n\n[![npm version](https://img.shields.io/npm/v/dep-list-cli.svg)](https://www.npmjs.com/package/dep-list-cli)\n[![license](https://img.shields.io/npm/l/dep-list-cli.svg)](https://github.com/LayerDynamics/dep-list-cli/blob/main/LICENSE)\n\nA CLI tool to list npm packages used in your project files. It scans your JavaScript and TypeScript files to extract dependencies, categorizes them into regular and dev dependencies, and outputs them in a readable format or as npm install commands.\n\n- **Author:** Ryan O'Boyle\n- **Email:** [layerdynamics@proton.me](mailto:layerdynamics@proton.me)\n- **Repository:** [LayerDynamics/dep-list-cli](https://github.com/LayerDynamics/dep-list-cli.git)\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Basic Usage](#basic-usage)\n  - [As NPM Install Commands](#as-npm-install-commands)\n  - [Using NPX](#using-npx)\n- [Examples](#examples)\n- [How It Works](#how-it-works)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Scans JavaScript (`.js`, `.jsx`) and TypeScript (`.ts`, `.tsx`) files.\n- Extracts dependencies from `import`, `require`, and dynamic imports.\n- Categorizes dependencies into regular and dev dependencies.\n- Respects `.gitignore` and internal ignore patterns.\n- Outputs dependencies in a readable list or as `npm install` commands.\n- Supports monorepos with multiple `package.json` files.\n\n## Installation\n\nYou can install `dep-list-cli` globally using npm:\n\n```bash\nnpm install -g dep-list-cli\n```\n\nOr use it directly with `npx` without installation:\n\n```bash\nnpx dep-list-cli\n```\n\n## Usage\n\n### Basic Usage\n\nRun the CLI in the root directory of your project:\n\n```bash\ndep-list-cli\n```\n\nThis will output the dependencies found in your project files, categorized into regular and dev dependencies.\n\n### As NPM Install Commands\n\nIf you want the output as `npm install` commands, use the `--command` or `-c` option:\n\n```bash\ndep-list-cli --command\n```\n\nThis will output commands that you can run to install the dependencies:\n\n```bash\nnpm install package1 package2\nnpm install -D dev-package1 dev-package2\n```\n\n### Using NPX\n\nYou can use `dep-list-cli` without installing it globally by using `npx`:\n\n```bash\nnpx dep-list-cli\n```\n\nOr with the `--command` option:\n\n```bash\nnpx dep-list-cli --command\n```\n\n## Examples\n\n### Example 1: Basic Usage\n\nRunning `dep-list-cli` in a project:\n\n```bash\ndep-list-cli\n```\n\n**Output:**\n\n```\nProject: my-awesome-project\nRegular Dependencies:\n- express\n- mongoose\n- react\n- redux\n\nDev Dependencies:\n- jest\n- eslint\n```\n\n### Example 2: Output as NPM Install Commands\n\nRunning `dep-list-cli` with the `--command` option:\n\n```bash\ndep-list-cli --command\n```\n\n**Output:**\n\n```\nProject: my-awesome-project\nRegular Dependencies:\n npm install express mongoose react redux\n\nDev Dependencies:\n npm install -D jest eslint\n```\n\n### Example 3: Using NPX\n\nUsing `npx` to run the CLI without installation:\n\n```bash\nnpx dep-list-cli --command\n```\n\n**Output:**\n\n```\nProject: my-awesome-project\nRegular Dependencies:\n npm install express mongoose react redux\n\nDev Dependencies:\n npm install -D jest eslint\n```\n\n## How It Works\n\n1. **Scanning Files:**\n   - The tool scans all `.js`, `.jsx`, `.ts`, and `.tsx` files in your project directories, excluding those specified in `.gitignore` and internal ignore patterns (like `node_modules`, `dist`, etc.).\n\n2. **Extracting Dependencies:**\n   - It parses each file's Abstract Syntax Tree (AST) to find dependencies imported using `import`, `require`, and dynamic imports.\n\n3. **Categorizing Dependencies:**\n   - Dependencies are categorized into:\n     - **Regular Dependencies:** Used in your application's main code.\n     - **Dev Dependencies:** Used in development files like tests and scripts.\n\n4. **Outputting Results:**\n   - The tool outputs the dependencies either as a list or as `npm install` commands, depending on the options used.\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository: [LayerDynamics/dep-list-cli](https://github.com/LayerDynamics/dep-list-cli.git)\n2. Create your feature branch: `git checkout -b feature/my-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin feature/my-feature`\n5. Create a new Pull Request\n\nFor major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\nIf you have any questions or need assistance, feel free to contact the author:\n\n- **Email:** [layerdynamics@proton.me](mailto:layerdynamics@proton.me)\n\nHappy coding!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayerdynamics%2Fdep-list-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flayerdynamics%2Fdep-list-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayerdynamics%2Fdep-list-cli/lists"}