原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

SmartCLI — drive terminal TUIs

作者:dwgx版本 0.3.5i★ –i在你的电脑上运行
注册名称io.github.dwgx/smartcli

安装

概览

作者提供的说明(英文原文)

Let agents drive vim, htop, lazygit: send keys, wait on screen state, read the rendered cell grid.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你需要

  • PyPI已安装 Python 的 uv(用于 uvx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "smartcli": {
      "command": "uvx",
      "args": [
        "smartcli-toolkit"
      ]
    }
  }
}

在终端中运行这条命令

claude mcp add smartcli -- uvx smartcli-toolkit

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "smartcli": {
      "command": "uvx",
      "args": [
        "smartcli-toolkit"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "smartcli": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "smartcli-toolkit"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 dwgx 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32461 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32461 个服务器的 60% 更新
  • 基础检查结果等于或优于此分类中其他 32461 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

SmartCLI — drive terminal TUIs 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.3.5)于26天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, dotnet-mcp

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211昨天更新
安装

dotnet-mcp

作者:Skymly

MCP server for .NET symbols, XAML, source generators, and restricted workspace edit

在你的电脑上运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Python · MIT · ★4

docs · PyPI

SmartCLI

*Read this in: English · 简体中文 · 繁體中文 · 日本語 · 한국어*

A local Python toolkit for driving, perceiving, and rendering the terminal — three agent skills over one pluggable PTY + `pyte` core.

Let an AI drive, perceive, and render real terminal programs. SmartCLI reads the actual screen with a pyte cell model — not a byte pipe — so it knows which menu row is highlighted, presses the right keys, and waits for the screen to settle. Below: it drives the real lazygit TUI end-to-end (arrow-key navigation, opening a commit diff, highlighting a branch) — no script, no mock.

pip install smartcli-toolkit

Requires Python 3.10 or newer. The install includes the shared Python library, the persistent TUI driver, and the stdio MCP server.

Drive something in 30 seconds

Copy-paste this. It starts a real Python REPL under a PTY, waits for the prompt (never a blind sleep), types into it, and reads the screen back:

pip install smartcli-toolkit

SID=$(smartcli-tui start --cmd "python3 -i -q" --cols 80 --rows 24 --json | python3 -c "import json,sys;print(json.load(sys.stdin)['sid'])") smartcli-tui wait-regex --id $SID ">>> " --timeout-ms 15000 smartcli-tui send-line --id $SID "print(6*7)" smartcli-tui wait-regex --id $SID "42" # prints the cell grid it sees smartcli-tui close --id $SID

On Windows use --cmd "py -i -q". Swap the command for vim, htop or lazygit and the same five verbs drive those too — that is the whole point: `wait-regex` and friends react to what the screen actually shows, so an agent never guesses whether its keystroke landed.

Want the same thing against a real editor, end to end and verifiable? examples/drive_vim.py drives the actual vim binary — opens a file, appends a line, saves, and then checks the filesystem, not the screen:

python examples/drive_vim.py

[OK ] vim painted its screen

[OK ] file contents visible on screen

[OK ] alternate screen is active

[OK ] vim entered insert mode (so G and o both landed)

[OK ] typed text appears on screen

[OK ] vim restored the main screen on exit

[OK ] file on disk really changed

Note the fourth step. It is there because the example itself once sent five keystrokes back to back with nothing between them, and under load vim had not processed G by the time o arrived, so nothing was inserted and the run failed with no useful diagnosis. Confirming insert mode proves both keys landed — the same discipline the tool exists to provide, applied to its own demo.

Run the same file against smartcli-toolkit==0.1.8 and two steps fail — and the file is *never saved*, because a driver that cannot see the alternate screen mistimes the :wq. That is why the emulation work below matters: a wrong screen model does not error, it silently succeeds at nothing.

Already running an MCP client (Claude Code, Cursor, VS Code)? The same verbs are MCP tools, with the per-session token attached for you:

smartcli-mcp        # stdio MCP server; or `uvx --from smartcli-toolkit smartcli-mcp`

What & why

SmartCLI is a workspace for terminal work that agents and humans both do: driving interactive terminal programs, perceiving what a screen actually shows, and rendering visuals and layouts back out. It is built on one shared, pluggable PTY backend plus a pyte screen model — chosen over screenshot/vision so a single structured screen model feeds both perception (read the screen) and rendering (draw the screen). The PTY layer is intentionally not tmux-bound: local dev runs on Windows via ConPTY (pywinpty), while target programs can run under POSIX ptys or tmux elsewhere. Three skills sit on that core, each a self-contained tool you run in place from the checkout.

Driving a real TUI

The demo above is SmartCLI driving lazygit — a real full-screen curses app — through its perceive → act → confirm loop: it reads the pyte cell grid (which row is selected, the alt-screen diff), moves with arrow keys, opens a commit's diff, and highlights a branch. Captured by driving the actual program in a Linux container, not scripted or mocked. A byte-stream matcher like pexpect can't perceive "which row is highlighted"; a screen model can.

How we know the perception is right. A screen model is only useful if it matches what a real terminal shows, so we measure that instead of asserting it: identical bytes go to a real tmux pane and to our model, and the two cell grids are diffed. Three suites do it — 34 curated cases, a three-way check that only trusts a behaviour when **tmux *and* GNU screen agree, and a generative fuzz over random VT sequences. That campaign found and fixed 12 emulation bugs**, including the alternate screen buffer (pyte implements none of modes 1049/1047/47, so a full-screen program's output used to be painted over the main screen and never restored). Scope and remaining edges: LIMITATIONS.md.

Live effects

Real captures of the cmd-art fx engine — each GIF is the actual effect rendered frame-by-frame through the project's own pipeline (no screen recorder). Reproduce any with python -m fx play (see Quickstart).

solarsystem — an orrery: planets on elliptical orbits around a pulsing sun

donut — the classic ASCII torusfire — demoscene heat fieldrain — Matrix digital rain

🌐 [Explore the live showcase →](https://dwgx.github.io/SmartCLI/) — play with

the effect engine, drive a menu with arrow keys, and poke the widgets, right in

your browser.

Install

Just want the three Claude Code skills? Download one zip, unzip it, done — no git, no pip, no marketplace:

curl -LO https://github.com/dwgx/SmartCLI/releases/latest/download/smartcli-skills.zip
unzip smartcli-skills.zip -d ~/.claude/skills/

That gives you cmd-art, drive-tui and tui-ui (309 KiB total). cmd-art and tui-ui then work with nothing but CPython 3.10+ — verified on a bare virtualenv, all 30 effects and all 17 widgets load. drive-tui additionally needs pyte, which the PyPI install below provides. Or install all three via the plugin marketplace: /plugin marketplace add dwgx/SmartCLI.

Primary — from PyPI (the library, the CLI, and the MCP server):

pip install smartcli-toolkit

Distribution vs import name: the PyPI distribution is smartcli-toolkit

(the names smartcli / smart-cli were taken or blocked), but the importable

package is smartcli_core. So after pip install smartcli-toolkit you still

write from smartcli_core import PtySession.

Alternative — reproduce the full dev environment from a source checkout:

git clone https://github.com/dwgx/SmartCLI SmartCLI

cd SmartCLI python -m pip install -r requirements.txt

requirements.txt installs pyte, the MCP SDK, and pywinpty on Windows only (POSIX uses the stdlib pty backend). pip install . installs smartcli_core plus the smartcli-tui, smartcli-mcp, and smartcli-toolkit commands. The visual cmd-art and tui-ui skills still run in place from a checkout via python -m fx and python -m ui.

Optional extras (real FIGlet fonts, raster images, authoritative cell widths — all degrade gracefully to stdlib fallbacks when absent):

python -m pip install -r requirements-optional.txt

or, from the checkout, via pyproject extras:

pip install ".[all]" # pyfiglet + Pillow + wcwidth pip install ".[art]" # pyfiglet only pip install ".[image]" # Pillow only (also: the PNG screenshot harness needs it) pip install ".[width]" # wcwidth only

Windows note: set UTF-8 output before running any skill so box-drawing and CJK glyphs encode cleanly (the CLIs also auto-reconfigure stdout, but set this to be safe):

set PYTHONIOENCODING=utf-8

Verified dep versions on the dev box (Windows 11, CPython 3.14.6): pyte 0.8.2, pywinpty 3.0.5, pyfiglet 1.0.4, Pillow 12.2.0, wcwidth 0.8.1.

Diagnostics. python -m smartcli_core prints your OS, Python, terminal, PTY backend, and dependency versions. smartcli-tui doctor reports where the core was loaded from and whether drive dependencies are present. Include both outputs when filing a terminal-sensitive bug.

Quickstart

cmd-art — terminal visual effects
cd skills/cmd-art

python -m fx list # list all 30 effects python -m fx play donut --seconds 5 # play one effect (bounded) python -m fx gallery # one frame of each effect python -m fx show --seq "donut:fire:3,plasma::3"

tui-ui — cell-accurate terminal UI
cd skills/tui-ui

python -m ui widgets # list all 17 widgets python -m ui gallery --width 100 --height 30 python -m ui demo table --width 80 --height 12 --theme dashboard

drive-tui — perceive & drive interactive programs

Persistent-session CLI (state survives across shell calls):

smartcli-tui start --cmd "python3 -i -q" --cols 80 --rows 24

smartcli-tui wait-regex --id ">>> " --timeout-ms 15000 smartcli-tui send-line --id "print(6*7)" smartcli-tui snapshot --id smartcli-tui close --id

On Windows use py -i -q as the child command. From a source checkout, replace smartcli-tui with python skills/drive-tui/scripts/tui.py.

Or drive from any MCP client — the same verbs as MCP tools, with the per-session token attached automatically:

pip install smartcli-toolkit

smartcli-mcp # stdio MCP server; smartcli-toolkit is an equivalent alias

A

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx