Skip to content

CLI Reference

Launch the TUI to browse and run requests interactively.

Terminal window
treq open [workspace]
OptionAliasTypeDefaultDescription
workspacestring.Workspace root directory (positional)
--port-pnumber4097Port to listen on
--host-Hstring127.0.0.1Host to bind to
--webbooleanfalseOpen browser-based UI instead of terminal
--exposebooleanfalseAllow non-loopback binding (disables cookie auth)

Scaffold a new t-req workspace.

Terminal window
treq init [name]
OptionAliasTypeDefaultDescription
namestringProject name / directory (positional)
--yes-ybooleanfalseSkip prompts, use defaults

Execute a request from a .http file.

Terminal window
treq run <file>
OptionAliasTypeDefaultDescription
filestringrequiredPath to .http file (positional)
--name-nstringSelect request by @name directive
--index-inumberSelect request by index (0-based)
--profile-pstringConfig profile to use
--env-estringEnvironment file to load from environments/
--var-vstring[]Variables as key=value pairs
--timeout-tnumberRequest timeout in milliseconds
--workspace-wstringWorkspace root directory
--verbosebooleanfalseShow detailed output

Start the HTTP API server.

Terminal window
treq serve
OptionAliasTypeDefaultDescription
--port-pnumber4096Port to listen on
--host-Hstring127.0.0.1Host to bind to
--workspace-wstringWorkspace root directory
--token-tstringBearer token for authentication
--cors-cstringAllowed CORS origins (comma-separated)
--max-body-sizenumber10485760Max response body size in bytes
--max-sessionsnumber100Max concurrent sessions
--stdiobooleanfalseJSON-RPC over stdin/stdout
--webbooleanfalseEnable web UI
MethodPathDescription
GET/healthHealth check
GET/capabilitiesProtocol version and features
GET/configResolved project configuration
POST/parseParse .http file content
POST/executeExecute an HTTP request
POST/sessionCreate a session
GET/session/:idGet session state
PUT/session/:id/variablesUpdate session variables
DELETE/session/:idDelete a session
POST/flowsCreate a flow
POST/flows/:flowId/finishMark flow as complete
GET/flows/:flowId/executions/:idGet execution details
GET/eventSSE event stream
GET/workspace/filesList .http files
GET/workspace/requestsList requests in a file
POST/scriptRun a script
DELETE/script/:runIdCancel a running script
GET/script/runnersGet available script runners
POST/testRun tests
DELETE/test/:runIdCancel a running test
GET/test/frameworksGet available test frameworks

Connect to a running server with the terminal UI.

Terminal window
treq tui
OptionAliasTypeDefaultDescription
--server-sstringhttp://localhost:4096Server URL to connect to
--token-tstringBearer token for authentication

Upgrade t-req to a newer version.

Terminal window
treq upgrade [target]
OptionAliasTypeDefaultDescription
targetstringlatestVersion to upgrade to (positional)