base on run anything ![pkgx.dev](https://pkgx.dev/banner.png)
`pkgx` is a single, *standalone binary* that can *run anything*.
[![coverage][]][coveralls] [![teaRank][]](https://tea.xyz)
### Quickstart
```sh
brew install pkgxdev/made/pkgx
```
> * [docs.pkgx.sh/installing-w/out-brew]
> * [Migrating from v0](https://blog.pkgx.dev/pkgx-1-0-0-alpha-1/)
# Run Anything
```sh
$ deno
command not found: deno
$ pkgx deno
Deno 1.36.3
> ^D
$ deno
command not found: deno
# ^^ nothing was installed; your system remains untouched
```
## Run *Any Version* of Anything
```sh
$ pkgx node@14 --version
Node.js v14.21.3
$ pkgx python@2 --version
Python 2.7.18
```
## Run Anywhere
* <details><summary>macOS</summary><br>
* macOS >= 11
* x86-64 & Apple Silicon
</details>
* <details><summary>Linux</summary><br>
* glibc >=2.28 [repology](https://repology.org/project/glibc/versions)
* `x86_64` & `arm64`
</details>
* <details><summary>Windows</summary><br>
WSL2; x86-64. *Native windows is planned.*
</details>
* <details><summary>Docker</summary><br>
```sh
$ pkgx docker run -it pkgxdev/pkgx
(docker) $ pkgx node@16
Welcome to Node.js v16.20.1.
Type ".help" for more information.
>
```
Or in a `Dockerfile`:
```Dockerfile
FROM pkgxdev/pkgx
RUN pkgx
[email protected] task start
```
Or in any image:
```Dockerfile
FROM ubuntu
RUN curl https://pkgx.sh | sh
RUN pkgx
[email protected] -m http.server 8000
```
> [docs.pkgx.sh/docker]
</details>
* <details><summary>CI/CD</summary><br>
```yaml
- uses: pkgxdev/setup@v1
- run: pkgx shellcheck
```
Or in other CI/CD providers:
```sh
$ curl https://pkgx.sh | sh
$ pkgx shellcheck
```
> [docs.pkgx.sh/ci-cd]
</details>
* <details><summary>Scripts</summary><br>
```sh
#!/usr/bin/env -S pkgx +git
[email protected]
# python 3.12 runs the script and `git` is available during its execution
```
> [docs.pkgx.sh/scripts]
</details>
* <details><summary>Editors</summary><br>
```sh
$ cd myproj
myproj $ env +cargo
(+cargo) myproj $ code .
```
Or use [`dev`][dev]; a separate tool that uses the pkgx primitives to
automatically determine and utilize your dependencies based on your
project’s keyfiles.
```sh
$ cd myproj
myproj $ dev
env +cargo +rust
(+cargo+rust) my-rust-project $ code .
```
> [docs.pkgx.sh/editors]
</details>
# Shell Integration
`pkgx` puts the whole open source ecosystem at your fingertips and its
***optional*** shell integration makes workflows with that open source
even more seamless.
```sh
$ env
[email protected] # do `pkgx integrate --dry-run` first
added ~/.pkgx/go.dev/v1.16 to environment
(+go) $ go
Go is a tool for managing Go source code.
#…
(+go) $ env | grep go
PATH=~/.pkgx/go.dev/v1.16.15/bin:$PATH
LIBRARY_PATH=~/.pkgx/go.dev/v1.16.15/lib
(+go) $ env -go
removed ~/.pkgx/go.dev/v1.16 from environment
$ go
command not found: go
```
Tools are available for the duration of your terminal session.
If you need them for longer, eg. `pkgx install go`.
> [docs.pkgx.sh/shell-integration] \
> [docs.pkgx.sh/pkgx-install]
## `dev`
`dev` is a separate tool that leverages pkgx's core
features to auto-detect and install project dependencies, seamlessly
integrating them into your shell and editor.
```sh
my-rust-proj $ dev # do `pkgx integrate --dry-run` first
dev: found Cargo.toml; env +cargo +rust
(+cargo+rust) my-rust-proj $ cargo build
Compiling my-rust-proj v0.1.0
#…
```
The `dev` tool requires our shell integration to work.
> [docs.pkgx.sh/dev][dev]
# Getting Started
```sh
brew install pkgxdev/made/pkgx
```
> no `brew`? [docs.pkgx.sh/installing-w/out-brew]
### Integrating with your Shell
```sh
pkgx integrate --dry-run # docs.pkgx.sh/shell-integration
```
## Further Reading
[docs.pkgx.sh][docs] is a comprehensive manual and user guide for `pkgx`.
# Contributing
* To add packages see the [pantry README]
* To hack on `pkgx` itself; clone it and then `pkgx deno task` to list
entrypoints for hackers
If you have questions or feedback:
* [github.com/orgs/pkgxdev/discussions][discussions]
* [x.com/pkgxdev](https://x.com/pkgxdev) (DMs are open)
[docs]: https://docs.pkgx.sh
[pantry README]: ../../../pantry#contributing
[discussions]: ../../discussions
[docs.pkgx.sh/pkgx-install]: https://docs.pkgx.sh/pkgx-install
[docs.pkgx.sh/ci-cd]: https://docs.pkgx.sh/ci-cd
[docs.pkgx.sh/scripts]: https://docs.pkgx.sh/scripts
[docs.pkgx.sh/editors]: https://docs.pkgx.sh/editors
[docs.pkgx.sh/docker]: https://docs.pkgx.sh/docker
[docs.pkgx.sh/installing-w/out-brew]: https://docs.pkgx.sh/installing-w/out-brew
[docs.pkgx.sh/shell-integration]: https://docs.pkgx.sh/shell-integration
[dev]: https://docs.pkgx.sh/dev
[coverage]: https://coveralls.io/repos/github/pkgxdev/pkgx/badge.svg?branch=main
[coveralls]: https://coveralls.io/github/pkgxdev/pkgx?branch=main
[teaRank]: https://img.shields.io/endpoint?url=https%3A%2F%2Fchai.tea.xyz%2Fv1%2FgetTeaRankBadge%3FprojectId%3D79e9363b-862c-43e0-841d-4d4eaad1fc95
", Assign "at most 3 tags" to the expected json: {"id":"3190","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"