Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Allaman/werkzeugkasten

Download your favorite command-line tools with ease!
https://github.com/Allaman/werkzeugkasten

admin container devops linux multi-arch server tools troubleshooting workflow

Last synced: 3 months ago
JSON representation

Download your favorite command-line tools with ease!

Awesome Lists containing this project

README

        

Werkzeugkasten 🧰



Release
size
issues
last commit
license
last release


_Conveniently download your favorite binaries (currently 98 supported)!_

![screenshot](https://s10.gifyu.com/images/S5wTq.png)

List categories and tool count

`werkzeugkasten -categories`

![categories.png](https://s12.gifyu.com/images/S5wTL.png)

List tools in category "Text"

`werkzeugkasten -category text`

![category.png](https://s10.gifyu.com/images/S5w37.png)

Install tools in non-interactive mode

`werkzeugkasten -dir /tmp -tool age -tool kustomize`

![install.png](https://s12.gifyu.com/images/S5w3I.png)

From time to time, I need to connect to containers and VMs to troubleshoot them. These systems typically only have the necessary tools for their specific purpose and nothing else. Additionally, there is no root account available, so installing tools through a package manager is not an option. Furthermore, some tools are either not available as a package or the packaged version is outdated.

This is where Werkzeugkasten comes in. You simply need to download the werkzeugkasten binary onto your system, and from that point on, there are no additional requirements, particularly the need for root permissions.

## Get Werkzeugkasten

Unfortunately, a tool to download the werkzeugkasten binary is required. It is possible to download files via bash and `/dev/tcp` **only**, but I couldn't figure out how to handle the redirect from Github when accessing a release URL.

with curl

```sh
VERSION=$(curl -s https://api.github.com/repos/allaman/werkzeugkasten/releases/latest | grep tag_name | cut -d '"' -f 4)
curl -sLo werkzeugkasten https://github.com/Allaman/werkzeugkasten/releases/download/${VERSION}/werkzeugkasten_${VERSION}_$(uname -s)_$(uname -m)
```

with wget

```sh
VERSION=$(wget -qO - https://api.github.com/repos/allaman/werkzeugkasten/releases/latest | grep tag_name | cut -d '"' -f 4)
wget -qO werkzeugkasten https://github.com/Allaman/werkzeugkasten/releases/download/${VERSION}/werkzeugkasten_${VERSION}_$(uname -s)_$(uname -m)
```

```sh
chmod +x werkzeugkasten
./werkzeugkasten
```

You could also integrate werkzeugkasten in your golden (Docker) image. ⚠️ Keep possible security implications in mind.

## How it works

Werkzeugkasten is basically a wrapper around the excellent [eget](https://github.com/zyedidia/eget) that does the heavy lifting and is responsible for downloading the chosen tools. Eget itself is downloaded as binary via `net/http` call and decompression/extracting logic. The awesome [charmbracelet](https://github.com/charmbracelet) tools [huh](https://github.com/charmbracelet/huh), [log](https://github.com/charmbracelet/log), and [lipgloss](https://github.com/charmbracelet/lipgloss) are used for a modern look and feel. By default, the latest release of a tool is downloaded (see [Configuration](#configuration)).

## What Werkzeugkasten is not

Werkzeugkasten is not intended to replace package managers (such as apt, brew, ...) or configuration management tools (such as Ansible, ...).

## Usage

```
❯ werkzeugkasten -help
Usage: werkzeugkasten [flags]
Flags:
-accessible
Enable accessibility mode for interactive use
-categories
Print all categories and tool count
-category string
List tools by category
-debug
Enable debug output
-dir string
Where to download the tools (default ".")
-help
Print help message
-theme string
Set theme for interactive mode (default "catppuccin")
-tool value
Specify multiple tools to install programmatically (e.g., -tool kustomize -tool task)
-tools
Print all available tools
-version
Print version
```

Werkzeugkasten supports an **interactive** mode and a **non-interactive** mode.

- `werkzeugkasten` will start in interactive mode where you select your tools you want to install from a searchable list.

- `werkzeugkasten -tools` will print all available tools.

- `werkzeugkasten -categories` will print all available categories.

- `werkzeugkasten -category network` will print all available tools in the "network" category.

- `werkzeugkasten -tool age -tool kustomize` will download age and kustomize.

## Configuration

Besides CLI flags, further configuration is possible with environment variables.

Set a tool's version/tag explicitly:

```sh
export WK__>=1.33.7
export WK_KUSTOMIZE_TAG=v5.3.0`
```

Set a GitHub token to get more than the 60 API calls per hour limit:

```sh
export EGET_GITHUB_TOKEN=
```