Skip to content

Commit 5031a3b

Browse files
committed
document the mash scripts that help with pkgx
1 parent 0dffb1e commit 5031a3b

File tree

1 file changed

+60
-2
lines changed

1 file changed

+60
-2
lines changed

docs/pkgx.md

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,68 @@ gum version 0.14.5
119119
For this mode we can also output JSON: `pkgx +gum --json`.
120120

121121

122-
## Silent Mode
122+
## Quietening Output
123123

124124
```sh
125-
pkgx --silent gum format 'no progress information is output'
125+
$ pkgx --quiet gum format 'download progress is still shown'
126+
# ^^ supresses resolving/syncing etc. messages but not download progress info
127+
128+
```sh
129+
pkgx --silent gum format 'no output at all'
130+
# ^^ silences everything, even errors
131+
```
132+
133+
Note that this only effects `pkgx` *not the tools you run with `pkgx`*.
134+
135+
## Other Common Needs
136+
137+
`pkgx` is not a package manager so the command itself doesn’t typically offer
138+
such operations you may expect, however the way `pkgx` works is simple and
139+
standardized so we offer some `mash` scripts to help.
140+
141+
Longer term we will make a tool `pkgq` to help with these operations.
142+
143+
### Updating Downloaded Packages
144+
145+
```sh
146+
$ pkgx mash pkgx/cache upgrade
147+
updating: /Users/mxcl/.pkgx/python.org/v3.11.11
148+
# snip…
149+
```
150+
151+
### Pruning Older Versions of Packages
152+
153+
The `pkgx` download cache can get large over time. To prune older versions:
154+
155+
```sh
156+
$ pkgx mash pkgx/cache prune
157+
pruning: ~/.pkgx/deno.land/v1.39.4
158+
pruning: ~/.pkgx/deno.land/v1.46.3
159+
# snip…
160+
```
161+
162+
This may delete versions that you use—if so—this is fine. `pkgx` will just
163+
reinstall them next time you need them.
164+
165+
### Listing Available Versions for a Package
166+
167+
```sh
168+
$ pkgx mash pkgx/pantry-inventory git
169+
2.38.1
170+
2.39.0
171+
# snip…
172+
```
173+
174+
### Listing What is Downloaded
175+
176+
```sh
177+
$ mash pkgx/cache ls
178+
179+
Parent Directory │Version
180+
────────────────────────────────┼──────────
181+
perl.org │5.40.0
182+
x.org/xcb │1.17.0
183+
# snip…
126184
```
127185

128186
[SemVer]: https://devhints.io/semver

0 commit comments

Comments
 (0)