docs: add installation instructions for crates.io

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib9a3fc7ee21324707d046d52a24b50596a6a6964
This commit is contained in:
raf 2026-02-27 10:26:45 +03:00
commit ebf46de99d
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -46,7 +46,8 @@ with many features such as but not necessarily limited to:
- Image preview (shows dimensions and format) - Image preview (shows dimensions and format)
- Text previews with customizable width - Text previews with customizable width
- De-duplication, whitespace prevention and entry limit control - De-duplication, whitespace prevention and entry limit control
- Automatic clipboard monitoring with `stash watch` - Automatic clipboard monitoring with
[`stash watch`](#watch-clipboard-for-changes-and-store-automatically)
- Configurable auto-expiry of old entries in watch mode as a safety buffer - Configurable auto-expiry of old entries in watch mode as a safety buffer
- Drop-in replacement for `wl-clipboard` tools (`wl-copy` and `wl-paste`) - Drop-in replacement for `wl-clipboard` tools (`wl-copy` and `wl-paste`)
- Sensitive clipboard filtering via regex (see below) - Sensitive clipboard filtering via regex (see below)
@ -70,9 +71,9 @@ features, or conveniences provided by Stash.
### With Nix ### With Nix
Nix is the recommended way of downloading Stash. You can install it using Nix Nix is the recommended way of downloading (and developing!) Stash. You can
flakes using `nix profile add` if on non-nixos or add Stash as a flake input if install it using Nix flakes using `nix profile add` if on non-nixos or add Stash
you are on NixOS. as a flake input if you are on NixOS.
```nix ```nix
{ {
@ -103,7 +104,8 @@ If you want to give Stash a try before you switch to it, you may also run it one
time with `nix run`. time with `nix run`.
```sh ```sh
nix run github:NotAShelf/stash -- watch # start the watch daemon # Run directly from the git repository; will be garbage collected
$ nix run github:NotAShelf/stash -- watch # start the watch daemon
``` ```
### Without Nix ### Without Nix
@ -122,16 +124,23 @@ releases are made when a version gets tagged, and are available under
- Build and install from source with Cargo: - Build and install from source with Cargo:
```bash ```bash
cargo install --git https://github.com/notashelf/stash cargo install stash --locked
``` ```
Additionally, you may get Stash from source via `cargo install` using
`cargo install --git https://github.com/notashelf/stash --locked` or you may
check out to the repository, and use Cargo to build it. You'll need Rust 1.91.0
or above. Most distributions should package this version already. You may, of
course, prefer to package the built releases if you'd like.
## Usage ## Usage
> [!NOTE] > [!IMPORTANT]
> It is not a priority to provide 1:1 backwards compatibility with Cliphist. > It is not a priority to provide 1:1 backwards compatibility with Cliphist.
> While the interface is _almost_ identical, Stash chooses to build upon > While the interface is generally similar, Stash chooses to build upon
> Cliphist's design and extend existing design choices. See > Cliphist's design and extend existing design choices. See
> [Migrating from Cliphist](#migrating-from-cliphist) for more details. > [Migrating from Cliphist](#migrating-from-cliphist) for more details. Refer to
> help text if confused.
The command interface of Stash is _only slightly_ different from Cliphist. In The command interface of Stash is _only slightly_ different from Cliphist. In
most cases, you may simply replace `cliphist` with `stash` and your commands, most cases, you may simply replace `cliphist` with `stash` and your commands,
@ -287,7 +296,7 @@ entry has expired from history.
> This behavior only applies when the watch daemon is actively running. Manual > This behavior only applies when the watch daemon is actively running. Manual
> expiration or deletion of entries will not clear the clipboard. > expiration or deletion of entries will not clear the clipboard.
### MIME Type Preference for Watch #### MIME Type Preference for Watch
`stash watch` supports a `--mime-type` (short `-t`) option that lets you `stash watch` supports a `--mime-type` (short `-t`) option that lets you
prioritise which MIME type the daemon should request from the clipboard when prioritise which MIME type the daemon should request from the clipboard when