clipin

Crates.ioclipin
lib.rsclipin
version0.9.2
created_at2026-01-12 15:46:45.163074+00
updated_at2026-01-13 12:42:49.669351+00
descriptionA Rust library to get text from clipboard or stdin
homepagehttps://github.com/0x6b/clipin
repositoryhttps://github.com/0x6b/clipin
max_upload_size
id2038042
size26,494
kaoru (0x6b)

documentation

https://docs.rs/clipin

README

clipin

A Rust library to get text from clipboard or stdin.

Usage

Enable exactly one feature: async or sync. Returns trimmed text and optionally the clipboard instance if available.

Async

cargo add clipin --features async
#[tokio::main]
async fn main() {
    let (text, clipboard) = clipin::get().await.unwrap();
    println!("{text}");
}

Sync

cargo add clipin --features sync
fn main() {
    let (text, clipboard) = clipin::get().unwrap();
    println!("{text}");
}

License

MIT. See LICENSE for details.

Commit count: 41

cargo fmt