A fast and convenient CLI tool to open developer documentation in your browser.
Quickly access official docs or GitHub repositories for your favorite languages, frameworks, and tools.
- 🔗 Open official documentation or GitHub repo for a given technology.
- 📝 Easily extensible: add your own docs to the config file.
- 🖥️ Simple CLI interface.
- 🧪 Fully tested and CI-friendly.
- Go 1.20 or newer
Clone the repository:
git clone https://github.com/yourusername/go-docs-cli.git
cd go-docs-cliBuild the binary:
make buildInstall the binary and default config (requires sudo for system-wide install):
sudo make installThis will:
- Copy the
docsbinary to/usr/local/bin/ - Copy the
config.yamlto/usr/local/etc/docs/config.yaml
docs <name>- Opens the official documentation for
<name>in your default browser.
docs goOpens https://go.dev/doc/
docs <name> --githubdocs python --githubOpens https://github.com/python/cpython
docs listThe documentation sources are defined in a YAML config file (default: /usr/local/etc/docs/config.yaml).
Example config.yaml:
documentation:
docker:
official: https://docs.docker.com/
github: https://github.com/docker/docker
go:
official: https://go.dev/doc/
github: https://github.com/golang/go
python:
official: https://docs.python.org/3/
github: https://github.com/python/cpython
# Add more entries as neededYou can override the config path by setting the DOCS_CONFIG_PATH environment variable:
export DOCS_CONFIG_PATH=/path/to/your/config.yamlmake testmake test-coveragemake cleansudo make uninstall- Fork the repo and create a feature branch.
- Add or update tests for your changes.
- Open a pull request!
MIT
- Cobra for CLI framework
- fatih/color for colored output