···1313Additionally, [Tsutsumi](https://github.com/Fuwn/tsutsumi) uses Yae to manage
1414dependencies. You can check out a working implementation there.
15151616+## Usage
1717+1818+View the [installations instructions](#installation) below to set up Yae after
1919+running `yae init`.
2020+2121+```sh
2222+# Initialises a Yae environment in the current directory by creating an empty `yae.json`
2323+# file
2424+yae init
2525+2626+# Adds a Yae dependency named `zen-browser-twilight-bin` using a floating tag
2727+# (tag always remain `twilight`, but may receive frequent hash changes)
2828+yae add \
2929+ --type binary \
3030+ --version twilight \
3131+ --unpack \
3232+ zen-browser-twilight-bin \
3333+ 'https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-specific.tar.bz2'
3434+3535+# Adds a Yae dependency named `zen-browser-bin` pinned at tag `1.0.1-a.7`
3636+yae add \
3737+ --type git \
3838+ --version 1.0.1-a.7 \
3939+ --unpack \
4040+ zen-browser-bin \
4141+ 'https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-specific.tar.bz2'
4242+4343+# Updates all dependencies, e.g., updates the hash of `zen-browser-twilight-bin`
4444+# and bumps the version of `zen-browser-bin` to `1.0.1-a.8`, handling URI and
4545+# hash recalculations
4646+yae update
4747+4848+# Only updates `zen-browser-twilight-bin`
4949+yae update zen-browser-twilight-bin
5050+```
5151+1652## Installation
17531818-Follow the installation instructions at [Tsutsumi](https://github.com/Fuwn/tsutsumi).
5454+Follow the installation instructions at [Tsutsumi](https://github.com/Fuwn/tsutsumi),
5555+which provides both flake and flake-less installation options.
5656+5757+Alternatively, without flake-less support, install the
5858+`inputs.yae.packages.${pkgs.system}.yae` package exposed by this flake.
5959+6060+### Nix
6161+6262+To add Yae support to your Nix expression after running `yae init`, just read
6363+from the Yae environment file.
6464+6565+Here's an example taken from [Tsutsumi's zen-browser-bin package](https://github.com/Fuwn/tsutsumi/blob/main/pkgs/zen-browser-bin.nix).
6666+6767+```nix
6868+# pkgs/zen-browser-bin.nix
6969+7070+{
7171+ pkgs,
7272+ self,
7373+ yae ? builtins.fromJSON (builtins.readFile "${self}/yae.json"),
7474+}:
7575+import "${self}/lib/zen-browser-bin.nix" {
7676+ # Effortless dependency updates just by running `yae update` from CI using a
7777+ # CRON job
7878+ inherit (yae.zen-browser-bin) sha256 version;
7979+} { inherit pkgs; }
8080+```
19812082## `--help`
2183