Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamshobe/altb
alternative cli util for update-alternatives
https://github.com/iamshobe/altb
cli python shell update-alternatives utility
Last synced: 19 days ago
JSON representation
alternative cli util for update-alternatives
- Host: GitHub
- URL: https://github.com/iamshobe/altb
- Owner: IamShobe
- Created: 2021-12-12T01:24:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T14:46:09.000Z (2 months ago)
- Last Synced: 2024-10-07T19:59:59.875Z (29 days ago)
- Topics: cli, python, shell, update-alternatives, utility
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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?
**Must use Python > 3.9**
execute:
```bash
pipx install altb
```to track new binary use:
```bash
altb track path @ /path/to/binary
```
for example:
```bash
altb track path [email protected] /bin/python2.7
altb track path [email protected] /bin/python3.8
# altb track path 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 [@]
```example:
```bash
altb use [email protected]
```
this will link the tracked path to `~/.local/bin/` in this case - `~/.local/bin/python`Copy specific standalone binary automatically to `~/.local/share/altb/versions//_`
```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"
```## Docs
### Migrations
- [Migrate to v0.5.0 and above from lower versions](./docs/migrations/migrate_to_0_5_0.md)