You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: default git provider for shorthand for adding modules
you can run `nuance add freepicheep/nu-salesforce` and it will install
the module since github is the default git provider. you can change this
if you want
Copy file name to clipboardExpand all lines: README.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,9 @@ nuance init
34
34
# Add a dependency
35
35
nuance add https://github.com/user/nu-some-module
36
36
37
+
# Or use owner/repo shorthand (defaults to github)
38
+
nuance add user/nu-some-module
39
+
37
40
# Install all dependencies from mod.toml
38
41
nuance install
39
42
@@ -61,11 +64,11 @@ To make the installed modules available to `use` in Nushell without specifying t
61
64
Nuance provides two ways to do this:
62
65
63
66
### 1. Manual Overlay (Recommended)
64
-
`nuance install` automatically generates an `activate.nu` script inside the `.nu_modules` directory. This script adds `.nu_modules/` to your `$env.NU_LIB_DIRS`**and automatically imports** all installed modules into your active scope using `export use <module> *`.
67
+
`nuance install`and `nuance init`automatically generate an `activate.nu` script inside the `.nu_modules` directory. This script adds `.nu_modules/` to your `$env.NU_LIB_DIRS`**and automatically imports** all installed modules into your active scope using `export use <module> *`.
65
68
66
69
You can activate it using Nushell's `overlay` command:
67
70
68
-
```bash
71
+
```nu
69
72
overlay use .nu_modules/activate.nu
70
73
```
71
74
@@ -87,7 +90,7 @@ nuance hook
87
90
[package]
88
91
name = "my-module"
89
92
version = "0.1.0"
90
-
description = "Something useful"
93
+
description = "a wonderful nu module anyone can use"
91
94
92
95
[dependencies]
93
96
nu-utils = { git = "https://github.com/user/nu-utils", tag = "v1.0.0" }
@@ -102,13 +105,24 @@ Each dependency must specify exactly one of `tag`, `branch`, or `rev`.
102
105
| Command | Description |
103
106
|---------|-------------|
104
107
|`nuance init`| Create a new `mod.toml` in the current directory |
105
-
|`nuance add <url>`| Add a dependency (auto-detects latest tag) |
108
+
|`nuance add <source>`| Add a dependency from a URL or owner/repo shorthand (auto-detects latest tag) |
106
109
|`nuance install`| Install dependencies from `mod.toml`|
107
110
|`nuance install --frozen`| Install from lockfile only (CI-friendly) |
108
111
|`nuance update`| Re-resolve all dependencies |
109
112
|`nuance remove <name>`| Remove a dependency |
110
113
|`nuance hook`| Print the auto-activate hook for config.nu |
111
114
115
+
## Global config (`~/.config/nuance/config.toml`)
116
+
117
+
You can set a default git provider used for `owner/repo` shorthand in `nuance add`.
118
+
119
+
```toml
120
+
default_git_provider = "github"# default
121
+
```
122
+
123
+
Supported provider aliases are `github`, `gitlab`, `codeberg`, and `bitbucket`.
124
+
You can also set a custom host like `git.example.com` or a full `https://...` base URL.
0 commit comments