docr
Version, currently 0.1.24 versions
- 0.1.2latestMay 8, 2023
- 0.1.1not indexedMay 10, 2025
- 0.1.0not indexedMay 10, 2025
- nightlynot indexedMay 10, 2025
github.com/devnote-dev/docr
A CLI tool for searching Crystal documentation
Installation
# Add this to your shard.yml
dependencies:
docr:
github: devnote-dev/docr
version: ~> 0.1.2Then run:
shards installshard.yml
- Crystal
1.8.0- License
- MPL
- Author
- Devonte W <https://github.com/devnote-dev>
- Target
docrfrom src/cli.cr
Dependencies
Runtime Dependencies
Development Dependencies
- ameba~> 1.4.0github: crystal-ameba/amebadev
README
Docr
docr is a tool for searching Crystal API and shards documentation from the command line.

Installation
See the releases page for available binaries.
From Source
Go 1.19 or above is required to build Docr.
git clone https://github.com/devnote-dev/docr
cd docr
go get
scripts/build.cmd # for windows
scripts/build.sh # for linux/darwin
Usage
By default, Docr comes with no libraries, but you can easily import the standard library documentation using docr update. This command will search for the crystal executable on your system and import that version of the API documentation. If the executable isn't found, it defaults to the latest available Crystal release. If you want to import the standard library directly or a specific version, you can do so with the docr add crystal <version> command (also accepts "latest" as a version).

You can also import third-party libraries (or shards) using the docr add command:

After importing the libraries you want, you can simply lookup or search whatever you want! Use the docr search command to search for all types and symbols matching the query, and the docr info command to get direct information about a specified type or symbol:

Both the info and search commands support Crystal path syntax for queries, meaning the following commands are valid:
docr info JSON::Any.as_sdocr info JSON::Any#as_sdocr info JSON::Any as_s
However, the following commands are not valid:
docr info JSON Any as_sdocr info JSON Any.as_sdocr info JSON Any#as_s
This is because the first argument is parsed as the base type or namespace to look in, and the second argument is parsed as the symbol to look for. In the first example, JSON::Any is the namespace and as_s the symbol, whereas in the second example, JSON is the namespace and Any as_s is the symbol, which is invalid. This doesn't mean you have to specify the namespace of a symbol, Docr can determine whether an argument is a type/namespace or symbol and handle it accordingly.
Contributing
- Fork it (https://github.com/devnote-dev/docr/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Devonte W - creator and maintainer
This repository is managed under the Mozilla Public License v2.
© 2023 devnote-dev
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.2- Tagged
- May 8, 2023
- Commit
d78db41d2b47- Crystal
1.8.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/devnote-dev/docr
Metadata
- Created
- Aug 12, 2026
- Updated
- Oct 14, 2026
- Synced
- Oct 14, 2026
- Versions
- 4