Skip to content

dyte-submissions/dyte-vit-2022-AbhinavGor

Repository files navigation

Open in Visual Studio Code

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

agCLI

A command line tool built using NodeJS to help update npm packages on github repositories.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Product Name Screen Shot

(back to top)

Built With

(back to top)

Getting Started

To use this package, you can install it directly from npmjs.org using the package manager, npm.

Prerequisites

You can install my npm package, agcli using the following command.

  • npm
    npm install agcli@latest -g

Installation

You can also setup the project locally and run the commands.

  1. Get a Github developer Auth key at https://github.com/settings/tokens.
  2. Clone the repo
    git clone https://github.com/dyte-submissions/dyte-vit-2022-AbhinavGor.git
  3. Install NPM packages
    npm install
  4. Change the name of .example.env to .env.
  5. Enter your API in .env
    const GITHUB_TOKEN = {ENTER YOUR Auth token};
  6. Enter your github username and password in .env file.
    USER_NAME={your github username}
    USER_EMAIL={email associated with your github account}

(back to top)

Usage

  1. This command checks if any of the repositories listed in the csv file have an older version of the package and version specified. The "-update" flag takes control of updating the specified package.
    agcli -i <input_repositories_csv_file> <package_name@version> -update
    command-screenshot-1
  2. The command shown above can also be used without the "-update" flag as shown below.
    agcli -i <input_repositories_csv_file> <package_name@version>
    command-screenshot-2
  3. If the specified version number of the package does not exist, then an error is thrown as shown below. command-screenshot-3
  4. The get-updates <repository_url> command allows users to get the latest version of all the npm packages being used in the specified github project.
    agcli get-updates <repository_url>
    command-screenshot-4
  5. The users can then specifiy the indices of the dependencies in the table which they want to update, PRs are made to update those npm packages. command-screenshot-5
  6. Help can be accessed using the following command:
    agcli --help

(back to top)

Roadmap

  • Compare the version of the npm package in the project and the one specified by the user in the command and tell if the version is satisfied or not.
    • Check if the version of the package specified by user actually exists for that particular npm package or not. Implemented using pkg-versions.
  • If the version is not satisfied in the above step, make a PR to the repository mentioned to update the npm package to the required version.
  • get-updates command - Check if all the packages are up to date in a given github project and report result.
    • If the version of the packages is not the latest, ask the user which ones they want to update and make PR to update those packages.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Abhinav Gorantla - abhinav20016@gmail.com

Project Link: https://github.com/dyte-submissions/dyte-vit-2022-AbhinavGor

(back to top)

(back to top)

About

dyte-vit-2022-AbhinavGor created by GitHub Classroom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published