Compare commits

...

2 Commits

5 changed files with 52 additions and 26 deletions

View File

@ -8,16 +8,14 @@ Installs standalone command line utilities in your user profile
# motivations # motivations
You have a bunch of useful tools for day to day activity in the terminal, as a dev or ops guy. Tools like jq, fzf, exa, etc.
But you never know if there are up to date, where they come from, what do they do exactly, do you still need them. You have a variety of useful tools for day-to-day activities in the terminal, whether you're a developer or operations professional. These tools include jq, fzf, exa, and more. However, it's often difficult to determine if these tools are up to date, where they originate from, their exact functionality, and whether you still need them.
Few of them are part of you OS package manager. Most of the time of old version. And you may not want to install them system wide actually. Some of these tools are included in your operating system's package manager, but they are often outdated. Additionally, you may prefer not to install them system-wide.
Cliget lists, installs and updates standalone command line utilities in your user profile. **Cliget** addresses these challenges by listing, installing, and updating standalone command line utilities in your user profile.
Inspired by envinstall (private), [webinstall](gh:webinstall/webi-installers), [asdf](gh:asdf-community/.github).
This solution was inspired by envinstall (undisclosed), [webinstall](gh:webinstall/webi-installers), and [asdf](gh:asdf-community/.github).
# what # what
@ -68,9 +66,9 @@ most defaults can be overriden
# FAQ # FAQ
#### What does it do, again ? #### Q: What does it do, again ?
CliGet automates the following process: **Cliget** automates the following process:
1. go to my useful tool website 1. go to my useful tool website
1. navigate to release section 1. navigate to release section
@ -79,52 +77,52 @@ CliGet automates the following process:
1. repeat for all the useful small tools I use 1. repeat for all the useful small tools I use
1. repeat periodically 1. repeat periodically
CliGet has nice defaults, favors convention over configuration, and does its best to "guess" how to get current version number, get last version number, download last release and install it properly. **Cliget** has nice defaults, favors convention over configuration, and does its best to "guess" how to get current version number, get last version number, download last release and install it properly.
Tools developers / maintainers are not supposed to know CliGet exists. It adapts to the way they deliver their software. Of course if they use GitHub release and TGZ, it's easier for Cliget to manage :') Tools developers / maintainers are not supposed to know **Cliget** exists. It adapts to the way they deliver their software. Of course if they use GitHub release and TGZ, it's easier for Cliget to manage :')
#### so I have to do this process for CliGet ? #### Q: so I have to do this process for **Cliget** ?
Only the first time. After being installed, CliGet is managed by CliGet. Only the first time. After being installed, **Cliget** is managed by **Cliget**.
#### why this name ? #### Q: why this name ?
It is like wget but fo CLI. Plus, I like the sound of it :) It is like wget but fo CLI. Plus, I like the sound of it :)
#### I already use [asdf](https://asdf-vm.com/), why would I need cliget ? #### Q: I already use [asdf](https://asdf-vm.com/), why would I need cliget ?
asdf is a wonderful tool when it comes to do software development in various programming language while mixing versions from one project to an other. asdf is a wonderful tool when it comes to do software development in various programming language while mixing versions from one project to an other.
But this power comes with some constraints : a plugin has to be developed in order to integrate a new tool to asdf ; And versions of every tool that will be used for a project has to be declared in a config file. But this power comes with some constraints : a plugin has to be developed in order to integrate a new tool to asdf ; And versions of every tool that will be used for a project has to be declared in a config file.
CliGet does not handle multi-versions and tools are deployed for your whole profile. **Cliget** does not handle multi-versions and tools are deployed for your whole profile.
In short, if you want to manage development environment, use asfd. If you want to install small tools, use CliGet. They do not conflict, they are complement each other. In short, if you want to manage development environment, use asfd. If you want to install small tools, use **Cliget**. They do not conflict, they complement each other.
#### I already use the package manager of my OS to install tools, why would I need cliget ? #### Q: I already use the package manager of my OS to install tools, why would I need cliget ?
Package managers handle dependencies and install software system wide, for all users. Not all softwares are packaged for all OS distributions because this is hard work for maintainers. So you end up with some softwares not available or not up to date. Package managers handle dependencies and install software system wide, for all users. Not all softwares are packaged for all OS distributions because this is hard work for maintainers. So you end up with some softwares not available or not up to date.
CliGet only install standalone programs, in the user profile (`.local/bin`). It does its best to find the last version and the best way to install the software. There is no need to package for CliGet. **Cliget** only install standalone programs, in the user profile (`.local/bin`). It does its best to find the last version and the best way to install the software. There is no need to package for **Cliget**.
#### I already use Flatpack, AppImage, Snap to install tools in my profile, why would I need CliGet ? #### Q: I already use Flatpack, AppImage, Snap to install tools in my profile, why would I need **Cliget** ?
These are package managers for the user profile. They come with heavy runtime. And, as classic package manager, not all tools are packaged nor up to date as it requires work from maintainers. These are package managers for the user profile. They come with heavy runtime. And, as classic package manager, not all tools are packaged nor up to date as it requires work from maintainers.
CliGet does not sandbox, nor manage dependencies but does not require any special packaging. **Cliget** does not sandbox, nor manage dependencies but does not require any special packaging.
#### I don't want to install python on my machine #### Q: I don't want to install python on my machine
CliGet is written in Python but packaged as a standalone program with no dependencies except `libc` and `zlib`, thanks to [PyInstaller](https://pyinstaller.org). **Cliget** is written in Python but packaged as a standalone program with no dependencies except `libc` and `zlib`, thanks to [PyInstaller](https://pyinstaller.org).
#### I don't trust you. What prevent you from dumping me a malware instead of a genuine software ? #### Q: I don't trust you. What prevent you from dumping me a malware instead of a genuine software ?
* source code is available and very straightforward. you can audit the code, build from source or even write your own version * source code is available and very straightforward. you can audit the code, build from source or even write your own version
* the tool will, by default, prompt you with clear information of what will be done before install * the tool will, by default, prompt you with clear information of what will be done before install
* catalog is only one file, readable, with clear information on where the software is coming from and how it will be installed * catalog is only one file, readable, with clear information on where the software is coming from and how it will be installed
* also keep in mind you also have to trust the software dev team. We are different teams. * also keep in mind you also have to trust the software dev team. We are different teams.
#### I want this for macos or mswindows #### Q: I want this for macos or mswindows
Currently only Linux is supported. It should work on all Unix like OS. For others, contributions are welcome as long as they do not complicate the tool too much. Currently only Linux is supported. It should work on all Unix like OS. For others, contributions are welcome as long as they do not complicate the tool too much.

View File

@ -44,7 +44,7 @@
- [ ] existence of `.local`, `.local/programs`, `.local/bin` - [ ] existence of `.local`, `.local/programs`, `.local/bin`
- [ ] that permissions are ok - [ ] that permissions are ok
- [ ] that `.local/bin` are in `PATH` - [ ] that `.local/bin` are in `PATH`
- [ ] UI, add some progress to install - [ ] UI, add some progress to install (steps : 1/5 check current version, 2/5 ..)
- [ ] allow to list versions - [ ] allow to list versions
- [ ] allow to force installation of a given version - [ ] allow to force installation of a given version
- [-] improve search algorithm, fuzzing - [-] improve search algorithm, fuzzing

View File

@ -281,6 +281,11 @@ mosh:
website: https://mosh.org/ website: https://mosh.org/
github: mobile-shell/mosho github: mobile-shell/mosho
navi:
desc: Interactive cheatsheet tool for the command-line
github: denisidoro/navi
tag: rust
ndcu: ndcu:
desc: a disk usage analyzer with an ncurses interface desc: a disk usage analyzer with an ncurses interface
website: https://dev.yorhel.nl/ncdu website: https://dev.yorhel.nl/ncdu
@ -367,6 +372,13 @@ slurp:
desc: put whole input in memory before processing ; this allow to overrite input file ; like `sed -i` ; prefer `sponge` from moreutils package desc: put whole input in memory before processing ; this allow to overrite input file ; like `sed -i` ; prefer `sponge` from moreutils package
shell: cat > /dev/shm/slurp_$$ && cat /dev/shm/slurp_$$ ; rm /dev/shm/slurp_$$ shell: cat > /dev/shm/slurp_$$ && cat /dev/shm/slurp_$$ ; rm /dev/shm/slurp_$$
sk:
fullname: skim
desc: general fuzzy finder
github: lotabout/skim
cargo: skim
tag: rust
so: so:
desc: A terminal interface for Stack Overflow desc: A terminal interface for Stack Overflow
github: samtay/so github: samtay/so

View File

@ -248,7 +248,7 @@ def doallversions(options):
if props.github: if props.github:
vers = _gh_versions(props.github) vers = _gh_versions(props.github)
trace(vers) trace(vers)
print("\n".join(vers)) print("\n".join(map(str,vers)))
else: else:
warn(f"{tool} not in catalog") warn(f"{tool} not in catalog")

16
getreadme.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash -eu
cli=$1
page=${2-README.md}
# lookup cli in catalog
printf -v filter '.%s|.github' ${cli}
gh=$(yq ${filter} catalog.yaml)
# build gh README URL
printf -v url1 'https://github.com/%s/raw/main/%s' ${gh} ${page}
printf -v url2 'https://github.com/%s/raw/master/%s' ${gh} ${page}
# curl and pipe to bat
CURL="curl -fsS -L"
{ ${CURL} "${url1}" || ${CURL} "${url2}" ; } | glow -p -