How krotrn/apsta works
apsta is a Linux AP+STA Wi-Fi hotspot manager, exposed through a CLI and GTK desktop app. The main workflow is to inspect Wi-Fi hardware and channel constraints, resolve configuration into a hotspot method, apply network changes, and persist runtime state so the hotspot can be inspected and stopped. The README also documents client controls, boot/resume recovery, QR sharing, and a GUI. Several relationships below are supported by README statements; unsampled modules are represented only at their documented subsystem level.
Main entry points: hotspot.py Hotspot lifecycle · cli.py CLI router · detect.py Hardware detection · clients.py Client commands
Components 24
User interfaces
- CLI router
apsta_cli/cli.py - Config and profiles
apsta_cli/cmd/config.py - Hardware detection
apsta_cli/cmd/detect.py - Hotspot commands
apsta_cli/cmd/hotspot.py - Status and QR
apsta_cli/cmd/status.py - Client commands
apsta_cli/cmd/clients.py
Configuration and detection
- Config store
apsta_cli/config/store.py - Config model
apsta_cli/config/model.py - Wi-Fi interfaces
apsta_cli/hw/interfaces.py - Radio capability
apsta_cli/hw/capability.py - Channel planning
apsta_cli/net/channels.py
Hotspot networking
- Hotspot lifecycle
apsta_cli/services/hotspot.py - Method strategies
apsta_cli/net/strategies.py - Network setup
apsta_cli/net
Runtime management
- Runtime state
apsta_cli/state.py - Recovery watcher
apsta_cli/services/watch.py - Boot integration
apsta_cli/services/autostart.py - Client management
apsta_cli/net/clients.py
Desktop app
- GTK application
apsta_gui/app.py - GUI backend
apsta_gui/backend.py - GUI pages
apsta_gui/pages - GTK compatibility
apsta_gui/compat.py
Other components
- User
- Linux networking
Connections 31
- User → CLI router: runs commands
- CLI router → Hotspot commands: routes hotspot
apsta_cli/cli.py - CLI router → Hardware detection: routes detect
apsta_cli/cli.py - CLI router → Config and profiles: routes config
apsta_cli/cli.py - CLI router → Status and QR: routes status
apsta_cli/cli.py - CLI router → Client commands: routes clients
apsta_cli/cli.py - Config and profiles → Config store: reads and writes
- Config store → Config model: validates fields
apsta_cli/config/store.py - Hardware detection → Radio capability: checks capability
apsta_cli/cmd/detect.py - Hardware detection → Wi-Fi interfaces: lists interfaces
apsta_cli/cmd/detect.py - Radio capability → Wi-Fi interfaces: inspects radios
apsta_cli/hw/capability.py - Hotspot commands → Hotspot lifecycle: starts or stops
- Hotspot lifecycle → Config store: loads settings
apsta_cli/services/hotspot.py - Hotspot lifecycle → Wi-Fi interfaces: selects interface
apsta_cli/services/hotspot.py - Hotspot lifecycle → Radio capability: checks support
apsta_cli/services/hotspot.py - Hotspot lifecycle → Channel planning: plans channel
apsta_cli/services/hotspot.py - Hotspot lifecycle → Method strategies: tries methods
apsta_cli/services/hotspot.py - Method strategies → Network setup: configures networking
apsta_cli/net/strategies.py - Network setup → Linux networking: applies changes
- Hotspot lifecycle → Runtime state: saves result
apsta_cli/services/hotspot.py - Status and QR → Hotspot lifecycle: gets status
- Recovery watcher → Hotspot lifecycle: recovers hotspot
apsta_cli/services/watch.py - Boot integration → Hotspot lifecycle: starts at boot
apsta_cli/services/hotspot.py - Client commands → Hotspot lifecycle: checks running
apsta_cli/cmd/clients.py - Client commands → Client management: manages clients
apsta_cli/cmd/clients.py - Client management → Linux networking: queries or limits
apsta_cli/net/clients.py - User → GTK application: uses desktop app
- GTK application → GUI backend: uses backend
apsta_gui/app.py - GTK application → GUI pages: shows pages
- GUI pages → GTK compatibility: uses widgets
apsta_gui/pages/hotspot.py - GUI backend → Hotspot lifecycle: controls hotspot