Metadata-Version: 2.1
Name: altb
Version: 0.3.1
Summary: Cli tool for tracking over binaries and easily swapping between them
Home-page: https://github.com/IamShobe/altb
License: MIT
Author: Elran Shefer
Author-email: elran777@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Utilities
Requires-Dist: PyYAML (>=6.0,<7.0)
Requires-Dist: blessed (>=1.19.0,<2.0.0)
Requires-Dist: getch (>=1.0,<2.0)
Requires-Dist: natsort (>=8.0.1,<9.0.0)
Requires-Dist: pydantic (>=1.8.2,<2.0.0)
Requires-Dist: rich (>=10.15.2,<11.0.0)
Requires-Dist: typer (>=0.4.0,<0.5.0)
Description-Content-Type: text/markdown

# altb
altb is a cli utility influenced by `update-alternatives` of ubuntu.  
Linked paths are added to `$HOME/.local/bin` according to [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).  
Config file is located at `$HOME/.config/altb/config.yaml`.

### How to start?
execute:
```bash
pipx install altb
```

to track new binary use:
```bash
altb track path <app_name>@<app_tag> /path/to/binary
```
for example:
```bash
altb track path python@2.7 /bin/python2.7
altb track path python@3.8 /bin/python3.8
# altb track python ~/Downloads/python # will also work and generate a new hash for it
```

List all tracked versions:
```bash
$ altb list -a
python
|----   2.7 - /bin/python2.7
|----   3.8 - /bin/python3.8
```

Use specific version:
```bash
altb use <app_name>[@<app_tag>]
```

example:
```bash
altb use python@2.7
```
this will link the tracked path to `~/.local/bin/<app_name>` in this case - `~/.local/bin/python`

Copy specific standalone binary automatically to `~/.local/altb/versions/<app_name>/<app_name>_<tag>`
```bash
altb track path helm@3 ~/Downloads/helm --copy
```

You can run custom commands using:
```bash
altb track command special_command@latest "echo This is a command"
```
this especially useful for latest developments, example:
```bash
altb track command special_command@latest "go run ./cmd/special_command" --working-directory "$HOME/special_command"
```

