Skip to content

Commit 57a0415

Browse files
authored
Merge pull request #7 from freepicheep/name-change
Rename project to "Quiver"
2 parents 86df2c2 + f6ae2cc commit 57a0415

13 files changed

Lines changed: 192 additions & 179 deletions

File tree

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "nuance"
2+
name = "quiver"
33
version = "0.2.1"
44
edition = "2024"
55
description = "A module and script manager for Nushell"
66
license = "MIT"
7-
repository = "https://github.com/freepicheep/nuance"
8-
homepage = "https://github.com/freepicheep/nuance"
7+
repository = "https://github.com/freepicheep/quiver"
8+
homepage = "https://github.com/freepicheep/quiver"
99

1010
[dependencies]
1111
clap = { version = "4", features = ["derive"] }
@@ -22,3 +22,7 @@ walkdir = "2"
2222
[profile.dist]
2323
inherits = "release"
2424
lto = "thin"
25+
26+
[[bin]]
27+
name = "qv"
28+
path = "src/main.rs"

README.md

Lines changed: 63 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
# Nuance
2-
3-
A dependency manager for [Nushell](https://www.nushell.sh/).
4-
5-
Nuance handles dependency resolution, fetching, and lockfile management for Nushell modules and script dependencies distributed as git repositories.
1+
<!-- LOGO -->
2+
<h1>
3+
<p align="center">
4+
<img src="https://github.com/user-attachments/assets/5bd69aeb-3c42-4a5e-8281-65b18748a43c" alt="Logo" width="128">
5+
<br>Quiver
6+
</h1>
7+
<p align="center">
8+
A fast dependency manager for [Nushell](https://www.nushell.sh/).
9+
<br />
10+
</p>
11+
</p>
12+
13+
Quiver handles dependency resolution, fetching, and lockfile management for Nushell modules and script dependencies distributed as git repositories.
614

715
## Install
816

@@ -15,77 +23,77 @@ Nuance handles dependency resolution, fetching, and lockfile management for Nush
1523

1624
### Install prebuilt binaries via ...
1725

18-
- brew: `brew install freepicheep/tap/nuance`
19-
- mise: `mise use -g github:freepicheep/nuance`
20-
- shell script: `curl --proto '=https' --tlsv1.2 -LsSf https://github.com/freepicheep/nuance/releases/latest/download/nuance-installer.sh | sh`
26+
- brew: `brew install freepicheep/tap/quiver`
27+
- mise: `mise use -g github:freepicheep/quiver`
28+
- shell script: `curl --proto '=https' --tlsv1.2 -LsSf https://github.com/freepicheep/quiver/releases/latest/download/quiver-installer.sh | sh`
2129

2230
### Build from source via Cargo
2331

2432
```bash
25-
cargo install --git https://github.com/freepicheep/nuance
33+
cargo install --git https://github.com/freepicheep/quiver
2634
```
2735

2836
## Quick Start
2937

3038
```bash
3139
# Initialize a new module project
32-
nuance init
40+
qv init
3341

3442
# Add a dependency
35-
nuance add https://github.com/user/nu-some-module
43+
qv add https://github.com/user/nu-some-module
3644

3745
# Or use owner/repo shorthand (defaults to github)
38-
nuance add user/nu-some-module
46+
qv add user/nu-some-module
3947

4048
# Add a script dependency (single file from a repo or gist)
41-
nuance add-script user/nu-toolbox scripts/quickfix.nu
49+
qv add-script user/nu-toolbox scripts/quickfix.nu
4250

4351
# Or pass a full blob URL directly
44-
nuance add-script https://github.com/nushell/nu_scripts/blob/main/sourced/webscraping/twitter.nu
52+
qv add-script https://github.com/nushell/nu_scripts/blob/main/sourced/webscraping/twitter.nu
4553

46-
# Install all dependencies from mod.toml
47-
nuance install
54+
# Install all dependencies from nupackage.toml
55+
qv install
4856

4957
# Add a global script dependency (prompts for autoload placement)
50-
nuance add-script -g user/nu-toolbox scripts/quickfix.nu
58+
qv add-script -g user/nu-toolbox scripts/quickfix.nu
5159

5260
# Skip the prompt and install directly into autoload
53-
nuance add-script -g --autoload user/nu-toolbox scripts/quickfix.nu
61+
qv add-script -g --autoload user/nu-toolbox scripts/quickfix.nu
5462

55-
# Install all global dependencies from ~/.config/nuance/config.toml
56-
nuance install -g
63+
# Install all global dependencies from ~/.config/quiver/config.toml
64+
qv install -g
5765

5866
# Re-resolve everything (ignore lockfile)
59-
nuance update
67+
qv update
6068

6169
# Remove a dependency
62-
nuance remove nu-some-module
70+
qv remove nu-some-module
6371

6472
# Remove a script dependency
65-
nuance remove-script quickfix
73+
qv remove-script quickfix
6674

67-
# List installed dependencies (project-local if mod.toml exists, otherwise global)
68-
nuance list
75+
# List installed dependencies (project-local if nupackage.toml exists, otherwise global)
76+
qv list
6977
```
7078

7179
## How It Works
7280

73-
A nuance project is a directory containing:
81+
A quiver project is a directory containing:
7482

75-
- **`mod.toml`** — declares package metadata and dependencies
83+
- **`nupackage.toml`** — declares package metadata and dependencies
7684
- **`<project-dir-name>/mod.nu`** — the Nushell module entry point
77-
- **`mod.lock`** — auto-generated lockfile pinning exact commits (commit this to version control)
85+
- **`quiver.lock`** — auto-generated lockfile pinning exact commits (commit this to version control)
7886

79-
Running `nuance install` fetches module dependencies into `.nu_modules/` and script dependencies into `.nu_scripts/`.
87+
Running `qv install` fetches module dependencies into `.nu_modules/` and script dependencies into `.nu_scripts/`.
8088

8189
## Activation
8290

8391
To make installed modules/scripts available to `use` in Nushell without full paths, add the project's dependency directories to `$env.NU_LIB_DIRS`.
8492

85-
Nuance provides two ways to do this:
93+
Quiver provides two ways to do this:
8694

8795
### 1. Manual Activation (Recommended)
88-
`nuance install` and `nuance init` generate activation scripts for both dependency kinds:
96+
`qv install` and `qv init` generate activation scripts for both dependency kinds:
8997

9098
- `.nu_modules/activate.nu` (module overlay): updates `$env.NU_LIB_DIRS` and imports module dependencies with `export use <name> *`
9199
- `.nu_scripts/activate.nu` (sourceable script loader): sources script dependencies with `source <name>.nu`
@@ -106,18 +114,18 @@ When you're done, run `deactivate` (or `overlay hide activate`) to unload the mo
106114

107115
### 2. Auto-activation Hook
108116

109-
If you want nuance projects to automatically update your module path when you `cd` into their directory (and remove it when you leave), add the following to your `config.nu` or `env.nu`:
117+
If you want quiver projects to automatically update your module path when you `cd` into their directory (and remove it when you leave), add the following to your `config.nu` or `env.nu`:
110118

111119
```nu
112120
mkdir ($nu.default-config-dir | path join "vendor" "autoload")
113-
nuance hook | save -f ($nu.default-config-dir | path join "vendor" "autoload" "nuance_hook.nu")
121+
qv hook | save -f ($nu.default-config-dir | path join "vendor" "autoload" "quiver_hook.nu")
114122
```
115123

116124
You can also simply run these commands without adding them to your config or env file. You just won't receive any modifications of the hook until you run the commands again, but your shell startup time will be faster.
117125

118126
> **Note**: Due to Nushell's static scoping rules, the auto-activation hook only updates `$env.NU_LIB_DIRS`. It cannot auto-import module/script commands. For automatic loading, use the manual activation approach above.
119127
120-
## mod.toml
128+
## nupackage.toml
121129

122130
```toml
123131
[package]
@@ -142,35 +150,35 @@ Script dependencies must include `path` and exactly one of `tag`, `branch`, or `
142150

143151
| Command | Description |
144152
|---------|-------------|
145-
| `nuance init` | Create a new `mod.toml` and scaffold `<project-dir-name>/mod.nu` in the current directory |
146-
| `nuance add <source>` | Add a module dependency from a URL or owner/repo shorthand (auto-detects latest tag) |
147-
| `nuance add-script [-g] [--autoload] <source> [path]` | Add a script dependency locally (`mod.toml`) or globally (`config.toml`) |
148-
| `nuance install` | Install dependencies from `mod.toml` |
149-
| `nuance install -g` | Install global dependencies from `~/.config/nuance/config.toml` |
150-
| `nuance install --frozen` | Install from lockfile only (CI-friendly) |
151-
| `nuance update` | Re-resolve all dependencies |
152-
| `nuance remove <name>` / `nuance rm <name>` | Remove a module dependency |
153-
| `nuance remove-script [-g] <name>` | Remove a script dependency locally or globally |
154-
| `nuance list` / `nuance ls` | List installed dependencies (project) or modules/scripts (global) |
155-
| `nuance version` / `nuance -v` / `nuance -V` / `nuance --version` | Print nuance version |
156-
| `nuance hook` | Print the auto-activate hook for config.nu |
157-
158-
## Global config (`~/.config/nuance/config.toml`)
159-
160-
You can set a default git provider used for `owner/repo` shorthand in `nuance add`.
153+
| `qv init` | Create a new `nupackage.toml` and scaffold `<project-dir-name>/mod.nu` in the current directory |
154+
| `qv add <source>` | Add a module dependency from a URL or owner/repo shorthand (auto-detects latest tag) |
155+
| `qv add-script [-g] [--autoload] <source> [path]` | Add a script dependency locally (`nupackage.toml`) or globally (`config.toml`) |
156+
| `qv install` | Install dependencies from `nupackage.toml` |
157+
| `qv install -g` | Install global dependencies from `~/.config/quiver/config.toml` |
158+
| `qv install --frozen` | Install from lockfile only (CI-friendly) |
159+
| `qv update` | Re-resolve all dependencies |
160+
| `qv remove <name>` / `qv rm <name>` | Remove a module dependency |
161+
| `qv remove-script [-g] <name>` | Remove a script dependency locally or globally |
162+
| `qv list` / `qv ls` | List installed dependencies (project) or modules/scripts (global) |
163+
| `qv version` / `qv -v` / `qv -V` / `qv --version` | Print quiver version |
164+
| `qv hook` | Print the auto-activate hook for config.nu |
165+
166+
## Global config (`~/.config/quiver/config.toml`)
167+
168+
You can set a default git provider used for `owner/repo` shorthand in `qv add`.
161169
Global config manages global module dependencies and global script dependencies.
162170

163171
Global scripts install into:
164172

165-
- `~/.config/nushell/vendor/nuance/scripts/` (Linux)
166-
- `~/Library/Application Support/nushell/vendor/nuance/scripts/` (macOS)
173+
- `~/.config/nushell/vendor/quiver/scripts/` (Linux)
174+
- `~/Library/Application Support/nushell/vendor/quiver/scripts/` (macOS)
167175

168176
Global scripts marked for autoload install into:
169177

170-
- `~/.config/nushell/vendor/nuance/scripts/autoload/` (Linux)
171-
- `~/Library/Application Support/nushell/vendor/nuance/scripts/autoload/` (macOS)
178+
- `~/.config/nushell/vendor/quiver/scripts/autoload/` (Linux)
179+
- `~/Library/Application Support/nushell/vendor/quiver/scripts/autoload/` (macOS)
172180

173-
When you run `nuance add-script -g`, nuance always prompts whether to install into autoload.
181+
When you run `qv add-script -g`, quiver always prompts whether to install into autoload.
174182
Pass `--autoload` to skip the prompt and install directly to autoload.
175183

176184
```toml

src/checksum.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ mod tests {
4848

4949
#[test]
5050
fn hash_is_deterministic() {
51-
let dir = std::env::temp_dir().join("nuance_test_checksum");
51+
let dir = std::env::temp_dir().join("quiver_test_checksum");
5252
let _ = fs::remove_dir_all(&dir);
5353
fs::create_dir_all(dir.join("sub")).unwrap();
5454
fs::write(dir.join("a.txt"), "hello").unwrap();
@@ -64,7 +64,7 @@ mod tests {
6464

6565
#[test]
6666
fn hash_changes_with_content() {
67-
let dir = std::env::temp_dir().join("nuance_test_checksum2");
67+
let dir = std::env::temp_dir().join("quiver_test_checksum2");
6868
let _ = fs::remove_dir_all(&dir);
6969
fs::create_dir_all(&dir).unwrap();
7070
fs::write(dir.join("file.txt"), "version1").unwrap();
@@ -80,7 +80,7 @@ mod tests {
8080

8181
#[test]
8282
fn file_hash_changes_with_content() {
83-
let dir = std::env::temp_dir().join("nuance_test_checksum_file");
83+
let dir = std::env::temp_dir().join("quiver_test_checksum_file");
8484
let _ = fs::remove_dir_all(&dir);
8585
fs::create_dir_all(&dir).unwrap();
8686
let file = dir.join("script.nu");

0 commit comments

Comments
 (0)