FetchDoc CLI
FetchDoc is a command-line tool that assists developers in swiftly accessing the documentation of any npm package. With a straightforward command, FetchDoc either opens the official repository of the specified npm package in your default browser or displays the README content directly in your terminal, streamlining your journey into the docs.
Features
- Quick Access: Instantly open the official repository of any npm package.
- Display README in Terminal: Instead of navigating to the browser, you can now view the README content directly in your terminal using the
-r
flag. - Error Handling: Improved error messages to guide you when things don't go as planned.
- Search Packages: (Coming Soon) Search for npm packages by keywords.
- List Dependencies: (Coming Soon) Display a list of dependencies for the given npm package.
Installation
npm install -g fetchdoc-cli
Usage
To open the documentation of a package:
fetchdoc <package-name>
To display the README content in the terminal:
fetchdoc <package-name> -r
Testing
We've added unit tests to ensure the reliability of the tool. To run the tests:
npm test
Contributing
We're always excited about contributions from the community! If you're considering contributing, here's a step-by-step guide:
- Fork the Repository: Use the 'Fork' button at the top right.
- Clone Your Fork: Get the URL of your fork and then
git clone <your-fork-url>
. - Navigate to the Directory:
cd fetchdoc-cli
. - Create a New Branch:
git checkout -b new-feature
. - Make Your Changes: Implement a feature or fix a bug.
- Commit:
git commit -am 'Add some feature'
. - Push:
git push origin new-feature
. - Pull Request: On the main repository page, click 'New pull request'.
Ensure your code aligns with our standards and includes tests.
License
MIT License. Refer to the LICENSE file for more details.