# tclip

`tclip` is a simple, lightweight command-line tool written in Rust that reads from standard input (stdin) and copies the content directly to your system clipboard.

It is particularly useful for piping the output of terminal commands straight into your clipboard without having to use your mouse.

## Installation

You can install `tclip` directly from [crates.io](https://crates.io/crates/tclip) using Cargo:

```bash
cargo install tclip
```

## Usage

Simply pipe any command's output into `tclip`:

```bash
# Copy a simple string
echo "Hello, World!" | tclip

# Copy the contents of a file
cat src/main.rs | tclip

# Copy the output of a command
ls -la | tclip
```

After execution, `tclip` will print `copied` to let you know the text is securely in your clipboard, and then exit immediately.

## Supported Platforms

`tclip` uses the [arboard](https://crates.io/crates/arboard) crate under the hood, giving it excellent cross-platform support. It works across:
- **Linux** (X11 and Wayland)
- **macOS**
- **Windows**

*(Note for Linux X11 users without a clipboard manager: Since `tclip` exits immediately after copying, if you are not using a clipboard manager, you may occasionally lose the clipboard contents. Wayland users and modern desktop environments handle this perfectly).*

## License

This project is licensed under either of the [MIT license](LICENSE-MIT) or [Apache License, Version 2.0](LICENSE-APACHE) at your option.
