Skip to content
All writing
CLI tools16 Jul 20232 min read

Introducing depextract: A Convenient CLI Tool for dependency extraction!

depextract is a powerful CLI tool designed to simplify the process of extracting dependencies from a package.json file. Whether you're upgrading an existing project or creating a new one with similar dependencies, depextract offers a convenient solution to retrieve the necessary production and development dependencies effortlessly. Developed by ashutosh887, this tool streamlines the task of generating a CLI script based on your package manager configuration.

Getting started:

To start using depextract, follow these steps:

  1. Open your terminal and navigate to the project directory or where your package.json file is located.

  2. Run the following command:

    npx depextract
    
  3. depextract will prompt you to select the location of the package.json file. You can choose one of the options presented. Use the arrow keys to navigate and press Enter to select.

    The default option is the current directory, which is pre-selected (marked with ❯).

    Select location of package.json
      ❯ current directory
        another directory (provide path in next step)
    
  4. Next, depextract will ask you to choose the package manager you want to use for your upcoming project. You can select npm, yarn, pnpm, or any other package manager that is supported.

    Again, use the arrow keys to navigate and press Enter to select.

    Select the package manager to be used for the upcoming project
      ❯ npm
        yarn
        pnpm
        ...
    
  5. Once you've made your selection, depextract will generate the installation scripts for your project's dependencies.

    The scripts will be saved in a file named "scripts.sh".

You can now open the "scripts.sh" file and copy the installation scripts to your terminal. Execute the scripts using the appropriate package manager to install the dependencies and dev dependencies for your project.

By following these steps, depextract simplifies the process of extracting and managing dependencies from your package.json file, allowing you to focus on your project's development rather than manual dependency installation.

Future goals:

depextract has exciting plans in store. Some of the upcoming features and improvements include path-based & remote extraction, enhanced customization, improved analysis, and enhanced package manager support.

Conclusion:

Try depextract today and experience a streamlined dependency management process that boosts your productivity and accelerates your development workflow.

Drop a ⭐️ on the GitHub Repo here: https://github.com/ashutosh887/depextract

For any queries, suggestions, or feature requests for upcoming versions, feel free to reach out to me on social media or open an issue on the GitHub repository. Your feedback is valuable and greatly appreciated!