LianTai (莲台) - cross-platform launcher: open a terminal, activate a conda/venv Python env, and resume an opencode session, with adjustable window position.
Project description
LianTai (莲台)
Cross-platform launcher: open a terminal, activate a conda / venv Python environment, optionally resume an AI agent session (opencode, codex, claude, cursor, gemini), and place the window anywhere on screen — from one command.
跨平台终端启动器:一条命令开新终端、激活 conda 或 venv 的 Python 环境、续接 AI agent 的对话 session(opencode / codex / claude / cursor / gemini),并可以把窗口放到屏幕任意位置。
Why
Tabby / Windows Terminal / iTerm2 each have their own profile system, and none of them know about conda environments or AI agent sessions. LianTai bridges that gap with a single, dependency-free Python CLI that works on Windows, macOS, and Linux.
Architectural inspiration: muxy's
AIProviderRegistry / AIAgentLaunchProvider and
tabby's Shell / ProfileProvider abstractions.
Install
pip install liantai
# or from source:
pip install .
Requires Python ≥ 3.9. No runtime dependencies (optional rich for prettier output).
Quick start
# List discovered Python environments
liantai envs
# List opencode sessions
liantai sessions
# List installed AI agent CLIs
liantai agents
# List sessions for any supported agent
liantai agent-sessions --agent opencode
# Open a terminal, activate conda env 'dev', do nothing else
liantai --env dev
# Open a terminal, activate 'dev', and resume an opencode session
liantai --env dev --opencode ses_0858eeaa6ffeSOGKMMSZslLEhf
# Agent-agnostic form (works for codex / claude / cursor / gemini too)
liantai --env dev --agent codex --session <session-id>
# Open Windows Terminal at (100,100) sized 1200x800
liantai --env dev --terminal wt --geometry 100,100,1200,800
# Run an arbitrary command after activation
liantai --env dev -- python -c "import sys; print(sys.executable)"
Commands
| Action | Example |
|---|---|
| Open terminal + activate env | liantai --env dev |
| Resume opencode session (shorthand) | liantai -o ses_xxx |
| Resume any agent session | liantai --agent codex --session <id> |
| Place window | liantai -g 100,100,1200,800 |
| Use a specific terminal | liantai -t wt / -t tabby / -t iterm2 / -t gnome-terminal |
| List envs | liantai envs |
| List opencode sessions | liantai sessions |
| List agent CLIs | liantai agents |
| List sessions per agent | liantai agent-sessions --agent opencode |
| Show resolved paths | liantai where |
| List terminals | liantai terminals |
Configuration (optional)
~/.config/liantai/config.toml:
terminal = "wt"
env = "dev"
shell = "powershell"
cwd = "C:\\Users\\frede"
hold = true
[geometry]
x = 100
y = 100
width = 1400
height = 900
Supported AI agents
- opencode (sessions discovered from the SQLite DB at
~/.local/share/opencode/opencode.db) - codex (
codex --resume <id>) - claude code (
claude --resume <id>) - cursor (
cursor-agent --resume <id>) - gemini (
gemini --resume <id>)
Use liantai agents to see which are installed on PATH.
Supported terminals
- Windows: Windows Terminal (
wt), Tabby, ConEmu, plaincmd.exe - macOS: Terminal.app, iTerm2
- Linux: gnome-terminal, Konsole, Kitty, Alacritty, xterm
The first available launcher on the current OS is used unless -t is given.
Window positioning
- Windows:
SetWindowPosviactypes(no extra deps) - macOS: AppleScript
System Events - Linux:
wmctrlorxdotool(auto-detected)
License
MIT — © CodeOfMe
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file liantai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: liantai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9e5e12c3ccc06ef5091f26815bd4c69580345357519002282b7438ba8b7cf24
|
|
| MD5 |
377aaa7652918a4453428ccfec187848
|
|
| BLAKE2b-256 |
501d0ff9219a5411a766ddb5bb8acf3d0ff345063b4e2f981828bdf1f32a1426
|