Skip to content
DeaadmanPublic

About

A full-screen interactive shell for Rust CLI apps, inspired by Claude Code's terminal interface

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Abalone

crates.io docs.rs CI Windows, macOS, Linux License

Abalone gives your Rust command-line app a full-screen shell. Output fills the screen and an input box stays at the bottom. Typing / opens a menu of your commands, a status bar shows what's running, and /help and /settings open in place of the input box.

Every part has a sensible default, and you can change any of it: the colours, logo, spinner, help, settings, and panels of your own.

It was inspired by Claude Code's terminal interface, to make apps that feel like it easy to build. It isn't made by or affiliated with Anthropic.

The custom example: a pixel-art logo, a sent command, and a running one on the status bar

Add it

cargo add abalone

Your first app

Say what your commands are, and what to do when someone sends a line:

use abalone::{App, CommandInfo, Ctx, NoPanel, Shell, outln};

struct Hello;

impl App for Hello {
    type Msg = ();
    type Panel = NoPanel;

    fn commands(&self) -> Vec<CommandInfo> {
        vec![CommandInfo::new("greet", "Say hello")]
    }

    fn run(&mut self, line: &str, ctx: &mut Ctx<Self>) {
        ctx.start("Greeting", || outln!("Hello!"));
    }
}

fn main() -> anyhow::Result<()> {
    Shell::new(Hello).title("Hello").run()
}

That's it. You get the menu, /help, /clear, /exit, input history, and a spinner while /greet runs. Try the examples:

cargo run --example minimal
cargo run --example custom

What's in it

Part What you get
The shell A header and logo, the input box, the command menu, a status bar and a footer
Panels /help, /settings and /release-notes, and panels of your own
Two ways to draw Full screen, or in the terminal's own scrollback (/tui)
Logs A log file per run for bug reports, and a clear message after a crash
Files Where your app keeps its data, and its settings in a TOML file
Installing and updating Install scripts for Windows, macOS and Linux, and updates from GitHub releases

Learn more

License

MIT.

About

A full-screen interactive shell for Rust CLI apps, inspired by Claude Code's terminal interface

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages