SmartCLI — drive terminal TUIs
Let agents drive vim, htop, lazygit: send keys, wait on screen state, read the rendered cell grid.
Connector by dwgx · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/dwgx-smartcli
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.
- Tools
- 8 read · 5 write · 1 delete
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Tools by what they do 14
Read from the source code; the running server may list different tools.
Read 8 · Look things up without changing anything.
alivelist_sessionssnapshotwait_anywait_changewait_readywait_regexwait_visual_change
Write 5 · Create, change, send or run things.
resizesend_keyssend_linesend_textstart
Delete 1 · Delete, drop, revoke or wipe things.
close
Network hosts it talks to 10
a1k0n.net· found in codedwgx.github.io· found in codefiles.pythonhosted.org· found in codegithub.com· found in codegitlab.com· found in codeiquilezles.org· found in codejsonlines.org· found in codelodev.org· found in codepypi.io· found in codetannerhelland.com· found in code
Files it touches
~/.claude/skills- Your home directory (~)
D:\\Project\\SmartCLID:\\Project\\SmartCLI\\tools\\agentcli\\out\\screens\\confirm.pngD:\\Project\\SmartCLI\\tools\\agentcli\\out\\screens\\external_codex.pngD:\\Project\\SmartCLI\\tools\\agentcli\\out\\screens\\menu_select.pngD:\\Project\\SmartCLI\\tools\\agentcli\\out\\screens\\progress.pngD:\\Project\\SmartCLI\\tools\\agentcli\\out\\screens\\repl.pngD:\\Project\\SmartCLI\\tools\\agentcli\\out\\screens\\search_filter.pngD:\\Project\\SmartCLI\\tools\\agentcli\\out\\screens\\subagents.png- Any path the agent passes to its tools
Tools (14)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
aliveCheck if aliveread-onlyCheck whether the session's child process is still running.
closeClose a sessioncan change or delete dataTerminate a session and its daemon. Always close sessions when done.
list_sessionsList active sessionsread-onlyList active drive-tui sessions. Returns {"ok", "sessions"}: each entry carries "sid", "port", "pid", "cmd", "cols", "rows", "cwd" and "started".
resizeResize the terminalResize the session's terminal to cols x rows.
send_keysSend key tokensSend key tokens, e.g. ["Down", "Down", "Enter"], ["C-c"], ["M-x"]. Named tokens: Enter, Return, Tab, BackTab, Space, Backspace, Delete, Escape, Esc, Up, Down, Right, Left, Home, End, PageUp, PageDown, Insert, F1-F12. Combos: "C-<char>" or "^<char>" (Ctrl — letters plus @, Space, [, \, ]) and "M-<char>" (Meta/Alt, ESC prefix). Any other token is not an error — it is typed as literal text. Arrow keys adapt to the app's cursor-key mode (SS3 under DECCKM, CSI else), so menu navigation works in curses apps.
send_lineType a lineType text followed by Enter — the common 'run this command' action.
send_textType textType literal text into the session (no Enter). Use for filling fields.
snapshotSnapshot the screenread-onlyRead a semantic snapshot of the session's current screen. Returns {"ok", "alive", "alt_screen", "text", "hash", "visual_hash"}: `alt_screen` is true while a full-screen program (vim, less, htop, ...) owns the screen — keys are commands to that program, not input to a shell, and `text` is its frame rather than scrollback. `text` is the rendered screen; `json` (the structured cell/cursor model) is included only when as_json=true. `hash` covers text content only — use it as the wait_change baseline; `visual_hash` also covers styling, selection and cursor state — use it as the wait_visual_change …
startStart a TUI sessionSpawn a program in a new detached, persistent session and return its id. The session survives across tool calls (a localhost-only daemon owns the live PtySession). `cmd` is the command line to spawn, e.g. "python3" or "lazygit". `cwd` and `env` configure only the controlled child process. Returns {"ok", "sid"} on success. Use the returned sid for every other tool. Server-side limits (violations return an error): at most 8 concurrent sessions by default (tunable via SMARTCLI_MAX_SESSIONS); `sid` must be 1-64 chars matching [A-Za-z0-9][A-Za-z0-9_.-]*; `env` keys must be valid identifiers and m…
wait_anyWait for any of several patternsread-onlyWait for ANY of `patterns` to appear on screen (pexpect expect([...]) style). Race several possible outcomes at once — e.g. patterns=[">>> ", "Error", "Password:"] — and learn WHICH happened. Patterns are scanned in list order each poll, so the earliest in the list wins a same-poll tie (put the most specific first). Screen lines are right-padded with spaces — end-anchored patterns never match; use unanchored markers. Returns {"ok", "index", "matched", "alive", "exited", "text", "json"} where `index` is the 0-based position of the matched pattern. Timeout is not an error: the call returns ok=t…
wait_changeWait for the screen to changeread-onlyBlock until the screen content changes, then snapshot. The precise "did my action land?" primitive: call it right after send_line/ send_keys to wait for ANY change from the baseline (default: the screen at call time; or pass a prior `hash` to change away from). Returns {"ok", "changed", "hash", "alive", "exited", "text", "json"} — `hash` is the new screen hash, reusable as the next baseline. Timeout is not an error: the call returns ok=true with changed=false plus the final screen snapshot. `exited` is true only on a `detect_child_exit` session whose child died first. Can't false-positive on …
wait_readyWait for readinessread-onlyWait for a regex `marker` OR for the screen to go quiet (stable), then snapshot. Use marker="" to wait purely for stability. Returns a snapshot plus `reason`: "MARKER" (the regex appeared), "STABLE" (the screen went quiet), "TIMEOUT", or — only on a session started with `detect_child_exit` — "EXITED" (the child died; the wait returned at once rather than running to `max_wait_ms`). `exited` reports the same fact as a boolean on every wait tool. Timeout is not an error: the call still returns ok=true with the final screen snapshot. Screen lines are right-padded with spaces — end-anchored marker…
wait_regexWait for a regexread-onlyBlock until `pattern` (a regex) appears on screen, then snapshot. Returns {"ok", "matched", "alive", "exited", "text", "json"}. Timeout is not an error: the call returns ok=true with matched=false plus the final screen snapshot. `exited` is true only when the session was started with `detect_child_exit` AND the child died before the pattern appeared, in which case the wait returned at once instead of running to `timeout_ms`. Screen lines are right-padded with spaces — end-anchored patterns never match; use unanchored markers. This is the readiness sync — prefer it over a blind delay after sen…
wait_visual_changeWait for a visual screen changeread-onlyWait for text, selection styling, or cursor position to change. Prefer this after arrow/navigation keys in full-screen TUIs. Pass a prior `visual_hash`, or omit it to use the current rendered state as the baseline. Timeout is not an error: the call returns ok=true with changed=false plus the final screen snapshot, with `exited` true only on a `detect_child_exit` session whose child died first.
Signals
- Stars
- 5
- Forks
- 0
- Open issues
- 0
- Weekly downloads
- 68
- Last commit
- Oct 11, 2026 (17 days ago)
- Last release
- Oct 11, 2026 (17 days ago)
- Last package publish
- Oct 11, 2026 (17 days ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.dwgx/smartcli- Version
- 0.3.5
- Auth
- No auth
- Packages
- pypi smartcli-toolkit
- License
- MIT
- Repository
- github.com/dwgx/SmartCLI
- First seen
- Oct 24, 2026
- Last checked
- Oct 25, 2026
More from dwgx
Cite this page
SmartCLI — drive terminal TUIs MCP server. Agent Mart. https://agentmart.dev/connectors/dwgx-smartcli (last updated 2026-10-25)