-
Notifications
You must be signed in to change notification settings - Fork 0
Home
AllTool-Linux (currently at version 2.0.0) is a modular, multi-utility command-line toolkit built for Linux. Instead of installing a dozen separate little programs for everyday system chores, you install one tool and get 20+ utilities behind a single entry-point command: alltool <command> [args]. It covers file and disk management, audio/video playback, network diagnostics, power management, polyglot script running, password and hash security helpers, web search, weather, a Pomodoro productivity timer, self-updating, and self-uninstallation. Everything is wrapped in a friendly, emoji-heavy CLI style (🔍 ✅ ❌
Installation is a one-liner piped from GitHub:
curl -fsSL https://raw.githubusercontent.com/Hajjani/AllTool-Linux/refs/heads/Stable/installer.sh | bashThe installer.sh script (about 350 lines of Bash) does the following, in order:
-
Detects your distribution by reading
/etc/os-releaseand supports four families: Debian/Ubuntu (apt), Arch (pacman), Fedora (dnf), and openSUSE (zypper). Unknown distros gracefully skip system-package installation instead of failing. -
Installs required core packages automatically — the build toolchain and Python stack the tool cannot run without (
make,git,gcc,pkg-config,python3,python3-pip,python3-requests,python3-bs4/beautifulsoup4,python3-packaging). -
Asks you about every optional package, one by one, each with a short explanation of which command needs it. There are currently 10 optionals across four groups: media (
mpv,ffmpeg), network/system (speedtest-cli,inxi,power-profiles-daemon), and language runtimes (nodejs,ruby,php,default-jre/jre-openjdk/java-latest-openjdkdepending on distro, andg++/gcc-c++). Nothing optional is installed without your consent. For automation it also accepts flags:-y/--yesto take everything,--no-optional/--minimalto skip everything,-h/--helpfor usage — and if stdin isn't a terminal (CI pipelines, pipes) it auto-skips rather than hanging on input. -
Detects your power-management backend (
powerprofilesctl,tlp,auto-cpufreq,cpupower, or rawsysfsgovernors), records the backend plus available profiles into.confs.json, and offers to installpower-profiles-daemonif nothing compatible is found. -
Warns about any still-missing optional commands, builds the native C components via
make install, copies the script, entry point, andTools/package into~/bin, adds~/binto yourPATHin.bashrc, cleans up the cloned repo, and finally deletes itself.
The project is mid-migration from a 1000+ line monolithic AllTools.py (kept as a legacy fallback) to a clean modular package under Tools/, imported by a tiny alltool entry script. The design centers on three Python foundation pieces plus a compiled C layer:
-
Tools/base.py— the framework everything plugs into: aToolBaseclass with shared helpers (run_cmd,get_output,has_command, interactiveconfirm,sudo_runwith optional cached credentials) and aCommandRegistrywith a@command(name, aliases, help_text)decorator. Each utility module simply decorates handler functions, andTools/__init__.pyimports all modules and exposesmain(), which dispatchessys.argv[1]through the registry, handlesKeyboardInterrupt(exit 130) cleanly, and prints "Unknown command" otherwise. -
Tools/bindings.py— actypesbridge that loads the compiled shared libraries (liballtool_sudo,liballtool_compiler, plus shared-memory support) and exposes them as Python classes (AllToolSudo, compiler access), along with config/help JSON loading from~/.config/alltool/. -
Tools/c_src/— the native C core, built by its ownMakefile(and ameson.buildalternative) with-Wall -Wextra:-
alltool_sudo.c— credential prompting (with terminal echo disabled), XOR-based password caching with random salts from/dev/urandom, andalltool_sudo_run_with_creds, which runs commands as another user byexec-ingsudo -Sdirectly with an argv array — no shell involved. The command line is split by a quote-aware tokenizer that performs zero expansions, usernames from the config file are validated against a strict allowlist, the password travels to sudo over a stdin pipe, and sudo itself is resolved only via fixed paths (/usr/bin/sudo,/bin/sudo). This was a deliberate, tested fix for a former shell-injection vulnerability where password/username/command were interpolated into ansh -cstring. -
alltool_compiler.c/alltool_runner.c— compile-and-run pipeline powering theruncommand, with shared-memory (alltool_shm) process-chain coordination, plussudo-cache/sudo-clearcredential management commands.
-
-
file_ops.py—create(makes a file plus any missing parent folders) andformat(formats a block device as NTFS/EXT4/VFAT with an explicit typed-yesconfirmation guard). -
media.py—sound(plays audio files or.txtplaylists viampv, validating supported extensions) andvideo(plays video viaffplaywith auto-exit). -
network.py—netspeed(measures bandwidth viaspeedtest-cli),sr(AI-assisted web search usingrequests+beautifulsoup4), andwea(weather lookup for a city). -
system.py—refresh(repairs setup/permissions/PATH),sf(lists directory contents),sif(rich system report viainxi),up(checks for distro updates using the native package manager),cl(clears the terminal), andrequirement/req(audits every external dependency, prints ✅/❌ status per tool with the exact install command for your distro). -
power.py—powerwith a full subcommand set:pws/pwn/pwp(power-saver/balanced/performance profiles),pwst(status), and system actionspwo(shutdown),pwr(reboot),pwl(logout),pwsu(suspend),pwh(hibernate),pwlo(lock screen). -
script_runner.py—run, the polyglot star of the suite: detects a script's language and executes Python, Bash, JavaScript, Perl, Ruby, PHP, Java, and C/C++ (compiled on the fly with caching and a-ttemp mode), reporting compile and execution times. -
security.py—psg(cryptographically-flavored password generator with toggles likenose/nos/not/nolto exclude character classes) andhs(file hashing across md5, sha1, sha256, sha512, blake2b, blake2s). -
pomodoro.py—pr, a persistent Pomodoro timer with configurable session counts, background operation,stop/stcontrols, and activity logging to~/.alltool_pomodoro.log. -
updater.py—upa, which self-updates AllTool to the latest stable (st) or preview (pv) release. -
uninstaller.py—un, which removes the installed files, config directory, and PATH entries after confirmation. -
help.py—help, serving command documentation in four languages (English, French, Arabic, German) sourced from.help.json, so the entire tool is usable by non-English speakers.
Runtime state lives under ~/.config/alltool/: .confs.json (version, directory layout, power-backend config, cached sudo credentials, compiler flags, installed-file manifest, per-tool settings) and .help.json (the multilingual help database). Long-lived build artifacts (the .so libraries and alltool_runner binary) live in ~/.config/alltool/bin, while the user-facing alltool launcher sits in ~/bin. House style throughout is emoji-rich status output, defensive which-based dependency checks in every command (each failure tells you exactly how to install what's missing), and graceful degradation — missing optionals disable only their own commands, never the whole tool.
There is no formal unit-test suite yet (the project notes recommend pytest with mocked external binaries like mpv and powerprofilesctl when one is added), but there is a test_integration.sh script exercising help, file creation, listing, C compilation via run, password generation, hashing, and power status end-to-end, plus a GitHub Actions workflow (.github/workflows/testdepl.yml) that installs system dependencies on Ubuntu, lints with flake8, attempts pytest, and gates deploys from the Stable branch. The Makefile at the repo root ties the Python and C worlds together for install/uninstall. Known quirks documented for contributors include a singular/plural AllTools.py path inconsistency, hardcoded paths (/tmp/pomodoro_timer.py, ~/bin/), password-less sudo assumptions, and the absence of a __version__ string the updater's regex expects — all honest markers of a young, fast-moving hobby project transitioning from a single script into a real modular system with native-code acceleration.