Skip to content

Development & Debugging

Inspecting logs

You can inspect basic logs from oterm by invoking the log viewer with ^ Ctrl+l or by using the command palette. This is particurly useful if you want to debug tool calling.

Log viewer oterm's internal log viewer showing the Brave Search MCP tool in action.

Setup for development

  • Create a virtual environment
    uv venv
    
  • Activate the virtual environment

    source .venv/bin/activate
    # or on Windows
    source .venv\Scripts\activate
    

  • Install oterm

    uv pip install oterm
    
    or checkout the repository and install the oterm package from source
    git clone git@github.com:ggozad/oterm.git
    uv sync
    

Debugging

  • In order to inspect logs from oterm, open a new terminal and run:

    source .venv/bin/activate
    textual console -x SYSTEM -x EVENT -x WORKER -x DEBUG
    
    This will start the textual console and listen all log messages from oterm, hiding some of the textual UI messsages.

  • You can now start oterm in debug mode:

    source .venv/bin/activate
    textual run -c --dev oterm
    

Documentation

oterm uses mkdocs with material to generate the documentation. To build the documentation, run:

source .venv/bin/activate
mkdocs serve -o
This will start a local server and open the documentation pages in your default web browser.