You are not logged in.

#1 2026-04-30 23:37:57

Rakosn1cek
Member
From: United Kingdom
Registered: 2026-03-21
Posts: 4
Website

Mend - A utility for automating recovery of common terminal failures

I have created a Zsh utility to assist with common package management and build errors, designed to reduce terminal friction by automating the resolution of repeatable failure states.

The utility parses standard error output and command failures to provide immediate remediation. Key functionality includes:

- Command-not-found handling: Automatically queries system package databases (e.g., pkgfile integration) to identify the package providing a missing binary and prompts for immediate installation.

- Shared library (.so) resolution: Identifies the owning package for missing shared objects when a binary fails to execute.

- PGP/GPG Key retrieval: Automates the fetch of missing public keys when build processes fail due to signature verification issues.

- Stale database lock removal: Safely identifies and clears stale lock files (db.lck) following interrupted package manager sessions.

- History management: Integrates with the Zsh Line Editor to identify successful commands and retroactively purge failed attempts from both session memory and .zsh_history.

The implementation avoids external APIs or model-based logic, relying entirely on local pattern matching and standard system query tools. While developed in an Arch environment, the logic is designed to be distro-agnostic.

The source code is available at GitHub. I have opened a community hub on Discord for technical feedback, logic discussion, and bug reports.
I would appreciate any input regarding the error-handling logic or suggestions for additional use cases.

Screenshot of Mend in action

Last edited by Rakosn1cek (2026-04-30 23:48:47)


Mend | The terminal assistant for Arch Linux.
XC-Manager | Curated in Awesome-Zsh-Plugins.
Mend RepoXC-Manager Repo
Simplifying the Arch Way, one script at a time.

Offline

Board footer

Powered by FluxBB