Refactor: modular layout, English-only, install primitives, CI#1
Merged
Conversation
Also adds issue templates (bug report, tool request) and PR template.
Also drops the unimplemented PowerShell promise from the trailer.
Reconciles the modular refactor with the original repository so the PR has a common base. Conflicts on ghostline.sh and install.sh resolved in favor of the refactored versions; the lowercase Readme.md was dropped in favor of README.md.
Resolves SC2088 warnings from shellcheck. The fallback paths now expand correctly at runtime instead of being displayed as literal strings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ghostline is restructured from a single 681-line
ghostline.shinto amodular layout that's easier to extend and review. No new menu entries —
every legacy feature is preserved, just behind a cleaner facade.
What changed
lib/core.sh— TTY-aware colors (no more ANSI in pipes), palette,GHOSTLINE_*globals.lib/installer.sh—log_*,prompt_*,ensure_command,resolve_command,clone_or_pull,pip_install,pipx_install.Shared by the runtime and
install.sh.lib/ui.sh— ASCII art, menu rendering, splash screen. FragileIFS=$'\n' read -r -d ''array splitting replaced bymapfile -t.lib/modules/{config,passive,active,special}.sh— one file perenumeration domain. Each tool follows a five-line shape:
require_*checks →ensure_command→ run → save → continue.ghostline.sh— thin entry point (~50 lines) that sources thelibrary and drives the main loop.
install.sh— translated to English, uses the shared helpers,fixed quoting on
chown, replacedeval echo ~$SUDO_USERwithgetent passwd.Hardening
set -uo pipefailat the entry point (interactive —-ewould killthe loop on the first non-zero exit).
install.shuses the fullset -euo pipefailsince it is non-interactive.mapfile -teverywhere instead of the fragile legacy splitting.resolve_commandfor binaries packaged under multiple names(
crackmapexec/cme/nxc).New project plumbing
LICENSE(MIT),.gitignore,.editorconfig.CONTRIBUTING.md,CODE_OF_CONDUCT.md,SECURITY.md.docs/ARCHITECTURE.md— layout, boot sequence, helpers, CI.docs/ADDING_A_TOOL.md— recipe for plugging in a new tool..github/workflows/ci.yml— shellcheck +bash -n+ smoke test..github/ISSUE_TEMPLATE/(bug report + tool request) andPULL_REQUEST_TEMPLATE.md.Readme.mdrenamed toREADME.mdwith badges, Project Layoutsection, and the unimplemented "PowerShell coming soon" line removed.
Test plan
bash -npasses on every.sh(entry point, install, lib/, modules).sourcing the full
lib/tree.bash -n + smoke).
secrets dump) — to be done before tagging v1.0.0.