YP

yiwenlu66/piloty

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

45 stars 8 forks 品質 50 トレンド 12NOASSERTION

PiloTY: MCP による PTY 操作のための AI パイロット - AI エージェントが人間のようなインタラクティブな端末を制御することを可能にします

概要

PiloTY(あなたのAI CopilotのPTY)は、エージェントが永続的でインタラクティブなターミナルを与えるMCPサーバーです。 シェルコマンドを実行するためにClaude Code / Codexを使用している場合は、おそらく同じ壁に当たる:ツールコールはステートレスになる傾向があります。 各呼び出しは "fresh" から始まるので、環境変数が消え、対話型プログラムが確実に駆動できず、エージェントが考えている間、長い実行プロセスが切り離したり、孤立したりします。 PiloTY は、エージェントのターミナルが人間のように動作するように存在します。実際のターミナルで何かを始め、後で戻ってきます。 警告:PiloTYは、制限されていない端末アクセスを公開します。 お使いのキーボードにエージェントを与えるようにしてください。 - 長期実行コマンド:ビルド、インストール、マイグレーション、テストスイート。 一度起動し、後で出力を確認してください。 - ログ監視: tail -f, ジャーナルカルト -f, kubectl logs -f, CI ログ, サービスが再起動します。 - "Vibeデバッギング": エージェントがコードを読み、アイデア(python、ipython、pdb)をトリガーしながら、REPL/デバッガを開いたままにします.

概要(AI 翻訳)

PiloTY(あなたのAI CopilotのPTY)は、エージェントが永続的でインタラクティブなターミナルを与えるMCPサーバーです。

シェルコマンドを実行するためにClaude Code / Codexを使用している場合は、おそらく同じ壁に当たる:ツールコールはステートレスになる傾向があります。 各呼び出しは “fresh” から始まるので、環境変数が消え、対話型プログラムが確実に駆動できず、エージェントが考えている間、長い実行プロセスが切り離したり、孤立したりします。

PiloTY は、エージェントのターミナルが人間のように動作するように存在します。実際のターミナルで何かを始め、後で戻ってきます。

警告:PiloTYは、制限されていない端末アクセスを公開します。 お使いのキーボードにエージェントを与えるようにしてください。

何が有効か

  • 長期実行コマンド:ビルド、インストール、マイグレーション、テストスイート。 一度起動し、後で出力を確認してください。
  • ログ監視: tail -f, journalctl -f], [[kubectl logs -f]]], CIログ, サービスが再起動します。
  • “Vibe デバッグ”: エージェントがコードを読み、アイデアをトリエス([python]])、 [ipython]]、 [pdb]])を読んでいるときに、REPL/デバッガーを開いたままにします。
  • 特権操作:インタラクティブなパスワードプロンプト([sudo])、SSHパスワード、キーパスフレーズを処理します.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

PiloTY

PiloTY (PTY for your AI Copilot) is an MCP server that gives an agent a persistent, interactive terminal.

If you have used Claude Code / Codex to run shell commands, you have probably hit the same wall: tool calls tend to be stateless. Each call starts “fresh”, so environment variables disappear, interactive programs cannot be driven reliably, and long-running processes get cut off or orphaned while the agent is thinking.

PiloTY exists to make the agent’s terminal behave more like a human’s: start something in a real terminal, come back later, and keep going.

Warning: PiloTY exposes unrestricted terminal access. Treat it like giving the agent your keyboard.

What it enables

  • Long-running commands: builds, installs, migrations, test suites. Start once, check output later.
  • Log monitoring: tail -f, journalctl -f, kubectl logs -f, CI logs, service restarts.
  • “Vibe debugging”: keep a REPL/debugger open while the agent reads code and tries ideas (python, ipython, pdb).
  • Privileged operations: handle interactive password prompts (sudo, SSH passwords, key passphrases).
  • SSH-based devops: keep a remote login session alive across tool calls; run remote commands in the same shell.
  • Terminal UIs: less, man, top, vim can work, but cursor-heavy programs often require screen snapshots instead of plain text output.

Quickstart

PiloTY is meant to be launched by an MCP client over stdio.

Add it to Codex CLI as an MCP server:

codex mcp add piloty -- uvx --from git+https://github.com/yiwenlu66/PiloTY.git piloty

If you prefer SSH-based Git fetch:

codex mcp add piloty -- uvx --from git+ssh://[email protected]/yiwenlu66/PiloTY.git piloty

If you already have a local clone:

codex mcp add piloty -- uv --directory /path/to/PiloTY run piloty

Run the server command directly (without adding it to an MCP client):

uvx --from git+https://github.com/yiwenlu66/PiloTY.git piloty

Mental model

One session is one real interactive terminal that stays alive across tool calls.

  • State persists: cwd, environment variables, foreground process, remote SSH connection, REPL/debugger state.
  • PiloTY tracks both the raw output stream and a rendered screen/scrollback view.

PiloTY keeps two representations:

  • output: incremental text stream (optionally ANSI-stripped)
  • Rendered screen/scrollback: what a human would see in a terminal

Public MCP results separate call outcome from terminal interpretation:

  • outcome: success, deadline_exceeded, eof, error, invalid_session, or terminated
  • terminal_state: best-effort rendered-state classification after the call (running, ready, password, confirm, repl, editor, pager, unknown)

Sessions are addressed by a session_id string. Reusing the same id is what keeps state.

Integration notes (for MCP integrators)

GitHub で README 全文を見る

インストール

uvx --from git+https://github.com/yiwenlu66/PiloTY.git piloty
MCP 初心者?mcpskill.org のガイドから始めましょう →