Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions docs/scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 +python@3.11 uv run --script

# /// script
# dependencies = [
# "requests<3",
# "rich",
# ]
# ///
#!/usr/bin/env -S pkgx +python@3.11 uv run --with requests<=3 --with rich

import requests
from rich.pretty import pprint
Expand Down Expand Up @@ -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