Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Lilja/cli-info
check for presence of your favorite CLI tools
https://github.com/Lilja/cli-info
Last synced: about 2 months ago
JSON representation
check for presence of your favorite CLI tools
- Host: GitHub
- URL: https://github.com/Lilja/cli-info
- Owner: Lilja
- Created: 2022-11-19T12:00:38.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2022-11-19T17:07:14.000Z (over 1 year ago)
- Last Synced: 2024-01-27T17:01:24.135Z (5 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 20
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- cli-apps - cli-tools-info - An overview of your CLI tools, if they are installed and what version they are on. (<a name="package-manager"></a>Package managers)
- awesome-cli-apps - cli-tools-info - An overview of your CLI tools, if they are installed and what version they are on. (<a name="package-manager"></a>Package managers)
README
# cli-tools-info
[![asciicast](https://asciinema.org/a/WUtnWUkMnrm5NyQ0Gi0c1CaHu.svg)](https://asciinema.org/a/WUtnWUkMnrm5NyQ0Gi0c1CaHu)
An overview of you cli tools, if they are installed and what version they are on.
## Usage
* `pip install cli-tools-info`* Create a python file that has the following contents
```python
#!/usr/bin/env python
from cli_tools_info import (
Tool,
LONG,
VERSION_WITH_THREE_NUMBERS_AND_DOTS,
run,
)tools = [
Tool(name="nvim", args=LONG, grep_string=VERSION_WITH_THREE_NUMBERS_AND_DOTS),
]
run(tools)
```* Run your file, likely: `./file`. You should get an output of the tool you are using depending on if it's installed or not.
## Requirements
* python>=3.8(runs asycncio)### `run`-options
* `tools: List[Tool]`
* `headers: bool`, whether to use headers in the table formatted list
* `table_fmt: Optional[str] = "simple"`, what table formatting to send to `tabulate`. See `tablefmt` in `tabulate`. Default `simple`.### Creator's `cli-info` file
[link](https://github.com/Lilja/dotfiles/blob/master/bin/cli-info)## Showcase of usage/workflow in vim
[![asciicast](https://asciinema.org/a/538827.svg)](https://asciinema.org/a/538827)