Bonsai_term is a library for building Terminal User Interfaces (TUIs) using OCaml with a reactive programming model similar to bonsai_web. It provides a complete framework for handling terminal input/output, event processing (keyboard, mouse, resize), rendering views, and managing application state. The architecture follows a functional reactive pattern with clear separation between event handling, state management, rendering, and the main run loop. Key entry points are the start functions in loop.ml which take an application function defining the view and event handler. The system processes terminal events through an event queue, applies user-defined handlers to produce effects, and renders incremental view updates at a target frame rate.