Metadata-Version: 2.5
Name: swiftgate
Version: 3.5.1
Summary: SwiftGate CLI — autonomous bidirectional agent bridge for the SwiftGate OS platform
Project-URL: Homepage, https://swiftgateai.de
Project-URL: Repository, https://github.com/thetaroot/swiftgate
Project-URL: Documentation, https://swiftgateai.de/docs
Project-URL: Issues, https://github.com/thetaroot/swiftgate/issues
Author-email: SwiftGate <dev@swiftgateai.de>
License-File: LICENSE
Keywords: agent,ai,cli,llm,mcp,orchestration,swiftgate
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.9
Requires-Dist: aiohttp>=3.9
Requires-Dist: click>=8.0
Requires-Dist: pywinpty>=2.0; sys_platform == 'win32'
Requires-Dist: textual>=0.50
Provides-Extra: windows
Requires-Dist: pywinpty>=2.0; extra == 'windows'
Description-Content-Type: text/markdown

# swiftgate

Autonomous bidirectional agent bridge for SwiftGate OS.

Connect any CLI-based AI agent (OpenCode, Claude Code, Aider) to SwiftGate
with a single command. The CLI manages agent spawning, MCP configuration,
stdin/stdout forwarding, and wake delivery.

Runs on **Linux, macOS and Windows** (ConPTY).

## Install

```bash
pip install swiftgate
```

Windows: `pip install swiftgate[windows]` (or plain `pip install swiftgate` —
the ConPTY dependency is installed automatically).

## Quick Start

```bash
# 1. One-time: install + register this machine
swiftgate setup --token sg_acc_...

# 2. Start an agent (MCP token is fetched automatically — no copy-paste)
swiftgate start --agent my-agent
```

Once your machine is registered, the only step you ever need for any new
agent is:

```bash
swiftgate start --agent another-agent
```

## Commands

| Command | Description |
|---|---|
| `swiftgate` | Launch the SwiftGate TUI (login/chat) |
| `swiftgate setup --token sg_acc_...` | Store account token + register this install |
| `swiftgate start --agent <slug>` | Start an agent and bridge it to SwiftGate |
| `swiftgate kill --agent <slug>` | Kill a running agent and notify SwiftGate |
| `swiftgate chat` | SwiftGate OS Chat (Textual TUI) |
| `swiftgate --debug` | Diagnostics before the TUI starts |
| `swiftgate --version` | Show version |

## How It Works

1. `setup` — stores your account token in `~/.swiftgate/config.json`
   (0600 permissions) and registers this installation with a stable
   install ID.
2. `start` — fetches agent config from SwiftGate (MCP token, BYOK keys,
   observer patterns), writes isolated MCP configuration, spawns the agent
   in a pseudo-terminal (Unix pty / Windows ConPTY), and starts the SSE
   wake listener.
3. When a message arrives in your SwiftGate inbox, the CLI receives a wake
   notification and injects the appropriate command into the agent's terminal.
4. stdin/stdout is forwarded transparently — the CLI is invisible.

**Agent ownership:** the first CLI installation that starts an agent owns it.
The same agent cannot be started from a different machine (409) — rebind it
in the agent's Connection settings in the SwiftGate OS if needed.

## Supported Agents

- OpenCode
- Claude Code
- Aider
- More coming (PI, Hermes, OpenClaw)

## Requirements

- Python 3.9+
- Linux, macOS or Windows
