NextLevelApex is a security-focused macOS setup orchestrator for running repeatable workstation and DNS-stack tasks with drift detection, health tracking, diagnostics, and report generation.
- Developers automating macOS bootstrap and maintenance
- Operators managing local Cloudflared/Pi-hole workflows
- Teams that need repeatable CLI + API orchestration with auditability
- Canonical CLI orchestrator:
nextlevelapex/main2.py(exposed asnlx) - Compatibility shim for legacy module invocations:
nextlevelapex/main.py - Task registry and guarded discovery:
nextlevelapex/core/registry.py - State tracking and drift detection:
nextlevelapex/core/state.py - Atomic report generation:
nextlevelapex/core/report.py - API wrapper:
nextlevelapex/api/main.py(FastAPI) - Canonical web GUI (read-only v1):
dashboard/(Next.js)
- Primary runtime target: macOS (Darwin)
- Development and most tests: macOS/Linux
install-sudoersis intentionally macOS-only
- Python 3.11+
- Poetry
- Optional for DNS stack tasks: Homebrew, Colima, Docker
git clone https://github.com/Doogie201/NextLevelApex.git
cd NextLevelApex
poetry installList commands:
poetry run nlx --helpRun orchestrator in dry-run mode without generating reports:
poetry run nlx --dry-run --no-reportsInspect discovered task states:
poetry run nlx list-tasksGenerate reports from current state:
poetry run nlx reportRun the API server:
poetry run uvicorn nextlevelapex.api.main:app --reloadRun the canonical GUI dashboard:
npm --prefix dashboard install
npm --prefix dashboard run dev -- --hostname 127.0.0.1 --port 4010GUI v1 is read-only: it supports diagnose + dry-run workflows only and ships no mutation endpoints.
NextLevelApex is hardened around least privilege and trust-boundary control:
- Task provenance gates block untrusted module execution.
- Remediation shell actions are allowlisted (no arbitrary shell payload execution).
install-sudoersvalidates interface and username formats, renders deterministic sudoers rules, and validates syntax withvisudobefore install.- Sudoers verification fails closed if
includedircannot be verified non-interactively. - State and reports use atomic writes to reduce corruption risk.
See also:
SECURITY.mdSECURITY_NOTES.md
poetry run pytest -q
poetry run ruff check .
poetry run black --check .
poetry run isort --check-only .
poetry run mypy .Poetry creates a separate virtualenv for each project path. When using git worktree, each worktree needs its own poetry install:
git worktree add ../my-worktree main
cd ../my-worktree
bash scripts/dev-setup.sh # installs Poetry deps + dashboard depsOr manually:
poetry install # Python deps + nlx entrypoint
npm --prefix dashboard ci # dashboard depsWithout this, you will see:
Warning: 'nlx' is an entry point defined in pyproject.toml, but it's not installed as a scriptModuleNotFoundError: No module named 'typer'(or other deps)
ModuleNotFoundErrorfor dependencies:- Run
poetry installthen usepoetry run ...or activate Poetry's environment. - In a git worktree, you must run
poetry installin each worktree separately.
- Run
Warning: 'nlx' is an entry point ... not installed as a script:- Run
poetry installto register the entrypoint.
- Run
install-sudoerscannot verifyincludedir:- Run
sudo visudoand ensure one of these exists:#includedir /private/etc/sudoers.d#includedir /etc/sudoers.d
- Run
- Selective task execution:
- Use
--taskfilters to target specific tasks.
- Use
See CONTRIBUTING.md for branching, checks, and PR expectations.
This project is licensed under the MIT License. See LICENSE.