A tiny library and application for animating text in the terminal.

Overview

🐌 snailshell

MIT LICENSE VERSION DOCS DOWNLOADS

A tiny library and application for animating text in the terminal.

🪄 It's so easy to add some flair to your text RPGs or console programs. 🪄

demo

☝️ From Fun Stuff example. (obviously looks smoother in an actual terminal)

Compatibility

Compatible with EVERYTHING! 🥳

Snailshell works with any type which implements Display, so literally everything that you would normally use with print!(), println!(), or format!() just works! This includes colored text from other libraries such as Crossterm.

👩‍🏫 Examples


Basic

use snailshell::*;

// It's dead simple.
snailprint("hello, friend :)");

Custom Fixed Duration

snailprint_d("This whole message will print in half a second regardless of the size.", 0.5);

Refresh Rate

// This is optional. Default fps is 60.
// All subsequent snailprint functions will use this fps.
set_snail_fps(30);

🐌 🖥️ Snailshell Standalone:

You can also use snailshell from the command line.

cli demo

Useful for making shell scripts and videos!

Installation:

cargo install snailshell

Usage:


snailshell [OPTIONS] <TEXT>

ARGS:
<TEXT>    Text you want to animate

OPTIONS:
-d, --duration <DURATION>    How long the text should animate for
-f, --fps <FPS>              Refresh rate of animation
-h, --help                   Print help information
-s, --speed <SPEED>          Constant speed of chars per second to render. Conflicts with duration

Example

Simple:

snailshell "text you want to animate"

Animates the contents of textfile over 2 seconds:

cat textfile | snailshell -d 2.0

If you just run 'snailshell' without any any arguments, it will expect text to be piped into it and won't respond to newlines. Just press Ctrl-C.

📖 License


This crate is licensed under the MIT license.

You might also like...
Terminal text styling via ANSI escape sequences.
Terminal text styling via ANSI escape sequences.

Iridescent Features iridescent is a library for styling terminal text easily. It supports basic ANSI sequences, Xterm-256 colors, and RGB. You can ope

A little program written in Rust that prints random PNG images to the terminal in text grabbed from an image repo.

Cermic A little program written in Rust that prints random PNG images to the terminal in text grabbed from an image repo. NOTE: As of right now, Cermi

A command-line utility which aligns a block of text within the terminal (or a specified number of columns), written in Rust.
A command-line utility which aligns a block of text within the terminal (or a specified number of columns), written in Rust.

align: a command line utility for aligning text. ⭐ Overview Aligns text within the terminal (or a specified number of columns). The text is treated as

Tiny Rust library to draw pretty line graphs using ascii characters.

rasciigraph Tiny Rust library to draw pretty line graphs using ascii characters. Usage Add this to your Cargo.toml [dependencies] rasciigraph = "0.1.1

A small command-line application to view images from the terminal written in Rust.
A small command-line application to view images from the terminal written in Rust.

A small command-line application to view images from the terminal written in Rust. It is basically the front-end of viuer

The application that can be used for personal usage to manage jira from terminal.

Jira Terminal This application can be used for personal usage to manage jira from terminal. Installation This application can be used in multiple plat

ask.sh: AI terminal assistant that can read and write your terminal directly!
ask.sh: AI terminal assistant that can read and write your terminal directly!

ask.sh: AI terminal assistant that read from & write to your terminal ask.sh is an AI terminal assistant based on OpenAI APIs such as GPT-3.5/4! What'

A simple and efficient terminal UI implementation with ratatui.rs for getting quick insights from csv files right on the terminal
A simple and efficient terminal UI implementation with ratatui.rs for getting quick insights from csv files right on the terminal

CSV-GREP csv-grep is an intuitive TUI application writting with ratatui.rs for reading, viewing and quickly analysing csv files right on the terminal.

A tiny crate to make it easy to share and apply Git hooks for Rust projects
A tiny crate to make it easy to share and apply Git hooks for Rust projects

Shareable git hooks for Rust project. Sloughi is a friend of Husky from North Africa! :algeria:

Owner
null
A library that creates a terminal-like window with feature-packed drawing of text and easy input handling. MIRROR.

BearLibTerminal provides a pseudoterminal window with a grid of character cells and a simple yet powerful API for flexible textual output and uncompli

Tommy Ettinger 43 Oct 31, 2022
Tiny CLI tool that helps to visualize iCal file content in the terminal.

Calio Calio is a tiny CLI tool that helps to visualize iCal file in the terminal. Installation You can either install it via cargo or download the bin

Oscar Cortez 5 Jun 12, 2023
A very tiny terminal snake game, purely implemented in Rust.

tiny-snake.rs A very tiny terminal snake game, purely implemented in Rust. Features Optimized binary has only 2760 bytes. No dependencies. Not even li

Rodrigo Batista de Moraes 59 Aug 16, 2023
An implementation of Piet's text interface using cosmic-text

piet-cosmic-text Implements piet's Text interface using the cosmic-text crate. License piet-cosmic-text is free software: you can redistribute it and/

John Nunley 7 Mar 12, 2023
A robust, customizable, blazingly-fast, efficient and easy-to-use command line application to uwu'ify your text!

uwuifyy A robust, customizable, blazingly-fast, efficient and easy-to-use command line application to uwu'ify your text! Logo Credits: Jade Nelson Tab

Hamothy 43 Dec 12, 2022
create and test the style and formatting of text in your terminal applications

description: create and test the style and formatting of text in your terminal applications docs: https://docs.rs/termstyle termstyle is a library tha

Rett Berg 18 Jul 3, 2021
Simple macros to write colored and formatted text to a terminal. Based on `termcolor`, thus also cross-platform.

Bunt: simple macro-based terminal colors and styles bunt offers macros to easily print colored and formatted text to a terminal. It is just a convenie

Lukas Kalbertodt 202 Dec 22, 2022
A rust crate for rendering large text to the terminal using font8x8 and ratatui.

tui-big-text tui-big-text is a rust crate that renders large pixel text as a ratatui widget using the glyphs from the font8x8 crate. Installation carg

Josh McKinney 7 Sep 7, 2023
A beautiful, tiny traceback and logging library supporting #![no_std] rust.

breadcrumbs Breadcrumbs is a beautiful, tiny traceback and logging library for Rust that offers seamless integration with #![no_std], multi-threading

Michael 18 Nov 21, 2023
Amp: A text editor for your terminal.

Amp: A text editor for your terminal. Heavily inspired by Vi/Vim. Amp aims to take the core interaction model of Vim, simplify it, and bundle in the e

Jordan MacDonald 3.3k Jan 3, 2023