Bash TUI tool that automates Git config (user.name/user.email). Version 1.2.0 (single copy in
src/firegit.sh:4; bump with any version change). No external runtime deps; plain bash.
src/firegit.sh— entry point. Args:-h/--help,--check,--reset,--tutorial, else TUI. Usesset -e. Sources libs in this fixed order: output, detect, validate, tui (order matters only becausetui.sh/validate.shcall each other's functions).src/lib/output.sh— banner/help/print functions.detect.sh— OS/env/package-manager detection +install_git(runsevalon install cmd).validate.sh— config check/reset, email regex, extra settings, tutorial.tui.sh— interactive menu.packages/— packaging stubs (PKGBUILD, .spec, nix, snap).installer.shis a one-liner piped viacurl|bash.DOCS/— guides.tests/run_tests.sh— suite.
- GitHub owner/remote, README, installer, and all package specs use
dionarley(git remoteisgithub.com/dionarley/fire-git). The Flatpak id/filename also usesdionarley(flatpak/com.github.dionarley.fire-git.yaml) — the test suite asserts that exact filename (tests/run_tests.sh:176), so keep this casing in all new URLs/package specs.
./tests/run_tests.sh # run full suite; exit non-zero on any failure
bash -c 'source tests/run_tests.sh; test_syntax' # NOTE: sourcing runs the WHOLE suite
bash -n src/firegit.sh && bash -n src/lib/*.sh # syntax check all
shellcheck src/firegit.sh src/lib/*.sh # if installed- No test framework/packages; tests are static grep checks that assert strings/patterns
exist in source (e.g.
grep -q "run_tui_menu"). They do not exercise runtime behavior, so a passing suite does not prove the tool runs — run the script manually too. - Test invocations at the bottom of
run_tests.share unguarded (no module guard), sosourceit triggers the whole suite once, then your target a 2nd time. Fine for a single re-run.
GIT_NAME,GIT_EMAIL(skip prompts; read directly),APPLY_ADDITIONAL(default true).
docker compose run --rm test # build + run suite; 19/19 exit non-zero on failure
docker run --rm -it fire-git-dev # interactive TUI
docker run --rm fire-git-dev --check # flags append to ENTRYPOINTAn Alpine (3.20) image installing bash/git/shellcheck. The Dockerfile uses ENTRYPOINT, so args
append as subcommands; docker run fire-git-dev --check works via entrypoint append. Compose
test/dev mount . to /app; override the test entrypoint via compose, not command
(because command would replace the ENTRYPOINT, not append to it).
- Only touches Git config via
--global; the Flatpak manifest uses--filesystem=home/--share=network/--device=all— keep sandbox minimal when editing.
- Functions
snake_case; variables/constsUPPER_SNAKE_CASE; scripts/lowercase. - 2-space indent; quote all expansions (
"$VAR");set -e; shebang#!/usr/bin/env bash. - Output via
print_info/success/warning/error; comments minimal. - Never commit creds/tokens.
"Add TUI menu system", "Fix existing config check logic", "Update runtime to 23.08".