{"id":30805569,"url":"https://github.com/aaronsb/arch-update","last_synced_at":"2026-04-19T02:18:05.321Z","repository":{"id":273938327,"uuid":"892423795","full_name":"aaronsb/arch-update","owner":"aaronsb","description":"A modular system update script for Arch Linux that handles system updates, AUR packages, Flatpak updates, and system maintenance tasks with educational output and smart terminal handling.","archived":false,"fork":false,"pushed_at":"2025-03-11T18:44:39.000Z","size":1503,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T00:59:15.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronsb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-22T04:44:54.000Z","updated_at":"2025-07-04T15:33:59.000Z","dependencies_parsed_at":"2025-09-06T01:09:29.698Z","dependency_job_id":null,"html_url":"https://github.com/aaronsb/arch-update","commit_stats":null,"previous_names":["aaronsb/arch-update"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/aaronsb/arch-update","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronsb%2Farch-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronsb%2Farch-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronsb%2Farch-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronsb%2Farch-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronsb","download_url":"https://codeload.github.com/aaronsb/arch-update/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronsb%2Farch-update/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31991753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-06T00:59:13.464Z","updated_at":"2026-04-19T02:18:05.313Z","avatar_url":"https://github.com/aaronsb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# update-arch\n\nA modular Arch Linux update script. User-scope, XDG-compliant, with a simple\nmodule contract so adding your own maintenance tasks is a few lines of bash.\n\n## Design\n\n- **User scope.** The tool lives under your `$HOME` per the XDG Base Directory\n  spec. Nothing is installed into `/usr` or `/etc`. System-level operations\n  inside modules use `sudo` only where needed.\n- **Modular.** Each maintenance task is its own file in `modules/`, prefixed\n  with a two-digit number that sets its phase and ordering (like udev or\n  System V init).\n- **Declarative modules.** A module is a short bash file that declares a few\n  `MODULE_*` variables and defines `run_update`. The runtime handles\n  discovery, phase validation, dry-run, and isolation.\n\n## Installation\n\nOne-liner, no git needed on the target:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/aaronsb/arch-update/main/install.sh | bash\n```\n\nThis fetches the latest release tag as a tarball, extracts to a temp\ndirectory, and runs `deploy.sh --install`. Only `curl` and `tar` are\nrequired at install time.\n\nPrefer to read the script before piping to shell:\n\n```bash\ncurl -fsSLO https://raw.githubusercontent.com/aaronsb/arch-update/main/install.sh\nless install.sh\nbash install.sh\n```\n\n### From a local clone (for development)\n\n```bash\ngit clone https://github.com/aaronsb/arch-update.git\ncd arch-update\n./deploy.sh --install   # or: make install\n```\n\nEither path copies the tracked files (minus anything in `.deployignore`)\ninto `$XDG_DATA_HOME/update-arch`, creates a symlink at\n`~/.local/bin/update-arch`, and writes an `INSTALL_MANIFEST` recording the\nversion, commit, and source (`git` or `tarball`) for `--update` to reason\nabout later.\n\n### Forking\n\nUpstream repo coordinates live in `update-arch.conf` (ships with the code,\ndeployed to `$XDG_DATA_HOME/update-arch/`). A fork just edits that file.\nUsers can also override by creating\n`$XDG_CONFIG_HOME/update-arch/update-arch.conf`.\n\n## Usage\n\n```bash\nupdate-arch                     # show help\nupdate-arch --run               # perform updates\nupdate-arch --dry-run           # show what would happen\nupdate-arch --list              # list installed modules with metadata\nupdate-arch --only pacman       # run one module (substring match)\nupdate-arch --create-module -t system\nupdate-arch --configure-terminal\n```\n\n## Module phases\n\nPhases run in order. A module's numeric prefix determines its phase.\n\n| Range | Phase  | Scope              | sudo?          |\n| ----- | ------ | ------------------ | -------------- |\n| 10-49 | system | System maintenance | yes (as needed) |\n| 50-89 | user   | User customization | no             |\n| 90-99 | status | Post-update status | no             |\n\n## Writing a module\n\nCreate a file `modules/NN-my-module.sh` (pick a free number in the right\nrange) and give it this shape:\n\n```bash\n#!/bin/bash\n# What this module does.\n\nMODULE_TYPE=\"system\"                      # system | user | status\nMODULE_NAME=\"my-module\"\nMODULE_DESCRIPTION=\"One-line summary\"\nMODULE_REQUIRES=\"some-cli another-cli\"    # commands that must exist\nMODULE_DRY_RUN_SAFE=\"true\"                # default true\n\nrun_update() {\n    print_header \"${ICONS[package]} DOING THE THING\"\n\n    if [[ -n \"$DRY_RUN\" ]]; then\n        print_status \"${ICONS[info]}\" \"Would do X\"\n        return 0\n    fi\n\n    # real work here\n    print_success \"Done\"\n}\n```\n\nThat's it. No boilerplate, no source guards, no direct-invocation footer.\n\n- `check_supported` is **optional**. By default the runtime derives it from\n  `MODULE_REQUIRES` — every command listed must exist on `PATH`. Define your\n  own `check_supported` if the check is more involved (e.g., a specific file\n  must exist).\n- Each module runs in a subshell, so state (variables, functions, traps)\n  never leaks into the next module.\n\nOr use the scaffold:\n\n```bash\nupdate-arch --create-module -t system\n```\n\n## Paths (XDG)\n\nAll paths honor XDG Base Directory environment variables with the standard\nfallbacks.\n\n| What                  | Env override       | Default                             |\n| --------------------- | ------------------ | ----------------------------------- |\n| Code and modules      | `$XDG_DATA_HOME`   | `~/.local/share/update-arch`        |\n| Terminal config       | `$XDG_CONFIG_HOME` | `~/.config/update-arch`             |\n| Run logs              | `$XDG_STATE_HOME`  | `~/.local/state/update-arch/logs`   |\n| Cache / backups       | `$XDG_CACHE_HOME`  | `~/.cache/update-arch`              |\n| Lock file             | `$XDG_RUNTIME_DIR` | `/tmp`                              |\n| Executable            | —                  | `~/.local/bin/update-arch`          |\n\nOnly the last `UPDATE_ARCH_MAX_LOGS` (5) run logs are kept.\n\n## Disabling modules\n\nRename a module to `.sh.disabled` to skip it:\n\n```bash\nmv 20-flatpak-update.sh 20-flatpak-update.sh.disabled\n```\n\n## Dependencies\n\nRequired: `bash`, `sudo`, `pacman`, `systemctl`, `flock`.\n\nOptional (enables the matching module): `reflector`, `paccache`, `yay` or\n`paru`, `flatpak`, `oh-my-posh`, `fastfetch`, `checkupdates`.\n\nOptional (improves output): `glow` renders release notes as formatted\nmarkdown when `--check-update` / `--update` finds a new version. Falls\nback to plain indented text if none of `glow` / `mdcat` / `bat` are on\nPATH. Only applied when stdout is an interactive terminal — tee'd logs\nstay plain.\n\n## Locking and concurrency\n\n`update-arch --run` takes an `flock` on `$XDG_RUNTIME_DIR/update-arch.lock` at\nstart. A second concurrent invocation exits immediately. `--only \u003cname\u003e` uses\nthe same lock so a standalone module can't race with a full run.\n\n## Uninstall\n\n```bash\n~/.local/share/update-arch/deploy.sh --uninstall\n```\n\nPrompts for confirmation; pass `--yes` to skip the prompt. Run logs\n(`$XDG_STATE_HOME/update-arch`) and cached backups\n(`$XDG_CACHE_HOME/update-arch`) are preserved — remove them manually if you\ndon't want them kept.\n\n## Version\n\nCurrent version: 0.3.0. Semantic versioning.\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronsb%2Farch-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronsb%2Farch-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronsb%2Farch-update/lists"}