Skip to content

[DEV] Better Terminal UI#31

Merged
MatrixEditor merged 32 commits intomasterfrom
feat/repl-ui
Mar 15, 2026
Merged

[DEV] Better Terminal UI#31
MatrixEditor merged 32 commits intomasterfrom
feat/repl-ui

Conversation

@MatrixEditor
Copy link
Copy Markdown
Owner

@MatrixEditor MatrixEditor commented Mar 15, 2026

TUI 2.0

This pull request introduces a new Terminal User Interface (TUI) with runtime introspection capabilities, along with various improvements to the codebase structure and tooling.

demo

Major New Features

Terminal User Interface (TUI) with Runtime Introspection

A comprehensive terminal-based interface has been introduced, providing interactive runtime introspection and control capabilities:

  • REPL Commands: Added a full set of commands for runtime inspection and management:

    • env: Inspect environment variables and runtime state
    • ip: Display network interface and IP configuration information
    • config: View and modify global configuration settings
    • proto: Manage and inspect protocol modules
    • db: Database interaction and query commands with completion support
    • Service management commands to start/stop services dynamically
  • Interactive Features:

    • Inline completion support for enhanced usability
    • Command completion for database operations
    • Error handling improvements for unexpected runtime issues
  • Runtime Introspection: The TUI enables deep inspection of the running Dementor instance, allowing users to:

    • Monitor active services and their status
    • Examine protocol configurations in real-time
    • Query captured data and credentials
    • Adjust settings without restarting

Codebase Improvements

  • Protocol Modules: Transitioned to class-style protocol modules for better organization
  • Server Architecture: Added async server threads for SMTP and QUIC protocols
  • Configuration Management: Moved interface settings into SessionConfig for centralized management
  • Import Organization: Comprehensive import cleanup and organization across the codebase
  • Documentation: Updated CLI reference and added comprehensive TUI documentation
  • Server Utilities: Added getters for current server address and port information
  • Protocol Updates: Updated QUIC and SMTP protocols to reflect BaseServerThread changes
  • Documentation: Added docstrings to BaseProtocolModule and other core components

Bug Fixes

  • Improved error handling and logging throughout the application
  • Updated dependencies and build configurations
  • Code cleanup and formatting improvements

+ add base classes for ServerThreads
+ Update all protocol modules to use a class-style definition instead
+ QUIC: add support for dynamic self-signed certificate
+ SessionConfig: debug mode is now actively stored in a variable
+ banner update
+ refactor imports in dementor.loader
+ remove obsolete REPL version
+ Add db export function
+ Add function to list hosts and credentials
+ Add command to cleanup the existing database
+ Remove deprecated CreateServersFunc
+ standalone: use SessionConfig.set_interface
+ ReplAction: add new method get_completions
+ 'proto' command now supports:
  - starting and stopping services
  - reloading protocol modules
  - changing the runtime config of services
  - inline completions
@MatrixEditor MatrixEditor self-assigned this Mar 15, 2026
@MatrixEditor MatrixEditor added Dependencies Pull requests / Issues related to dependency updates Type - Enhancement labels Mar 15, 2026
@MatrixEditor MatrixEditor added the TUI Issues or pull requests related to the CLI or TUI label Mar 15, 2026
@MatrixEditor MatrixEditor merged commit d4938d9 into master Mar 15, 2026
7 checks passed
@MatrixEditor MatrixEditor deleted the feat/repl-ui branch March 15, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dependencies Pull requests / Issues related to dependency updates TUI Issues or pull requests related to the CLI or TUI Type - Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant