Open munael opened 3 years ago
I would suggest something like conda-forge for the packaging, which then allows installation without admin privileges and on Windows, Linux and Mac OSX: https://conda-forge.org/
It would mean ensuring all the packages are in conda-forge individually, and they could then be installed into a joint environment using conda or its faster drop-in replacement mamba. With the latter, creating a named environment tools
for the tools already on conda-forge is as easy as the following (after having installed mamba):
mamba create -n tools bat exa broot ripgrep fzf jq cheat glances hyperfine httpie zoxide
To use the tools, you just have to activate the respective environment with:
conda activate tools
And you can of course create separate environments for separate sets of tools, whichever you often use together. I went through all the packages currently in the list and a bunch are already on conda-forge. Everything that has a link, is are already there:
For each of the linked packages, a quick install help could be included in the list, with a linkout to mamba installation to get you going.
For some of the other packages, they seem to be packaged for Debian, at least. So one could do a similar search and include relevant info in the list wherever that is the case. And then it's simply a question of contributions from users of different platforms to fill the installation info.
How about docker?
I'm learning about all these cools stuff so I'm still green. Suppose I want these commands on a *nix-based system, how can I achieve that?
Arch
you can have package groups, which is cool.coreutils
which provides a set of commands. I don't exactly how it's packed - do they download all dependencies and put them in the path or is it a big package with all the sub-utilities (like box within box). I'd love to know.Docker would be a cross platform solution. A docker file instructs to pull appropriate binaries from individual repositories (suppose they provide one) and then places them in path. If binaries don't exists then the docker file can instruct to initiate a GitHub action or CI/CD pipeline to build binaries (that might be messy).
PS: It looks like a stupid idea.. but nonetheless exciting..
I find that Docker usually leads to a lot of overhead. First of all, you have to get Docker to run on your system, which has been cumbersome for me in the past (haven't tried recently, though). And then you drag along a full operating system just to get a couple of programs to run. And you will only be able to operate inside the Docker container. So I think Docker is good if you want to make a system reproducible, but cumbersome when you just want things to work on the command line (which I think these tools are meant to).
For getting things to work easily, I really like the conda / mamba system. Easy to setup and easy to use. And most things on conda-forge are truly cross-platform.
Ah thanks for the input. I don't think you've to have a whole OS layer to install docker apps.. (I need a double check though). Conda is great but then again I have had some dependency issues and the conda env needs to be active right.. I'm looking for something like npm
or pdm
, but one is for JS and other Python... mm.
Basically, conda / mamba is something like npm, just agnostic of languages. So you can package anything for it. And isolating environments from each other is actually a great plus in my view -- you can use it to install tools into separate environments, whose dependencies conflict. That is something you can't do with a package manager that installs everything system-wide. But I think we're trailing off-topic, here... :sweat_smile:
Instead of Docker, if you're on Fedora like me you could make a toolbox out of all of the tools in this repository. As the name implies,
Toolbox makes it easy to use a containerized environment for everyday software development and debugging ... In other words, toolbox containers look, feel and behave like a standard Linux command line environment.
So you get the benefit of containerization (using Podman under the hood which is arguably more lightweight than Docker) at the same time as the benefit of your own, cozy command-line environment with all of these modern Unix tools.
I'm spoiled by pacman and the AUR so I don't really have a need for this :smile: It's an interesting idea though.
another candidate could be nix, since it work on almost any distro(fedora silverblue will require workaround using this though)
and all the currently listed tools are in the repo already
example:
shell.nix
with import <nixpkgs> {};
mkShell {
buildInputs = [
bat
exa
lsd
delta
dust
duf
broot
fd
ripgrep
ag
fzf
mcfly
choose
jq
sd
cheat
tldr
bottom
glances
gtop
hyperfine
gping
procs
httpie
curlie
xh
zoxide
dogdns
];
}
and run nix-shell
(this is also a disposable shell)
Demo: (from fresh ubuntu)
@juliosueiras I've head about NixOS and especially its manager that you show here, but man is this cool and exactly in line with what I imagined! A couple of questions, though:
vagrant ssh
, your first command in the above video (GIF?), do?nix-shell
is disposable, do you mean that all of the dependencies are download in a temporary directory, or is it something particular to Nix that I don't have a feeling for?1) vagrant ssh is just to show case that I am in a clean fresh ubuntu (vagrant is a tool to create/manage vms), since the purpose to show how to use it from a clean ubuntu with no nix installed
2) asciinema
3) all the deps are under /nix/store , so if you do nix-shell again, it won't need to redownload it, and the /nix/store is created as part of the nix installation process, lastly, if you do want remove the actual deps files you can just do nix-collect-garbage
@juliosueiras amazing, thank you for the information. Looks like it's time to learn some Nix, because it exactly fits the bill for making a container-like environment for all of the modern-unix
tools!
Disclaimer: I've zero experience in preparing packages for any of the popular package managers for Linux.
How difficult would it be to make avail either a sort of collection package that points to these packages (e.g. as dependencies) for, say, Ubuntu?
Maintaining that sounds like a pain (but, see disclaimer). So how about a script (for each package manager, as appropriate/needed) that installs/updates each of these according to some optional CLI/file config?
Would be an interesting addition. Just putting it out there, even if this repo is likely not the place for it.