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-cli
Build the binary:
make build
Install the binary and default config (requires sudo for system-wide install):
sudo make install
This will:
- Copy the
docs
binary to/usr/local/bin/
- Copy the
config.yaml
to/usr/local/etc/docs/config.yaml
docs <name>
- Opens the official documentation for
<name>
in your default browser.
docs go
Opens https://go.dev/doc/
docs <name> --github
docs python --github
Opens https://github.com/python/cpython
docs list
The 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 needed
You can override the config path by setting the DOCS_CONFIG_PATH
environment variable:
export DOCS_CONFIG_PATH=/path/to/your/config.yaml
make test
make test-coverage
make clean
sudo 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