File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,18 +20,21 @@ Stop distributing your apps via `curl | sh`! Instead you can bake package instal
2020
2121
2222``` bash
23- pip install abxpkg
24-
23+ pip install abxpkg # uv tool add abxpkg
2524abxpkg --version
2625```
2726
2827``` python
29- from abxpkg import Binary, npm
28+ from abxpkg import Binary, env, npm, brew
29+
30+ prettier = env.load(' prettier' ) or npm.install(' prettier' ) or brew.install(' prettier' )
31+ # or equivalent:
32+ prettier = Binary(name = ' prettier' , binproviders = [env, npm, brew]).install()
3033
31- curl = Binary( name = " curl " ).load( )
32- print (curl.abspath, curl.version, curl.exec( cmd = [ " --version " ]))
34+ print (prettier.abspath, prettier.version )
35+ # ~/.cache/abx/lib/npm/bin/prettier 2.2.1
3336
34- npm.install( " puppeteer " )
37+ prettier.exec([ ' --write ' , ' . ' ] )
3538```
3639
3740> 📦 Provides consistent interfaces for runtime dependency resolution & installation across multiple package managers & OSs
You can’t perform that action at this time.
0 commit comments