Skip to content

Commit 463ffd3

Browse files
authored
docs: add multiple binaries example and consolidate config docs (#64)
1 parent 0d214f5 commit 463ffd3

File tree

2 files changed

+28
-30
lines changed

2 files changed

+28
-30
lines changed

README.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ stew install Stewfile
103103

104104
# Install headlessly from a Stewfile.lock.json
105105
stew install Stewfile.lock.json
106+
107+
# Install mutliple binaries per repo/asset
108+
stew install astral-sh/uv # Install uv the first time
109+
stew install astral-sh/uv # Install uvx the second time
106110
```
107111

108112
### Search
@@ -152,19 +156,33 @@ stew list --tags > Stewfile # Pin tags
152156
stew config # Automatically updates the stew.config.json
153157
```
154158

159+
# Configuration
160+
161+
`stew` can be configured with a `stew.config.json` file. The location of this file will also depend on your OS:
162+
|Linux/macOS | Windows |
163+
| ------------ | ---------- |
164+
| `$XDG_CONFIG_HOME/stew` or `~/.config/stew` | `~/AppData/Local/stew/Config` |
165+
166+
You can configure 2 aspects of `stew`:
167+
1. The `stewPath`: this is where `stew` data is stored.
168+
2. The `stewBinPath`: this is where `stew` installs binaries
169+
170+
The default locations for these are:
171+
| | Linux/macOS | Windows |
172+
| ------------ | ------------ | ---------- |
173+
| `stewPath` | `$XDG_DATA_HOME/stew` or `~/.local/share/stew` | `~/AppData/Local/stew` |
174+
| `stewBinPath` | `~/.local/bin` | `~/AppData/Local/stew/bin` |
175+
176+
There are multiple ways to configure these:
177+
* When you first run `stew`, it will look for a `stew.config.json` file. If it cannot find one, then you will be prompted to set the configuration values.
178+
* After `stew` is installed, you can use the `stew config` command to set the configuration values.
179+
* At any time, you can manually create or edit the `stew.config.json` file. It should have values for `stewPath` and `stewBinPath`.
180+
181+
Make sure that the installation path is in your `PATH` environment variable. Otherwise, you won't be able to use any of the binaries installed by `stew`.
182+
155183
# FAQ
156184
### Why couldn't `stew` automatically find any binaries for X repo?
157185
The repo probably uses an unconventional naming scheme for their binaries. You can always manually select the release asset.
158186

159187
### Will `stew` work with private GitHub repositories?
160188
Yes, `stew` will automatically detect if you have a `GITHUB_TOKEN` environment variable and allow you to access binaries from your private repositories.
161-
162-
### Where does `stew` install binaries?
163-
The default installation path will depend on your OS:
164-
| Linux/macOS | Windows |
165-
| ------------ | ---------- |
166-
| `~/.local/bin` | `~/AppData/Local/stew/bin` |
167-
168-
However, this location can be [configured](https://github.com/marwanhawari/stew/blob/main/config.md).
169-
170-
Make sure that the installation path is in your `PATH` environment variable. Otherwise, you won't be able to use any of the binaries installed by `stew`.

config.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)