crystal_search
Crystal Search
A collection of CLI tools for searching and retrieving information about Crystal shards and documentation.
Tools
find_shard
Search shards.info for Crystal packages and return structured JSON results.
crystal_doc
Search and fetch documentation from crystaldoc.info with support for multiple output formats (JSON, text, markdown).
Installation
-
Clone the repository:
git clone https://github.com/dsisnero/crystal_search.git cd crystal_search -
Install dependencies:
shards install -
Build the tools:
shards build
The binaries will be available in the bin/ directory:
bin/find_shardbin/crystal_doc
Usage
find_shard
Search for shards and output JSON:
./bin/find_shard http
Use -p for pretty-printed JSON:
./bin/find_shard -p http
Example output:
[
{
"name": "martenframework/marten",
"description": "The pragmatic web framework.",
"stars": 464,
"forks": 0,
"open_issues": 16,
"used_by": 25,
"dependencies": 9,
"last_activity": "9 days ago",
"topics": [
"crystal",
"web-framework",
"web",
"http",
"server",
"crystal-lang",
"crystal-language",
"framework",
"backend"
],
"url": "https://github.com/martenframework/marten",
"avatar_url": "https://avatars.githubusercontent.com/u/124774736?v=4",
"archived": false
}
]
Help and version:
./bin/find_shard -h
./bin/find_shard -v
crystal_doc
Three commands are available:
search - Search for shard documentation
./bin/crystal_doc search http -f json
fetch - Fetch documentation from a specific URL
./bin/crystal_doc fetch https://www.crystaldoc.info/github/henrikac/httpcat -f text
get - Search and fetch the first result's documentation
./bin/crystal_doc get http -f markdown
Output formats: Use -f flag with json, text, or markdown (default: json).
Example search output (JSON):
[
{
"name": "feifanzhou/robust_http.cr",
"stars": 0,
"url": "https://github.com/feifanzhou/robust_http.cr",
"doc_url": "https://www.crystaldoc.info/github/feifanzhou/robust_http.cr"
}
]
Example fetch output (text):
Shard: httpcat
Version: 1.0.3
Types (1):
- top level namespace: https://www.crystaldoc.infotoplevel.html
Content:
httpcat is a fun tool to translate http status codes.
Installation
Start by cloning the repository and then build the project...
Help and version:
./bin/crystal_doc -h
./bin/crystal_doc -v
Development
Dependencies
- lexbor - HTML parsing (runtime dependency)
- ameba - Linter (development dependency)
Building
shards build
Testing
Run the test suite:
crystal spec
Linting
Run Ameba to check code style:
ameba
Project Structure
src/find_shard.cr- Main implementation offind_shardsrc/crystal_doc.cr- Main implementation ofcrystal_docspec/- Test filesbin/- Built binaries (aftershards build)
Contributing
- Fork it (https://github.com/dsisnero/crystal_search/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
- Dominic Sisneros - creator and maintainer
License
This project is licensed under the MIT License - see the LICENSE file for details.
crystal_search
- 0
- 0
- 0
- 0
- 2
- 18 days ago
- February 14, 2026
MIT License
Sat, 14 Feb 2026 07:38:15 GMT