17 releases

new 0.1.16 Jul 23, 2024
0.1.15 Jul 15, 2024
0.1.12 Jun 24, 2024
0.1.10 Apr 26, 2024
0.1.7 Feb 12, 2024

#71 in Command-line interface

Download history 183/week @ 2024-03-31 24/week @ 2024-04-07 5/week @ 2024-04-14 259/week @ 2024-04-21 45/week @ 2024-04-28 3/week @ 2024-05-05 6/week @ 2024-05-19 3/week @ 2024-06-02 183/week @ 2024-06-09 41/week @ 2024-06-16 168/week @ 2024-06-23 224/week @ 2024-06-30 167/week @ 2024-07-07 143/week @ 2024-07-14

705 downloads per month

MIT license

130KB
3K SLoC

crates-tui

crates-tui is a simple terminal user interface explorer for crates.io based on Ratatui.

https://github.com/ratatui-org/crates-tui/assets/1813121/ecbb6fcb-8dd9-4997-aaa2-2a60b0c4a004

It supports features like:

  • copy cargo add command to clipboard
  • open the docs page in the browser
  • open crates.io page in the brower
image image image image

Install

cargo install crates-tui

Arch Linux

crates-tui can be installed with an AUR helper:

paru -S crates-tui

Screenshots

Open in browser

https://github.com/ratatui-org/crates-tui/assets/1813121/362d7dc3-d9ef-43df-8d2e-cc56001ef31c

Logging

https://github.com/ratatui-org/crates-tui/assets/1813121/9609a0f1-4da7-426d-8ce8-2c5a77c54754

Base16 Theme

Dracula

image

Rose Pine

image

GitHub

image

You can find example color configurations here.

Help

https://github.com/ratatui-org/crates-tui/assets/1813121/4c2a3deb-f546-41e6-a48d-998831182ab6

Key to Action configurations per mode

You can find the default configuration here.

Background

This repository contains an opinionated way of organizing a small to medium sized Ratatui TUI applications.

It has several features, notably:

  • Uses async to fetch crate information without blocking the UI
  • Multiple custom widgets
    • Selection tab
    • Input prompt
    • Search results table
    • Summary view
  • Has configurable key chords that map to actions

This repository is meant to serve as a reference for some patterns you may follow when developing Ratatui applications. The code will function as a reference for the tutorial material on https://ratatui.rs as well.

Dependencies

~31–48MB
~801K SLoC