https://github.com/adamsky/cns
Search through rust crates without leaving the terminal
https://github.com/adamsky/cns
crates crates-io search tui
Last synced: 3 months ago
JSON representation
Search through rust crates without leaving the terminal
- Host: GitHub
- URL: https://github.com/adamsky/cns
- Owner: adamsky
- License: mit
- Created: 2020-07-28T21:14:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-15T21:16:26.000Z (about 1 year ago)
- Last Synced: 2025-10-06T20:50:31.172Z (3 months ago)
- Topics: crates, crates-io, search, tui
- Language: Rust
- Homepage:
- Size: 1.28 MB
- Stars: 31
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crate name search
Search through Rust crates without leaving the terminal.
Get a quick summary, compare different crates, quickly open crate
repositories and documentation in the browser, copy `Cargo.toml` dependency
lines to clipboard, and more.

`cns` supports composite queries of categories, keywords, strings, and sorts:
```text
# get sudoku games with most recent downloads
cat=games sudoku sort=rdl
# see what's new in the web development space
key=web sort=new
# look for actively maintained socket programming libraries
socket sort=update
# see the most popular crate search apps
key=crates search sort=dl
```
## How to install `cns`
```
cargo install cns
```
or
```
git clone https://github.com/adamsky/cns
cd ./cns
cargo run --release
```
or, if you're on Arch Linux:
```sh
# Use an AUR helper, e.g.:
paru -S cns
# or compile with makepkg:
git clone https://aur.archlinux.org/cns.git
cd ./cns
makepkg -si
```
## How to use `cns`
```
__
.----.----.---.-.| |_.-----.
| __| _| _ || _| -__|
|____|__| |___._||____|_____|
.-----.---.-.--------.-----.
| | _ | | -__|
|__|__|___._|__|__|__|_____|
.-----.-----.---.-.----.----.| |--.
|__ --| -__| _ | _| __|| |
|_____|_____|___._|__| |____||__|__|
toggle this help window
# search mode
clear input
perform the search and focus the results block
| focus the results block
| quit
# results mode
| focus the search bar
, , , move up and down the results
, , , move left and right between result tabs
, scroll up and down the readme view
go to documentation (browser)
go to repository (browser)
go to crate (browser)
copy Cargo.toml dependency line to clipboard
copy clone+compile+run one-liner to clipboard
| | quit
```
## Disable registry summary
Pass `--no-summary` argument when running `cns` if you don't want to load
a registry summary on application startup.