본문으로 건너뛰기
cccskills
무료GitHub에 공개

tuistory

Operate and test terminal apps without a display using named background sessions. Wait for visible screen changes, send keystrokes, reproduce Cline CLI bugs, capture text or PNG evidence, and write automated tests of interactive behavior.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Drive and test terminal apps (especially the Cline CLI TUI in apps/cli) through tuistory — named background PTY sessions that agents can read, wait on, snapshot, screenshot, and type into. Like Playwright/tmux for terminals, with reactive waiting instead of blind `sleep`. Use this skill when you need to: - Manually test or reproduce bugs in the interactive Cline TUI (`bun run cli -i`) from a headless environment - Run a dev server or any long-lived/interactive process in the background without hanging your tool call - Write or extend Playwright-style e2e tests for the TUI (`bun run test:e2e:tuistory` in apps/cli) - Capture text snapshots or styled PNG screenshots of a TUI screen as evidence

연동 도구Playwright
설치 방법 보기

이럴 때 유용합니다

  • Reproducing Cline CLI interface bugs without a display
  • Running an interactive process in the background
  • Writing automated tests for terminal interactions
  • Capturing terminal screens as text or PNG evidence

포함된 파일(1)

  • SKILL.md5.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

tuistory

tuistory wraps any terminal command in a named background PTY session backed by a Ghostty terminal emulator. Agents interact with the session via short CLI calls that return instantly; humans can tuistory attach to the same session to watch or intervene. No real terminal or display (DISPLAY) is needed — it works fully headless, which makes it the preferred way for cloud agents to exercise the Cline TUI.

It is installed as a devDependency of @cline/cli, so the pinned binary resolves when you run from apps/cli:

cd apps/cli
bunx tuistory --help   # source of truth for commands, options, and syntax

For full upstream docs: curl -s https://raw.githubusercontent.com/remorses/tuistory/refs/heads/main/README.md

Driving the Cline TUI headlessly

Launch the TUI in an isolated environment so you don't touch real user config (~/.cline):

cd apps/cli
DATA_DIR=$(mktemp -d) && HOME_DIR=$(mktemp -d)
bunx tuistory -s cline --cols 120 --rows 36 \
  --env HOME=$HOME_DIR --env CLINE_DATA_DIR=$DATA_DIR \
  --env CLINE_DISABLE_CLINE_PASS_NOTICE=1 --env CLINE_TELEMETRY_DISABLED=1 \
  -- bun src/index.ts --provider anthropic -m claude-sonnet-4-6 -k test-key

The dummy -k test-key renders the full chat UI; only an actual agent turn would fail. For recorded LLM turns, use the VCR cassettes described in apps/cli/src/tests/helpers/env.ts (CLINE_VCR=playback + CLINE_VCR_CASSETTE). Real turns need a provider credential (e.g. ANTHROPIC_API_KEY, CLINE_API_KEY).

Then use an observe → act → observe loop:

# Wait reactively for the chat view — never use sleep
bunx tuistory -s cline wait "What can I do for you?" --timeout 30000

# Act, then always observe the resulting screen state
bunx tuistory -s cline type "/settings"
bunx tuistory -s cline snapshot --trim
bunx tuistory -s cline press enter
bunx tuistory -s cline snapshot --trim

# Styled PNG of the current screen (prints the file path) — good for artifacts
bunx tuistory -s cline screenshot

# Full raw output stream (snapshot shows only the visible screen)
bunx tuistory read -s cline --all

# Tear down a session YOU started (double Ctrl+C exits the TUI cleanly)
bunx tuistory -s cline press ctrl c
bunx tuistory -s cline press ctrl c
bunx tuistory -s cline close

Background processes (instead of tmux)

bunx tuistory -s my-server -- bun run dev:sidecar   # returns immediately
bunx tuistory -s my-server wait "/listening|ready/i" --timeout 30000
bunx tuistory read -s my-server                     # new output since last read
bunx tuistory -s my-server restart                  # after code changes

Key rules

  • Options before --, command after. Everything after the first -- is passed verbatim to the child: tuistory -s name --cols 150 -- bun src/index.ts is correct.
  • Snapshot after every action. TUIs are stateful; dialogs and errors can render over the view you expect. snapshot reflects what the user actually sees (occluded text does not count), unlike grepping the raw stream.
  • Wait, never sleep. wait "text" / wait "/regex/i" (case-sensitive by default) reacts as fast as the terminal updates; wait-idle when you don't know what to expect. Always pass --timeout.
  • Keys land instantly. Unlike sleep-based scripts, a queued second keypress can leak into the next view (e.g. one Enter both accepts a slash completion and submits it).
  • Never close a session you didn't start. Sessions are shared with humans (tuistory attach -s name) and other agents. Default to leaving sessions running; use read/wait/snapshot to inspect without disrupting.
  • --cols/--rows affect TUI layout (assertions are width-sensitive); --pixel-ratio 2 gives sharper screenshots.

Writing e2e tests with the library API

apps/cli/src/cli.tuistory.e2e.test.ts (run: bun run test:e2e:tuistory) is the reference. The programmatic API runs in-process — no daemon:

import { launchTerminal } from "tuistory";

const session = await launchTerminal({
	command: "bun",
	args: ["src/index.ts", "--provider", "anthropic", "-k", "test-key"],
	cwd: cliRoot,
	env: isolatedEnv, // see createCliEnv() in the reference test
	cols: 120,
	rows: 36,
	waitForDataTimeout: 30_000, // CLI cold start compiles a large TS graph
});

await session.waitForText("What can I do for you?", { timeout: 30_000 });
const screen = await session.text({ trimEnd: true }); // emulated screen state
await session.type("/settings");
await session.press("enter");
session.close(); // always close in test teardown

Screen-state assertions can check that stale UI is gone (expect(screen).not.toContain(...)), which stream-grepping harnesses cannot. session.text({ only: { bold: true } }) filters by style; session.read() returns the raw stream since the last read.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

cline-sdk

무료

Build AI agents with Cline SDK using guidance on choosing APIs, adding custom tools, saving sessions, and handling live events. References also cover model providers, scheduled runs, multi-agent coordination, and production deployment.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Build an AI agent with custom tools
  • Choose an API for persistent sessions
  • Configure model providers and live event handling
cline/cline7.1만2026년 10월 19일 업데이트

Create a GitHub pull request that follows the project's template. Review commits and changed files, gather issue and testing details, check branch readiness, and use the GitHub CLI to submit a regular or draft request.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Submitting completed changes for review
  • Writing a PR description from commits
  • Creating a draft pull request
cline/cline7.1만2026년 10월 19일 업데이트

Prepare a one-time What's new dialog for the desktop app when several meaningful features have accumulated. The skill selects changelog highlights, drafts concise copy, updates the content file, and guides testing and in-app previews.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Decide whether accumulated features warrant an announcement
  • Draft concise copy for three or four feature highlights
  • Add a new What's new content entry
cline/cline7.1만2026년 10월 19일 업데이트

opentui

무료

Build interactive terminal screens with OpenTUI using its core API, React, or Solid. Guides framework selection, components, layout, keyboard input, animations, and testing, with references for project setup and troubleshooting.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Starting an OpenTUI project with React or Solid
  • Building terminal forms and selection menus
  • Adapting layouts to terminal dimensions
cline/cline7.1만2026년 10월 19일 업데이트

Prepare Cline CLI releases for npm, the package registry, by reviewing SDK changes, drafting release notes, updating versions and changelogs, and creating release tags. Guides checks and publication through GitHub Actions or an authenticated local machine.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Drafting CLI release notes from relevant changes
  • Updating the CLI version and changelog
  • Publishing a tagged release through GitHub Actions
cline/cline7.1만2026년 10월 19일 업데이트

Prepare Cline desktop releases for stable, beta, or nightly testing. Coordinate release notes, matching version files, tags, and a GitHub Actions workflow that builds signed installers and manages automatic update feeds for release channels.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Preparing a stable desktop release
  • Publishing a beta alongside the stable app
  • Creating signed nightly test installers
cline/cline7.1만2026년 10월 19일 업데이트

cline의 스킬 모두 보기

이 스킬의 문제 신고