diff options
| author | blasty <blasty@local> | 2026-07-09 12:05:24 +0200 |
|---|---|---|
| committer | blasty <blasty@local> | 2026-07-09 12:05:24 +0200 |
| commit | 8d67549eaa927c7ffc48c57f3ebc438c0fe7da09 (patch) | |
| tree | a310556afc303c444f184fdc8fca28843e19f54d /idatui/tui.py | |
| parent | keep idle workers alive: bump_idle_ttl + KeepAlive heartbeat (diff) | |
| download | ida-tui-8d67549eaa927c7ffc48c57f3ebc438c0fe7da09.tar.gz ida-tui-8d67549eaa927c7ffc48c57f3ebc438c0fe7da09.tar.xz ida-tui-8d67549eaa927c7ffc48c57f3ebc438c0fe7da09.zip | |
Phase 1 TUI: two-pane functions<->disasm, virtualized listing, nav backbone
- idatui/app.py: keyboard-first Textual app
* FunctionsPanel: lazy-streamed function list (DataTable) with glob filter
* DisasmView: line-VIRTUALIZED ScrollView -- paints from domain block cache,
background-fetches misses, prefetches neighbors. Proven: 52,120-insn func,
jump-to-bottom in 0.31s with only ~6 blocks (~1.5k lines) ever materialized.
* address-history nav stack (Enter follow / Esc back); goto by name or 0xADDR
* bump_idle_ttl + KeepAlive on startup so the session never idles out
* all MCP work on Textual worker threads; UI never blocks
- idatui/tui.py: launcher (python -m idatui.tui / console script 'idatui')
- tests/test_tui.py: headless Pilot test, 9/9 (boot, load 10k funcs, open,
scroll, bg-cache, goto-bottom, filter)
- pyproject: textual extra + idatui script entry
Diffstat (limited to 'idatui/tui.py')
| -rw-r--r-- | idatui/tui.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/idatui/tui.py b/idatui/tui.py new file mode 100644 index 0000000..3fc7edd --- /dev/null +++ b/idatui/tui.py @@ -0,0 +1,23 @@ +"""Launcher: python -m idatui.tui [--url URL] [--db SESSION] [--no-keepalive]""" +from __future__ import annotations + +import argparse +import os + +from .app import IdaTui +from .client import DEFAULT_URL + + +def main(argv: list[str] | None = None) -> int: + p = argparse.ArgumentParser(prog="idatui", description="Minimal TUI for IDA over MCP") + p.add_argument("--url", default=os.environ.get("IDA_MCP_URL", DEFAULT_URL)) + p.add_argument("--db", default=os.environ.get("IDA_MCP_DB")) + p.add_argument("--no-keepalive", action="store_true", + help="Do not bump idle-TTL / run the keepalive heartbeat") + args = p.parse_args(argv) + IdaTui(url=args.url, db=args.db, keepalive=not args.no_keepalive).run() + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) |
