Skip to content

feat: add --theia-api-port and --theia-api-token flags - #8

Draft
sdirix wants to merge 1 commit into
mainfrom
feat/theia-api-port
Draft

feat: add --theia-api-port and --theia-api-token flags#8
sdirix wants to merge 1 commit into
mainfrom
feat/theia-api-port

Conversation

@sdirix

@sdirix sdirix commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

--theia-api-port publishes a container port on host loopback and enables Theia's separate-port external API on it by injecting the externalApi.* preferences. This applies to the --background auto-launch and to the theia/theia-next re-attach verbs. --theia-api-token sets the external API token. Without it no token preference is set.

The port is only published for tools that launch a Theia IDE, using the same post_start.open_ide signal as the auto-launch. For other tools nothing would listen on the port, so the flag is ignored with a warning.

The token reaches the IDE process via argv and stays visible in ps, which is acceptable for the loopback dev flow this targets. It is redacted from the launch log.

--theia-api-port publishes a container port on host loopback and
enables Theia's separate-port external API on it by injecting the
externalApi.* preferences. This applies to the --background auto-launch
and to the theia/theia-next re-attach verbs. --theia-api-token sets the
external API token. Without it no token preference is set.

The port is only published for tools that launch a Theia IDE, using the
same post_start.open_ide signal as the auto-launch. For other tools
nothing would listen on the port, so the flag is ignored with a
warning.

The token reaches the IDE process via argv and stays visible in ps,
which is acceptable for the loopback dev flow this targets. It is
redacted from the launch log.
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.

1 participant