| Crates.io | terminal_relaunch |
| lib.rs | terminal_relaunch |
| version | 0.2.3 |
| created_at | 2026-01-07 22:58:55.511713+00 |
| updated_at | 2026-01-12 05:53:18.534512+00 |
| description | A simple small library for relaunching the program in an alternative installed terminal with better feature support |
| homepage | |
| repository | https://github.com/zephhhhhh/terminal_relaunch |
| max_upload_size | |
| id | 2029201 |
| size | 61,543 |
A simple Rust library for detecting terminal capabilities and relaunching programs in better terminals with enhanced feature support, such as RGB ANSI colour and full Unicode rendering support for emojis, etc.
Add this to your Cargo.toml:
[dependencies]
terminal_relaunch = "0.2.2"
use terminal_relaunch::{relaunch_if_available_and_exit, CURRENT_TERMINAL};
fn main() {
// Check if we should attempt to relaunch
match relaunch_if_available_and_exit() {
Ok(()) => println!("Terminal features met!"),
Err(e) => eprintln!("Terminal could not relaunch: {e:?}"),
}
// Continue with your application..
println!("Terminal information: {}", CURRENT_TERMINAL.verbose_format())
}
use terminal_relaunch::CURRENT_TERMINAL;
println!("Terminal: {}", CURRENT_TERMINAL.verbose_format());
use terminal_relaunch::{SUPPORTS_FULL_UNICODE, SUPPORTS_RGB_ANSI_COLOURS};
if *SUPPORTS_FULL_UNICODE {
println!("✨ Unicode emojis work!");
}
if *SUPPORTS_RGB_ANSI_COLOURS {
println!("\x1b[38;2;255;0;0mRGB colors work!\x1b[0m");
}
Windows TerminalCMD/PowerShellTerminal.appITerm2KittyGhosttyAlacrittyWezTermVSCodeNVIMWindows TerminalITerm2 (MacOS)Ghostty (MacOS)Kitty (MacOS)AlacrittyWezTerm (MacOS)This project is licensed under the MIT License - see the LICENSE file for details.