The terminal was silent except for the blink of the cursor, waiting for your command. You type, run, and the interface comes alive—Ncurses handling the UI, Open Policy Agent (OPA) enforcing the rules. Tight. Fast. Reliable.
Ncurses lets you build text-based user interfaces that feel instant, even over SSH. It manages windows, forms, menus, and input without the overhead of graphical frameworks. Its C API is small, efficient, and battle-tested.
Open Policy Agent is the policy engine that decouples decision-making from your application code. It evaluates rules written in Rego, returning simple allow or deny responses—or complex structured decisions—based on real-time data. OPA runs as a sidecar, daemon, or library, making it language-agnostic.
Together, Ncurses and OPA create a secure, responsive CLI that enforces rules in real time. Use Ncurses to handle display and user interaction. Pass context—like user role, command, or system state—to OPA for evaluation. Let OPA decide. Ncurses reflects the result immediately.