| Crates.io | rust-expect |
| lib.rs | rust-expect |
| version | 0.1.0 |
| created_at | 2026-01-05 22:01:52.937683+00 |
| updated_at | 2026-01-05 22:01:52.937683+00 |
| description | Next-generation Expect-style terminal automation library for Rust |
| homepage | |
| repository | https://github.com/praxiomlabs/rust-expect |
| max_upload_size | |
| id | 2024657 |
| size | 1,327,713 |
A modern, async-first terminal automation library for Rust, inspired by the classic Expect tool.
use rust_expect::prelude::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut session = Session::spawn("bash")?;
session.expect("$ ").await?;
session.send("echo 'Hello!'\n").await?;
session.expect("Hello!").await?;
session.send("exit\n").await?;
Ok(())
}
ssh - SSH session supportmock - Mock sessions for testingscreen - Virtual terminal emulationpii-redaction - Automatic PII maskingtest-utils - Testing utilitiesmetrics - Performance metricsfull - All featuresLicensed under MIT or Apache-2.0.