1
1
![ pkgx.dev] ( https://pkgx.dev/banner.png )
2
2
3
- ` pkgx ` is a 4 MiB, standalone binary that can * run anything * .
3
+ ` pkgx ` is a 4 MiB, standalone binary that can _ run anything _ .
4
4
5
5
[ ![ coverage] [ ]] [ coveralls ] [ ![ teaRank] [ ]] ( https://tea.xyz )
6
6
7
7
  ;
8
8
9
-
10
9
### Quickstart
11
10
12
11
``` sh
@@ -17,7 +16,6 @@ brew install pkgx || curl https://pkgx.sh | sh
17
16
18
17
  ;
19
18
20
-
21
19
# Run Anything
22
20
23
21
``` sh
@@ -33,8 +31,7 @@ command not found: deno
33
31
# ^^ nothing was installed; your wider system is untouched
34
32
```
35
33
36
-
37
- ## Run * Any Version* of Anything
34
+ ## Run _ Any Version_ of Anything
38
35
39
36
``` sh
40
37
$ pkgx node@14 --version
@@ -44,19 +41,18 @@ $ pkgx python@2 --version
44
41
Python 2.7.18
45
42
```
46
43
47
-
48
44
## Run Anywhere
49
45
50
46
<details ><summary >macOS</summary ><br >
51
47
52
- * macOS >= 11
53
- * 64 bit Intel & Apple Silicon
48
+ - macOS >= 11
49
+ - 64 bit Intel & Apple Silicon
54
50
55
51
</details >
56
52
<details ><summary >Linux</summary ><br >
57
53
58
- * glibc >=2.28 [ repology] ( https://repology.org/project/glibc/versions )
59
- * ` x86_64 ` & ` arm64 `
54
+ - glibc >=2.28 [ repology] ( https://repology.org/project/glibc/versions )
55
+ - ` x86_64 ` & ` arm64 `
60
56
61
57
> [ !TIP]
62
58
> We have gone to good lengths to make ` pkgx ` (and the packages it installs)
@@ -65,7 +61,7 @@ Python 2.7.18
65
61
</details >
66
62
<details ><summary >Windows</summary ><br >
67
63
68
- WSL2; x86-64. * Native windows is planned.*
64
+ WSL2; x86-64. _ Native windows is planned._
69
65
70
66
</details >
71
67
<details ><summary >Docker</summary ><br >
@@ -132,9 +128,8 @@ pkgx shellcheck
132
128
</details >
133
129
<details ><summary >Editors</summary ><br >
134
130
135
- Use [ ` dev ` ] [ dev ] ; a separate tool that uses the pkgx primitives to
136
- automatically determine and utilize your dependencies based on your
137
- project’s keyfiles.
131
+ Use [ ` dev ` ] [ dev ] ; a separate tool that uses the pkgx primitives to automatically
132
+ determine and utilize your dependencies based on your project’s keyfiles.
138
133
139
134
``` sh
140
135
$ cd myproj
@@ -149,16 +144,15 @@ myproj $ code .
149
144
150
145
  ;
151
146
152
-
153
147
# The ` pkgx ` Ecosystem
154
148
155
149
` pkgx ` is not just a package runner, it’s a composable primitive that can be
156
150
used to build a whole ecosystem of tools.
157
151
158
152
## ` dev `
159
153
160
- ` dev ` uses ` pkgx ` and shellcode to create “virtual environments” consisting
161
- of the specific versions of tools and their dependencies you need for your
154
+ ` dev ` uses ` pkgx ` and shellcode to create “virtual environments” consisting of
155
+ the specific versions of tools and their dependencies you need for your
162
156
projects.
163
157
164
158
``` sh
@@ -178,14 +172,12 @@ Compiling my-rust-proj v0.1.0
178
172
179
173
> [ github.com/pkgxdev/dev] [ dev ]
180
174
181
-
182
175
## ` pkgm `
183
176
184
177
` pkgm ` installs ` pkgx ` packages to ` /usr/local ` . It installs alongside ` pkgx ` .
185
178
186
179
> [ github.com/pkgxdev/pkgm] [ pkgm ]
187
180
188
-
189
181
## Scripting
190
182
191
183
A powerful use of ` pkgx ` is scripting, eg. here’s a script to release new
@@ -209,15 +201,15 @@ gh release create \
209
201
--notes-start-tag=v$v_latest
210
202
```
211
203
212
- Above you can see how we “loaded” the shebang with ` +pkg ` syntax to bring in
213
- all the tools we needed.
204
+ Above you can see how we “loaded” the shebang with ` +pkg ` syntax to bring in all
205
+ the tools we needed.
214
206
215
207
> We have pretty advanced versions of the above script, eg
216
208
> [ teaBASE] [ teaBASE-release-script ]
217
209
218
210
There’s tools for just about every language ecosystem so you can import
219
- dependencies. For example, here we use ` uv ` to run a python script with
220
- pypi dependencies, and pkgx to load both ` uv ` and a specific python version:
211
+ dependencies. For example, here we use ` uv ` to run a python script with pypi
212
+ dependencies, and pkgx to load both ` uv ` and a specific python version:
221
213
222
214
``` sh
223
215
#! /usr/bin/env -S pkgx +python@3.11 uv run
@@ -241,8 +233,8 @@ pprint([(k, v["title"]) for k, v in data.items()][:10])
241
233
>
242
234
> # ## Mash
243
235
>
244
- > We love scripting with ` pkgx` so much that we made a whole package manager
245
- > for scripts to show the world what is possible when the whole open source
236
+ > We love scripting with ` pkgx` so much that we made a whole package manager for
237
+ > scripts to show the world what is possible when the whole open source
246
238
> ecosystem is available to your scripts Check it out [` mash` ].
247
239
248
240
> [! NOTE]
@@ -285,15 +277,13 @@ though it was installed all along.
285
277
286
278
& nbsp;
287
279
288
-
289
280
# Further Reading
290
281
291
282
[docs.pkgx.sh][docs] is a comprehensive manual and user guide for the ` pkgx`
292
283
suite.
293
284
294
285
& nbsp;
295
286
296
-
297
287
# Migrating from `pkgx`^1
298
288
299
289
# # Shellcode
@@ -321,8 +311,8 @@ exported.
321
311
322
312
# # `pkgx install`
323
313
324
- We now provide [` pkgm` ][pkgm] but if you miss the leanness of “stubs” we
325
- provide a [` mash` ] script to create stubs in ` /usr/local/bin` :
314
+ We now provide [` pkgm` ][pkgm] but if you miss the leanness of “stubs” we provide
315
+ a [` mash` ] script to create stubs in ` /usr/local/bin` :
326
316
327
317
` ` ` sh
328
318
$ pkgx mash pkgx/stub git
@@ -335,14 +325,13 @@ exec pkgx git "$@"
335
325
336
326
& nbsp;
337
327
338
-
339
328
# Contributing
340
329
341
330
We recommend using [` dev` ] to make rust available.
342
331
343
- * To add packages see the [pantry README]
344
- * To hack on ` pkgx` itself; clone it and ` cargo build`
345
- * [` hydrate.rs` ] is where optimization efforts will bear most fruit
332
+ - To add packages see the [pantry README]
333
+ - To hack on ` pkgx` itself; clone it and ` cargo build`
334
+ - [` hydrate.rs` ] is where optimization efforts will bear most fruit
346
335
347
336
# # Pre-PR Linting
348
337
@@ -354,13 +343,12 @@ pkgx npx markdownlint --config .github/markdownlint.yml --fix .
354
343
355
344
& nbsp;
356
345
357
-
358
346
# Chat / Support / Questions
359
347
360
348
We love a good chinwag.
361
349
362
- * [Discord](https://discord.gg/rNwNUY83XS)
363
- * [github.com/orgs/pkgxdev/discussions][discussions]
350
+ - [Discord](https://discord.gg/rNwNUY83XS)
351
+ - [github.com/orgs/pkgxdev/discussions][discussions]
364
352
365
353
[docs]: https://docs.pkgx.sh
366
354
[pantry README]: ../../../pantry#contributing
@@ -375,7 +363,6 @@ We love a good chinwag.
375
363
[` dev` ]: https://github.com/pkgxdev/dev
376
364
[` pkgo` ]: https://github.com/pkgxdev/pkgo
377
365
[“Stable Diffusion WebUI”]: https://github.com/AUTOMATIC1111/stable-diffusion-webui
378
-
379
366
[coverage]: https://coveralls.io/repos/github/pkgxdev/pkgx/badge.svg? branch=main
380
367
[coveralls]: https://coveralls.io/github/pkgxdev/pkgx? branch=main
381
368
[teaRank]: https://img.shields.io/endpoint? url=https%3A%2F%2Fchai.tea.xyz%2Fv1%2FgetTeaRankBadge%3FprojectId%3D79e9363b-862c-43e0-841d-4d4eaad1fc95
0 commit comments