tui-test

Из публичных источников

💻 управление, запись и тестирование любого TUI-приложения / CLI в популярных терминалах — делает терминал полностью доступным для ИИ

Машинный перевод · Показать оригинал

💻 control, record, & test any tui app / cli with popular terminals - makes the terminal fully accessible to AI

AI SkillКатегория: AI-навыки · Разработка ПО · Тестирование и QAOpen sourceданные проверены 15 окт. 2026 г.

Обзор

  • ai-tools
  • alacritty
  • automation
  • bash
  • cli
  • e2e-testing
  • fish
  • ghostty
  • llm
  • powershell

Установка

Команды только показываются, маркетплейс их не выполняет. Сверяйтесь с официальной документацией.
  • Файлы официального релизаИз публичных источниковиз последнего официального релиза
    github.com/microsoft/tui-test/releases/tag/0.1.1 ↗
  • Сборка из исходниковИз публичных источниковиз метаданных каталога

    Сборка из исходников: проверенного рецепта сборки нет — следуйте инструкциям репозитория.

    github.com/microsoft/tui-test ↗

Совместимость

«Неизвестно» значит, что доказательств не найдено, а не что продукт несовместим.
ПлатформаСтатусАрхитектураДоказательствоУверенность
Claude CodeНеизвестно———
Claude (web & desktop)Неизвестно———
OpenAI CodexНеизвестно———
ChatGPTНеизвестно———
CursorНеизвестно———
GitHub CopilotНеизвестно———
Gemini CLIНеизвестно———
WindowsСовместимоx86_64официальная сборка в релизе 0.1.1: tui-test-native-0.1.1-x86_64-pc-windows-msvc.tar.gz0.70
macOSСовместимоarm64официальная сборка в релизе 0.1.1: tui-test-aarch64-apple-darwin.tar.gz0.70
Совместимоx86_64официальная сборка в релизе 0.1.1: tui-test-native-0.1.1-x86_64-apple-darwin.tar.gz0.70
LinuxСовместимоarm64официальная сборка в релизе 0.1.1: tui-test-aarch64-unknown-linux-gnu.tar.gz0.70
Совместимоx86_64официальная сборка в релизе 0.1.1: tui-test-native-0.1.1-x86_64-unknown-linux-gnu.tar.gz0.70

Релизы

проверено 29 окт. 2026 г.
v0.1.1Последний23 окт. 2026 г.Официальный источник ↗

Файлы версии 0.1.1

Маркетплейс не хранит эти файлы: загрузка идёт из официального источника. Мы их не сканировали.
ФайлПлатформаРазмерSHA-256Скачать из официального источника
tui-test-aarch64-apple-darwin.tar.gzmacos · arm64 · tarball6,1 MBa6819562a180…Официальный источник ↗
tui-test-aarch64-unknown-linux-gnu.tar.gzlinux · arm64 · tarball6,5 MB99588dd2e296…Официальный источник ↗
tui-test-aarch64-unknown-linux-musl.tar.gzlinux · arm64 · tarball6,5 MBf041c826ebf2…Официальный источник ↗
tui-test-go-0.1.1.tar.gzНеизвестно52,9 MBc3f518a709ee…Официальный источник ↗
tui-test-native-0.1.1-aarch64-apple-darwin.tar.gzmacos · arm64 · tarball7,2 MB9ad0aa5953d9…Официальный источник ↗
tui-test-native-0.1.1-aarch64-unknown-linux-gnu.tar.gzlinux · arm64 · tarball7,5 MBf8ccd5fe2c07…Официальный источник ↗
tui-test-native-0.1.1-aarch64-unknown-linux-musl.tar.gzlinux · arm64 · tarball7,5 MB92fa488c0b08…Официальный источник ↗
tui-test-native-0.1.1-x86_64-apple-darwin.tar.gzmacos · x86_64 · tarball7,4 MBaededdca63e3…Официальный источник ↗
tui-test-native-0.1.1-x86_64-pc-windows-msvc.tar.gzwindows · x86_64 · tarball7,7 MB510ab7ebd363…Официальный источник ↗
tui-test-native-0.1.1-x86_64-unknown-linux-gnu.tar.gzlinux · x86_64 · tarball7,8 MB55bec981a8d3…Официальный источник ↗
tui-test-native-0.1.1-x86_64-unknown-linux-musl.tar.gzlinux · x86_64 · tarball7,8 MB2a99f9366f78…Официальный источник ↗
tui-test-x86_64-apple-darwin.tar.gzmacos · x86_64 · tarball6,5 MB298ae3d37549…Официальный источник ↗
tui-test-x86_64-pc-windows-msvc.zipwindows · x86_64 · zip7,1 MB1dfdc80c6394…Официальный источник ↗
tui-test-x86_64-unknown-linux-gnu.tar.gzlinux · x86_64 · tarball6,9 MBae1f32afb34c…Официальный источник ↗
tui-test-x86_64-unknown-linux-musl.tar.gzlinux · x86_64 · tarball6,9 MB7bc4b706abac…Официальный источник ↗
tui-test-go-0.1.1.tar.gz.sha256контрольные суммы91 B210fca3ba326…Официальный источник ↗
tui-test-native-0.1.1-aarch64-apple-darwin.tar.gz.sha256контрольные суммы116 B9c1715d4e1d7…Официальный источник ↗
tui-test-native-0.1.1-aarch64-unknown-linux-gnu.tar.gz.sha256контрольные суммы121 B311dc5a243ab…Официальный источник ↗
tui-test-native-0.1.1-aarch64-unknown-linux-musl.tar.gz.sha256контрольные суммы122 Bdfbd1ff8ae30…Официальный источник ↗
tui-test-native-0.1.1-x86_64-apple-darwin.tar.gz.sha256контрольные суммы115 B3fb01dbdefc1…Официальный источник ↗
tui-test-native-0.1.1-x86_64-pc-windows-msvc.tar.gz.sha256контрольные суммы118 B5cd2a0035158…Официальный источник ↗
tui-test-native-0.1.1-x86_64-unknown-linux-gnu.tar.gz.sha256контрольные суммы120 B934411960395…Официальный источник ↗
tui-test-native-0.1.1-x86_64-unknown-linux-musl.tar.gz.sha256контрольные суммы121 B27af4f606ec0…Официальный источник ↗

История релизов

Профиль качества

алгоритм quality-v1.0 · оценено 15 окт. 2026 г.
Оценка качества91
Оценка риска0
Уверенность 1.00
Оценка качества и оценка риска — разные показатели. Высокое качество не гарантирует безопасность.

Составляющие оценки

Поддержка · 2020
last activity 0 days ago
Документация · 1515
README 15379 chars, description present
Готовность к использованию · 1515
install instructions: yes; releases: yes
Метаданные · 108
3/4 of description, homepage, license, topics
Релизы · 1010
10 release(s), latest 12 days ago
Точность категории · 108
classifier confidence 0.75
Популярность · 106
287 stars (log-dampened, 10k = max)
Ясность лицензии · 55
SPDX MIT
Сообщество · 55
issues enabled, 27 forks

Лицензия

MIT
Лицензия известнапо данным хостинга репозитория

Это статус политики каталога, а не юридическое заключение.

Источники

github.com/microsoft/tui-testОсновной★ 287 звёздактивность 15 окт. 2026 г.Основной репозиторий · Уверенность 1.00

Отзывы

Войдите, чтобы написать отзыв

Отзывов пока нет.

Альтернативы

answer-me-with-htmlПохожий
Answer me with HTML — навык агента, который отвечает на сложные вопросы одной HTML-страницей, которую действительно удобно читать. 让 AI Agent 用一页 HTML 回答复杂问题。MIT · AI-навыки
ospecПохожий
Фреймворк для агентных рабочих процессов на основе спецификаций для ИИ-агентов, пишущих код. Превращайте запрос в проверяемый цикл достижения цели — планирование, действие, проверка — с долговременными спецификациями и доказательствами в вашем репозитории. Работает с Claude Code, Codex, Gemini, OpenCode и обычным CLI.MIT · AI-навыки
awesome-agentic-ai-zhПохожий
Трёхъязычная (традиционный китайский / английский / упрощённый китайский) дорожная карта обучения агентному ИИ: от основ LLM до многоагентных систем, с более чем 240 отобранными ресурсами и практическими примерами. 中文 AI agent 學習地圖。MIT · AI-навыки
claude-skills-marketplaceПохожий
Навыки Claude Code для рабочих процессов разработки ПО — автоматизация Git, тестирование и код-ревьюApache-2.0 · AI-навыки
paperclipПохожий
Открытое приложение, которым все пользуются для управления агентами на работеMIT · AI-навыки
book-to-skillПохожий
Превращает любой техническую книгу в формате PDF в навык Claude Code — готовый к изучению, справке и использованию во время работы.MIT · AI-навыки

README

Из microsoft/tui-test · лицензия MIT · загружено 29 окт. 2026 г.

tui-test

tui-test controls, inspects, tests, and records real shell sessions and full-screen terminal apps on Windows, Linux, and macOS. Use it from the CLI or call the same engine from Rust, Python, JavaScript, or Go. It works for AI agents that need structured access to terminal state, terminal automation, and terminal ui application testing.

Installation

CLI

Homebrew
brew tap microsoft/tui-test https://github.com/microsoft/tui-test
brew install tui-test
Install script

macOS and Linux:

curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/microsoft/tui-test/main/install/install.sh | sh

Windows:

irm https://raw.githubusercontent.com/microsoft/tui-test/main/install/install.ps1 | iex

You can also download a binary from GitHub Releases.

Libraries

LanguageInstallReference
Rust 1.90+cargo add tui-test-rs@0.1.1docs.rs
Python 3.8+pip install tui-testPython API
Node 20+npm install @microsoft/tui-testJavaScript API
Go 1.26+go get github.com/microsoft/tui-test/bindings/go@v0.1.1Go API

Add the Rust recording-raster feature for APNG, GIF, and MP4 output. It uses installed fonts; recording-font-jetbrains-mono* bundles a font.

Go, Python, and JavaScript use one native adapter crate. All three use its generated C ABI declarations through purego, ctypes, and Koffi, respectively. Set TUI_TEST_NATIVE_LIBRARY to select a matching library explicitly.

Quick start

The CLI and libraries expose the same terminal actions. Python, JavaScript, Rust, and Go sessions run in-process and do not require the CLI. Released Go modules include the native engine; see Go installation for supported platforms and Linux runtime requirements.

CLI

tui-test run my-app
tui-test expect text "Ready"
tui-test click text "Continue"
tui-test expect text "Done"
tui-test screenshot -o result.svg
tui-test close

Python

import asyncio
from tui_test import TuiTest

async def main():
    async with TuiTest.ephemeral() as terminal:
        await terminal.run("my-app")
        await terminal.get_by_text("Ready").expect()
        await terminal.get_by_text("Continue").click()
        await terminal.get_by_text("Done").expect()

asyncio.run(main())

Python API reference

JavaScript

import { TuiTest } from "@microsoft/tui-test";

const terminal = TuiTest.ephemeral();

try {
  await terminal.run("my-app");
  await terminal.getByText("Ready").expect();
  await terminal.getByText("Continue").click();
  await terminal.getByText("Done").expect();
} finally {
  await terminal.closeQuiet();
}

JavaScript API reference

Rust

use tui_test::{OpenOptions, Operation, Session};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let terminal = Session::new("example");
    terminal.open(OpenOptions::default())?;
    terminal.execute(Operation::Submit {
        data: Some("echo hello".into()),
    })?;
    terminal.get_by_text("hello").last().expect()?;
    terminal.close()?;
    Ok(())
}

Rust API reference

Go

package main

import (
    "log"

    "github.com/microsoft/tui-test/bindings/go"
)

func main() {
    terminal, err := tuitest.Ephemeral("example", tuitest.ClientOptions{})
    if err != nil {
        log.Fatal(err)
    }
    defer terminal.CloseQuiet()

    if _, err := terminal.Run("my-app", nil, tuitest.SpawnOptions{}); err != nil {
        log.Fatal(err)
    }
    if err := terminal.GetByText("Ready", tuitest.TextSelectorOptions{}).Expect(tuitest.LocatorExpectOptions{}); err != nil {
        log.Fatal(err)
    }
}

Go installation and API reference

API references

SurfaceReference
CLICLI reference
Rustdocs.rs
Pythonbindings/python/README.md
JavaScriptbindings/js/README.md
Gobindings/go/README.md

CLI reference

Global options

OptionDescription
--session NAMESelect a session. Default: default or TUI_TEST_SESSION.
--jsonPrint JSON.
--verbose, -vWrite a session log.
--failure-artifacts DIRWrite structured assertion artifacts.
--failure-artifact-mode MODESelect none, text, html, or all (default when exports are enabled).
--failure-artifact-recordingCopy the automatic cast through the failure boundary.
--diagnostic-context KEY=VALUEAdd safe caller context to failure details.

CLI sessions persist between commands. open and run reuse a live session unless --restart is set.

Sessions

CommandDescription
open [options]Open a shell.
run [options] PROGRAM [ARGS...]Run a program.
[global options] -- PROGRAM [ARGS...]Alias for run.
restart [--graceful-timeout MS]Restart the session.
sessionsList sessions.
close [--all]Close one or all sessions.
daemon startStart the session daemon.
daemon statusShow daemon status.
daemon stop [--all]Stop one or all daemons.

open and run accept --backend, --cols, --rows, --cwd, repeatable --env KEY=VALUE, --wait-ready, --no-wait-ready, --restart, --config, --profile, --timeout-<class> MS, and --screen-history-limit COUNT. open also accepts --shell.

Text locators

tui-test find text TEXT [options]
tui-test expect text TEXT [options]
tui-test click text TEXT [options]
tui-test highlight text TEXT [options]
CommandDescription
find textReturn current matches and cell spans.
expect textRetry until the locator passes.
click textRetry, then click the middle cell.
highlight textMark matches in screenshots and the live monitor.

Locator options:

OptionDescription
--regexTreat TEXT as a regular expression.
--fullInclude scrollback.
--whitespace exact|normalizeChoose whitespace matching.
--after-text TEXTSearch after an anchor.
--before-text TEXTSearch before an anchor.
--after-regex, --before-regexTreat the anchor as a regular expression.
--after-match MODE, --before-match MODESelect an anchor with any, unique, first, or last.
--after-nth N, --before-nth NSelect a zero-based anchor.
--match MODESelect any, unique, first, or last.
--nth NSelect a zero-based match.

Style options are --fg, --bg, --bold, --dim, --italic, --underline-style, --underline-color, --inverse, --hidden, --strikethrough, and --blink. Boolean styles accept =false.

--link URI separately requires every matched cell, including spaces, to have that OSC 8 target. --link "" requires no link.

Programmatic locators add getByLink() / get_by_link(), cell-set intersection and union (and/or in Rust and JavaScript, and_/or_ in Python), and locator-only filter containment. AND/OR form new contiguous per-row runs; filters preserve whole matches. See the JavaScript and Python composition examples.

expect text also accepts --not and --timeout MS. click text accepts --button left|middle|right, --alt, --ctrl, --shift, --clicks N, and --timeout MS. highlight text accepts --timeout MS.

Keyboard and mouse

CommandDescription
submit [TEXT]Type text and press Enter.
type TEXTType text.
write DATAWrite raw bytes.
key press KEYS...Press keys.
key down KEYS...Send keydown events.
key repeat KEYS...Send repeat events.
key up KEYS...Send keyup events.
mouse click [X Y] [options]Click a cell or --on-text TEXT.
mouse move X YMove the pointer.
mouse down X Y [options]Press a mouse button.
mouse up X Y [options]Release a mouse button.
mouse drag X1 Y1 X2 Y2 [options]Drag between cells.
mouse scroll up|down [--amount N]Send mouse wheel input to the application.
scroll up|down [LINES]Move the native history viewport; default: one row.
scroll top|bottomShow the oldest output or return to the live screen.
resize COLS ROWSResize the terminal.
signal INT|TERM|KILL|QUITSend a signal.
killKill the child process.

Mouse button actions accept --button left|middle|right, --alt, --ctrl, and --shift. Click also accepts --clicks N.

Named keys include arrows, Home, End, PageUp, PageDown, Insert, Delete, Backspace, Tab, Enter, Space, Escape, and F1 through F12. Join modifiers such as Ctrl, Alt, Shift, Super, Meta, or Hyper with +.

Read state

CommandDescription
statePrint session state and visible text.
text [--full]Print terminal text.
cells X Y [W H]Return cells and styles.
get commandReturn the last command.
get outputReturn the last command output.
get exit-codeReturn the last exit code.
get cwdReturn the working directory.
get cursorReturn the cursor position.
get viewportReturn the history offset and available rows.
get sizeReturn the terminal size.
get titleReturn the window title.
get clipboardReturn the session clipboard.
get bellsReturn the bell count.
get bell-eventsReturn bell events.

Native scrolling changes the visible viewport without mouse input to the application. New output preserves the historical view. Keyboard input returns to the live screen. Mouse input and historical locator clicks fail until you return to the live screen. Full-text reads remain independent of the viewport. See the history reference, JavaScript example, and Rust example.

Wait and assert

CommandDescription
wait title TEXT [--regex --not --timeout MS]Wait for a title.
wait clipboard [TEXT] [--regex --timeout MS]Wait for a clipboard change or match.
wait idle [--timeout MS]Wait for the screen to stop changing.
wait command [--timeout MS]Wait for a submitted command.
wait exit [--timeout MS]Wait for the program to exit.
wait ready [--timeout MS]Wait for a shell prompt.
wait bell [--timeout MS]Wait for a bell.
expect title TEXT [--regex --not --timeout MS]Assert the title.
expect exit-code CODE [--timeout MS]Assert the last exit code.
expect output TEXT [--regex]Assert command output.
expect bell COUNT [--timeout MS]Wait until the cumulative bell count reaches COUNT.
expect snapshot NAME [-u] [--include-style] [--include-title]Assert a snapshot.

Use wait command after submit, wait exit after run, and text locators for visible state. wait idle only means the screen stopped changing.

Timeout defaults:

ClassDefault
text5 seconds
idle5 seconds
command30 seconds
exit30 seconds
ready30 seconds

Capture

CommandDescription
screenshot [PATH] [-o PATH] [--full] [--zoom N] [--background COLOR | --transparent]Print text or save SVG or PNG.
record start PATH [options] [--background COLOR | --transparent]Start APNG, GIF, MP4, or asciinema recording.
record stopFinish the recording.
get-recording [SESSION] [--config PATH]Print the automatic asciinema recording.
monitor [--interactive]Watch a CLI session or send input with --interactive.

record start options: --format, --fps, --speed, --idle-time-limit, --zoom, --background, and --transparent. MP4 requires ffmpeg and does not support transparency. Cast recordings do not support canvas options.

The extension selects the format: .png or .apng, .gif, .mp4, or .cast. --format overrides it.

Record
inputmonitor

Diagnostics / trace viewer

Add the following to tui-test.toml to retain failed traces, or use mode = "on" to retain every trace.

[trace]
mode = "on-failure"
directory = "./traces"

Users can open trace.html to review the trace or replay session.cast. Agents should read trace.md first and use trace.json and timeline.json for structured evidence instead of parsing the HTML.

Configuration

Create tui-test.toml:

[profiles.default]
scrollback = 10000

[profiles.default.colors]
background = "#000000"
foreground = "#c0c0c0"
red = "#800000"

[recording]
directory = "./casts"

[trace]
mode = "on-failure"
directory = "./traces"

[diagnostics]
screen-history-limit = 10

Set the appearance of screenshots and recordings with [recording.style]:

[recording.style]
font_size = 18
canvas_background = "#05050a"
canvas_padding = 30

[recording.style.window]
background = "#15151f"
foreground = "#c8c8e0"
divider = "#2a2a3a"

[recording.style.border]
width = 1
color = "#3a3a52"
radius = 12

[profiles.default.colors]
background = "#0b0b12"
foreground = "#d8d8e8"

Profiles override individual keys and inherit the rest from the file. Failure SVGs and HTML report SVGs use the session style. See the style types and defaults for all options. The CLI reference explains profile overrides.

The CLI checks the current directory, the platform config directory, then ~/.tui-test. Use --config PATH or TUI_TEST_CONFIG to select a file.

Shells and backends

Shells: bash, zsh, fish, PowerShell, pwsh, cmd, xonsh, elvish, and nushell.

Backends: Alacritty, Ghostty, Rio, and xterm.js. Default: Alacritty.

Exit codes

CodeMeaning
0Success
1Wait or assertion failed
2Invalid usage
3No session
4Daemon or IPC error
5Internal error

Agent commands

CommandDescription
usagePrint a short command guide.
agent-contextPrint the full command schema as JSON.
skillPrint the complete agent guide.
skill --addInstall the agent skill and local references.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Открыть репозиторий ↗