Skip to content
Hoody.com

The terminal service exposes a browser-based interactive terminal and serves its own machine-readable API specification. Use these endpoints to embed or link to the web terminal UI in your tooling and to fetch the OpenAPI definition that documents the terminal’s HTTP surface.

All endpoints in this section are served from a container-scoped hostname. The placeholder {server} is the regional node label assigned to your container (for example, node-us).

Returns the HTML page for the interactive browser terminal. Every aspect of the session — shell, working directory, appearance, SSH target, side panel, display mode — is controlled through URL query parameters. Most parameters only take effect the first time a terminal_id is seen; subsequent requests with the same terminal_id reattach to the existing process unless reset=true.

NameInTypeRequiredDescription
terminal_idquerystringNoTerminal session ID (numeric 1-65535, auto-generated if not provided). Allows multiple clients to share the same terminal session.
cwdquerystringNoInitial working directory for new terminal sessions (only applied when session is first created).
cwd_auto_createquerybooleanNoAuto-create cwd when the requested working directory does not exist yet. Only applies when cwd is explicitly provided for a new session. Enable with true, 1, or no value. Default: false.
shellquerystringNoShell to use: bash, zsh, fish, sh, etc. Default: server startup command. Only applies to new sessions.
userquerystringNoSystem user to spawn shell as (requires su permissions, only applies to new sessions, user must exist on system).
cmdquerystringNoBase64-encoded command to execute automatically on spawn (executes once when shell starts).
readonlyquerybooleanNoEnable read-only mode (blocks keyboard input, allows viewing only). Use true, 1, or no value.
titlequerystringNoBrowser window/tab title. Default: application default. HTML tags removed, max 200 characters.
fontSizequeryintegerNoTerminal font size in pixels. Default: 13, range: 8-72. Accepts a px suffix (e.g. 16px).
backgroundColorquerystringNoTerminal background color. Default: #2b2b2b. Supports hex colors (#RGB, #RRGGBB, #RRGGBBAA) or CSS named colors (black, white, red, blue, green, navy, etc.).
panelquerystringNoURL to display in side panel iframe (enables panel feature).
panel-visiblequerybooleanNoShow panel on load. Default: true if a panel URL is provided, false otherwise.
panel-positionquerystringNoPanel position: left or right. Default: right.
panel-widthquerystringNoInitial panel width in pixels or percentage. Default: 400px.
panel-resizablequerybooleanNoAllow panel resizing via drag handle. Default: true.
panel-heightquerystringNoInitial panel height for top/bottom positioned panels. Default: 300px.
hide-toolbarquerybooleanNoHide the terminal toolbar. Default: false.
ssh_hostquerystringNoSSH server hostname or IP address (creates SSH session if provided with ssh_user).
ssh_userquerystringNoSSH username (required if ssh_host is provided).
ssh_portquerystringNoSSH port number. Default: 22.
ssh_passwordquerystringNoSSH password for authentication (use with caution, prefer key-based auth).
ssh_keyquerystringNoBase64-encoded SSH private key for key-based authentication (prefer over password-based auth).
socks5_hostquerystringNoSOCKS5 proxy hostname for SSH connection.
socks5_portquerystringNoSOCKS5 proxy port. Default: 1080.
socks5_userquerystringNoSOCKS5 proxy username for authentication.
socks5_passquerystringNoSOCKS5 proxy password for authentication.
desktopquerybooleanNoEnable Hoody Display desktop mode. Provides a full desktop environment instead of seamless individual windows. Default: false.
desktop_envquerystringNoDesktop environment to launch (implies desktop=true). Starts the specified DE session after the display is ready. Valid values: xfce, mate.
displayquerystringNoX11 display number for GUI applications. Accepts a number (e.g. 1) or :number (e.g. :1). Shorthand for ?env=DISPLAY=:N.
redirectquerystringNoRedirect mode. When set to display, creates/ensures the terminal session, waits for X11 display readiness, then returns HTTP 302 redirect to the display URL. Requires terminal_id and display params.
redirect_delayqueryintegerNoExtra delay in seconds after display is ready before redirecting. Only used when redirect=display. Default: 0.
argquerystringNoCommand-line arguments to pass to shell (requires --url-arg server option, can be repeated).
welcomequerybooleanNoShow welcome message on startup. Default: false. Supports ?welcome=true, ?welcome=1, or ?welcome (no value means true).
debugquerybooleanNoEnable debug output in wrapper script. Default: false.
resetquerybooleanNoKill existing terminal process and reconfigure session. Default: false. Use to switch shell, user, or from shell to SSH.
pidqueryintegerNoAttach to an existing process by PID instead of spawning a new shell. Implies reset.
envquerystringNoInject environment variable as KEY=VALUE. Can be repeated for multiple variables (e.g. ?env=FOO=bar&env=BAZ=qux).
env_injectquerybooleanNoInject HOODY_* environment variables into shell session. Default: true. Set to false to disable.
startup_scriptquerystringNoPath to startup script to execute before shell launch (only applied on first session creation).

The HTML document for the browser-based terminal. The page boots the terminal WebSocket client and applies the supplied query parameters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hoody Terminal</title>
<link rel="stylesheet" href="/static/css/terminal.css">
</head>
<body>
<div id="terminal" data-terminal-id="1"></div>
<script src="/static/js/terminal.js"></script>
</body>
</html>
import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-terminal-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.terminal.web.get({
terminal_id: '1',
shell: 'bash',
cwd: '/workspace',
fontSize: 14,
backgroundColor: '#1e1e1e',
title: 'My Terminal',
hide_toolbar: false
});

These endpoints expose the terminal’s own OpenAPI specification, generated from the service’s source annotations. Use them when you need to generate client code, render docs, or validate requests against the live schema.

Returns the full OpenAPI 3.0 specification for the terminal service as JSON.

{
"openapi": "3.0.0",
"info": {
"title": "Hoody Terminal API",
"version": "1.0.0",
"description": "HTTP API for the Hoody terminal service"
},
"servers": [
{
"url": "https://{projectId}-{containerId}-terminal-1.{server}.containers.hoody.com"
}
],
"paths": {
"/": {
"get": {
"summary": "Get web terminal interface",
"parameters": []
}
},
"/api/v1/terminal/openapi.json": {
"get": {
"summary": "Get OpenAPI specification in JSON format"
}
},
"/api/v1/terminal/openapi.yaml": {
"get": {
"summary": "Get OpenAPI specification in YAML format"
}
}
}
}
import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-terminal-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.terminal.docs.getJson();

Returns the full OpenAPI 3.0 specification for the terminal service as YAML.

openapi: 3.0.0
info:
title: Hoody Terminal API
version: 1.0.0
description: HTTP API for the Hoody terminal service
servers:
- url: https://{projectId}-{containerId}-terminal-1.{server}.containers.hoody.com
paths:
/:
get:
summary: Get web terminal interface
parameters: []
/api/v1/terminal/openapi.json:
get:
summary: Get OpenAPI specification in JSON format
/api/v1/terminal/openapi.yaml:
get:
summary: Get OpenAPI specification in YAML format
import { HoodyClient } from 'hoody-sdk';
const client = new HoodyClient({ baseURL: 'https://{projectId}-{containerId}-terminal-1.{server}.containers.hoody.com', token: process.env.HOODY_TOKEN });
await client.terminal.docs.getYaml();