-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd270e9
commit fd59ca7
Showing
1 changed file
with
1 addition
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ Using `env` to invoke `pkgx` is typical for tools that have no POSIX location. | |
The `-S` parameter is required to pass multiple arguments. | ||
{% endhint %} | ||
|
||
|
||
## Including Additional pkgs | ||
|
||
Scripts are the glue that allows open source to be composed into powerful new | ||
|
@@ -47,22 +46,14 @@ source <(pkgx dev --shellcode) | |
|
||
{% endhint %} | ||
|
||
|
||
## Scripting for Various Languages & Their Dependencies | ||
|
||
### Python | ||
|
||
Use `uv` to import PyPi dependencies: | ||
|
||
```python | ||
#!/usr/bin/env -S pkgx [email protected] uv run --script | ||
|
||
# /// script | ||
# dependencies = [ | ||
# "requests<3", | ||
# "rich", | ||
# ] | ||
# /// | ||
#!/usr/bin/env -S pkgx [email protected] uv run --with requests<=3 --with rich | ||
|
||
import requests | ||
from rich.pretty import pprint | ||
|
@@ -107,19 +98,16 @@ Use [Scriptisto]: | |
# snip… type `pkgx scriptisto new cargo` for the rest. | ||
``` | ||
|
||
|
||
## Mash | ||
|
||
We think `pkgx` scripting is so powerful that we made a whole package | ||
manager to show it off. | ||
|
||
> [https://github.com/pkgxdev/mash](https://github.com/pkgxdev/mash) | ||
|
||
## Other Examples | ||
|
||
We make use of `pkgx` scripting all over our repositories. Check them out! | ||
|
||
|
||
[shebang]: https://en.wikipedia.org/wiki/Shebang_(Unix) | ||
[Scriptisto]: https://github.com/igor-petruk/scriptisto |