How themazyworlds/powerls works
Purpose and Runtime
powerls is a Linux terminal directory explorer, positioned as a colorful C++20 replacement for ls. It builds a native command-line executable (pls); there is no server, web tier, or persistent data store.
Core application entry point:
• src/main.cpp
Application Boundary
The program’s runtime behavior is concentrated in one translation unit:
• src/main.cpp
This file is the executable entry point and therefore owns CLI invocation, filesystem inspection, terminal-oriented formatting/color output, and process exit behavior. The application boundary is the local filesystem and terminal: users invoke the binary, it reads directory metadata, then writes a rendered listing to standard output.
Build and Artifact Generation
CMake defines the native build graph and executable target:
• CMakeLists.txt
• src/main.cpp
A C++20-capable compiler plus CMake and a generator such as Make or Ninja are required. Release builds produce the pls binary, which the README describes installing under ~/.local/bin.
Distribution Packaging
The repository supports Linux distribution through parallel package definitions rather than application-specific installers:
• debian/control
• debian/rules
• packaging/arch/powerls/PKGBUILD
Debian packaging uses standard debhelper metadata and rules. Arch packaging is represented by an AUR-oriented PKGBUILD plus generated package metadata:
• packaging/arch/powerls/.SRCINFO
• packaging/arch/powerls/PKGBUILD
These layers consume the built native artifact and establish OS-level installation, dependency, and versioning boundaries.
Release Pipeline
GitHub Actions automates release production and publication:
• .github/workflows/release.yml
• CMakeLists.txt
• debian/rules
The release flow builds with CMake/Ninja, creates a portable Linux x86_64 tarball, builds a Debian .deb, creates/uploads GitHub Release assets, and synchronizes Arch package metadata downstream. External services are GitHub Actions, GitHub Releases, and Arch/AUR infrastructure accessed through SSH.
Versioning and Release Inputs
Debian release version history is maintained separately from the C++ source:
• debian/changelog
• debian/control
The release workflow and packaging definitions must remain aligned on artifact name, version, architecture, and install location. Arch’s .SRCINFO is a derived AUR-facing representation of the PKGBUILD, while Debian’s changelog/rules/control form its source-package contract.
Operational Flow
1. User or CI invokes CMake against CMakeLists.txt.
2. The compiler builds src/main.cpp into the CLI executable.
3. The executable enumerates a requested/local directory and emits styled terminal output.
4. Packaging layers wrap that executable as Debian, Arch, or portable archive artifacts.
5. The release workflow publishes artifacts and updates the AUR package repository.
Main entry points: release.yml Release workflow · main.cpp pls executable · rules Debian build rules · CMakeLists.txt CMake build graph
Components 16
CLI Runtime
- Terminal user
- pls executable · Lists local directories with terminal styling.
src/main.cpp - Local filesystem
- Standard output
Native Build
- CMake build graph
CMakeLists.txt - C++20 compiler
- Built pls binary
Distribution Packaging
- Debian package contract · Defines dependencies and release version history.
debian/control - Debian build rules
debian/rules - Debian .deb
- Arch PKGBUILD
packaging/arch/powerls/PKGBUILD - AUR .SRCINFO
packaging/arch/powerls/.SRCINFO
Release Automation
- Release workflow · Builds, packages, publishes, and syncs Arch metadata.
.github/workflows/release.yml - Linux x86_64 tarball
- GitHub Releases
- Arch/AUR infrastructure · Receives package metadata through SSH.
Connections 17
- Terminal user → pls executable: invokes
- pls executable → Local filesystem: enumerates
- pls executable → Standard output: renders listing
- CMake build graph → C++20 compiler: configures build
- C++20 compiler → Built pls binary: compiles src/main.cpp
- Built pls binary → pls executable: is runtime artifact
- Debian package contract → Debian build rules: defines package contract
- Built pls binary → Debian build rules: packaged by
- Debian build rules → Debian .deb: builds
- Built pls binary → Arch PKGBUILD: package input
- Arch PKGBUILD → AUR .SRCINFO: generates
- Release workflow → CMake build graph: runs CMake/Ninja
- Release workflow → Linux x86_64 tarball: creates
- Release workflow → Debian .deb: builds
- Release workflow → GitHub Releases: uploads assets
- Release workflow → Arch/AUR infrastructure: syncs metadata
- AUR .SRCINFO → Arch/AUR infrastructure: AUR-facing metadata