Skip to content

feat: add createOpencodeTui() function to SDK for programmatic TUI launching#2410

Merged
thdxr merged 2 commits into
anomalyco:devfrom
ScriptedAlchemy:feature/tui-sdk
Sep 4, 2025
Merged

feat: add createOpencodeTui() function to SDK for programmatic TUI launching#2410
thdxr merged 2 commits into
anomalyco:devfrom
ScriptedAlchemy:feature/tui-sdk

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Contributor

This PR adds a new createOpencodeTui() function to the JavaScript SDK that allows programmatic launching of the opencode TUI interface.

Changes

  • Added TuiOptions type with optional project, model, session, and agent parameters
  • Added createOpencodeTui() function that spawns the opencode TUI process with inherited stdio
  • Function takes over the current terminal for interactive TUI experience

Usage

import { createOpencodeTui } from '@opencode/sdk'

const tui = createOpencodeTui({
  project: '/path/to/project',
  model: 'claude-3-5-sonnet',
  session: 'session-id',
  agent: 'agent-name'
})

The TUI will launch and take over the current terminal, providing an interactive coding experience.

ScriptedAlchemy and others added 2 commits September 4, 2025 14:36
Add new TuiOptions type and createOpencodeTui function to support terminal UI interaction. The function spawns opencode process with provided options and returns an object with close method.
@thdxr
thdxr merged commit e001af2 into anomalyco:dev Sep 4, 2025
1 check passed
github-actions Bot pushed a commit to yuguorui/opencode that referenced this pull request Jan 18, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Rwanbt pushed a commit to Rwanbt/opencode that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants