### Install 3270Connect with the one-line installer Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Runs the interactive installer, which prompts for the installation method (binary, Docker, Compose, or lab). The binary method bundles s3270, and the console publishes on 127.0.0.1 by default. ```shell curl -fsSL https://3270connect.3270.io/install.sh | bash ``` -------------------------------- ### Create administrator via command line Source: https://github.com/3270io/3270connect/blob/main/docs/authentication.md Use this command to create the first administrator without using the web form. Run it before starting the server; setup mode does not activate when an account already exists. ```bash 3270Connect user add root --admin ``` -------------------------------- ### Quick Start Commands Source: https://github.com/3270io/3270connect/blob/main/MAKEFILE_QUICKREF.md Quick start commands for building Linux binaries, viewing available targets, and performing a clean rebuild. ```bash # Build Linux binaries (recommended) make linux-only # Show all available targets make help # Clean and rebuild make clean && make linux-only ``` -------------------------------- ### Install 3270Connect lab non-interactively Source: https://github.com/3270io/3270connect/blob/main/README.md Runs the installer with the --method lab --yes flags to install the lab environment without prompts. ```shell # The whole thing, without being asked anything curl -fsSL https://3270connect.3270.io/install.sh | bash -s -- --method lab --yes ``` -------------------------------- ### Set starting port with -startPort Source: https://github.com/3270io/3270connect/blob/main/docs/basic-usage.md Specifies the starting port for the sample application to avoid port conflicts when running multiple instances on the same machine. ```bash 3270Connect -config workflow.json -startPort 5000 ``` -------------------------------- ### Start 3270Connect MCP server Source: https://github.com/3270io/3270connect/blob/main/docs/mcp.md Starts 3270Connect as a Model Context Protocol server. It is the same binary as the normal CLI; nothing extra needs to be installed. ```bash 3270Connect mcp ``` -------------------------------- ### SKILL.md example Source: https://github.com/3270io/3270connect/blob/main/docs/skills.md Example SKILL.md for a custom skill. Only name and description are required; name must match the folder. After restarting 3270Connect, the skill appears in list_skills with source local. ```markdown --- name: our-billing-load description: Run the overnight billing load profile against the test region, with the concurrency and pacing we use for release sign-off. invocation: [billing-load, release-signoff] tools: [validate_workflow, start_load_test, get_load_test_metrics] instructions: [load-test-safety] --- # Billing load profile ## When to use Signing off a release against the billing region. ## Steps 1. Use `workflows/billing.json`, which has the transaction mix Ops agreed. 2. 40 concurrent users, 20 minutes. Below 15 minutes the batch window has not opened and the numbers describe a quiet system. 3. Report p95 against the 2.5s figure in the SLA. ## Anti-patterns - Running before 02:00. The overnight batch is still going and the numbers will be worse than anything a user will see. ``` -------------------------------- ### Cross-platform build with make all Source: https://github.com/3270io/3270connect/blob/main/docs/MAKEFILE_README.md Cross-platform build example: builds for both Linux and Windows, then verifies the binaries. ```bash # On Linux, build for both platforms make all # Verify Linux binaries ls -lh binaries/linux/ # Verify Windows binaries ls -lh binaries/windows/ ``` -------------------------------- ### POST /start-process Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Starts a run from a multipart form submission. ```APIDOC ## POST /start-process ### Description Starts a run from a multipart form submission. ### Method POST ### Endpoint /start-process ### Request Body - **multipart/form-data** - Required - Form data containing the process start parameters. ### Response #### Success Response (200) - **body** (application/json) - Confirmation of process start. #### Response Example { "status": "started" } ``` -------------------------------- ### Install pkg/browser dependency Source: https://github.com/3270io/3270connect/blob/main/docs/BUILD.md Use github.com/pkg/browser instead of webview. Run this command to fetch the dependency. ```bash go get github.com/pkg/browser ``` -------------------------------- ### Install 3270Connect lab with --method lab --yes Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Skips the interactive prompts by specifying the lab method and accepting all prompts. The lab installs three containers: the console, a browser terminal, and a 3270 host for practice. ```shell curl -fsSL https://3270connect.3270.io/install.sh | bash -s -- --method lab --yes ``` -------------------------------- ### Run console and workflow with Compose Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Starts the console with docker-compose.yml and then runs a workflow in headless mode. The installer writes an equivalent stack pinned to a version. ```shell docker compose up -d docker compose run --rm 3270connect -config workflow.json -headless ``` -------------------------------- ### Start dashboard on custom port Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Starts the dashboard on a specified port using the -dashboardPort flag. ```bash 3270Connect -dashboard -dashboardPort 8500 ``` -------------------------------- ### Run a sample host with Docker Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Starts a sample TN3270 host on port 3270. The -runApp flag selects the sample application and -runApp-port sets the listening port. ```shell docker run --rm -p 3270:3270 \ ghcr.io/3270io/3270connect:latest -runApp 1 -runApp-port 3270 ``` -------------------------------- ### Install MinGW-w64 Cross-Compiler Source: https://github.com/3270io/3270connect/blob/main/MAKEFILE_README.md Installs the MinGW-w64 cross-compiler required for Windows cross-compilation. The Makefile automatically installs it if missing. ```bash sudo apt-get install mingw-w64 ``` -------------------------------- ### device object example Source: https://github.com/3270io/3270connect/blob/main/docs/compatibility-profile-schema.md Shows the device object with negotiated terminal model and display capabilities. ```json { "terminal_type": "IBM-3279-2-E", "rows": 24, "cols": 80, "color": true, "extended_attributes": true, "alt_screen": false } ``` -------------------------------- ### Workflow configuration JSON example Source: https://github.com/3270io/3270connect/blob/main/CLAUDE.md Example of a complete workflow configuration in JSON format. It shows the top-level settings (Host, Port, CodePage, Model, TLS, OutputFilePath, EveryStepDelay, WaitForField) and a sequence of steps (Connect, FillString, PressEnter, CheckValue, AsciiScreenGrab, Disconnect). Coordinates are 1-based. The AsciiScreenGrab step requires the top-level OutputFilePath to be set. ```json { "Host": "mainframe.host", "Port": 3270, "CodePage": "cp037", "Model": "2", "TLS": false, "OutputFilePath": "output.html", "EveryStepDelay": { "Min": 0.1, "Max": 0.3 }, "WaitForField": true, "Steps": [ { "Type": "Connect" }, { "Type": "FillString", "Coordinates": { "Row": 10, "Column": 20, "Length": 8 }, "Text": "{{username}}" }, { "Type": "PressEnter" }, { "Type": "CheckValue", "Coordinates": { "Row": 24, "Column": 1, "Length": 5 }, "Text": "READY" }, { "Type": "AsciiScreenGrab" }, { "Type": "Disconnect" } ] } ``` -------------------------------- ### CI pipeline build and test Source: https://github.com/3270io/3270connect/blob/main/docs/MAKEFILE_README.md Continuous integration example: builds version 4.4ga6 and runs binary tests. ```bash # In CI pipeline make X3270_VERSION=4.4ga6 all make test-binaries ``` -------------------------------- ### Start dashboard only Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Launches the dashboard server on the default port 9200. Open http://localhost:9200/dashboard to view it. ```bash 3270Connect -dashboard ``` -------------------------------- ### Server log output showing setup code Source: https://github.com/3270io/3270connect/blob/main/docs/authentication.md When no accounts exist, the server logs a setup code and a message that the code is required once. The code appears in the log file and standard error, so `docker compose logs 3270connect` shows it. Case, spaces, and dashes are ignored when entering the code. ```text auth: no accounts yet — open the console to create the first administrator auth: setup code: EJWQ-RUYN-7XL3-PT3O auth: the code is required once, and stops working as soon as the account exists ``` -------------------------------- ### Example failure log with screen capture Source: https://github.com/3270io/3270connect/blob/main/docs/basic-usage.md Example failure log message when a screen capture is saved. Shows the capture file path included in the log. ```text Workflow failure on scriptPort 5001 at step 4 (CheckValue): CheckValue failed. Expected: LOGIN, Found: ERROR | Screen captured to: failure_5001_step4_1234567890.txt ``` -------------------------------- ### Install the 3270connect lab Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Installs the 3270connect lab environment, which includes a TN3270 host, a browser terminal, and the console. The lab provides sample applications on ports 3271 and 3272 for safe testing. ```shell curl -fsSL https://3270connect.3270.io/install.sh | bash -s -- --method lab ``` -------------------------------- ### Record demo scenes with record.mjs Source: https://github.com/3270io/3270connect/blob/main/scripts/demos/README.md Builds the binary, installs Node dependencies, and records one or all demo scenes. Each run writes docs/assets/video/.mp4 and a .jpg poster frame, both committed. Requires Go, Node 20+, Chromium (or CHROMIUM_PATH), ffmpeg with libx264, and the fonts-inter and fonts-jetbrains-mono fonts. ```bash scripts/demos/prepare.sh # build, and stage a working directory cd scripts/demos && npm install # first time only node record.mjs terminal-first-workflow # one scene node record.mjs --all # all of them, in series node record.mjs console-tour --keep-frames # leave the JPEG frames for inspection ``` -------------------------------- ### Connection settings JSON example Source: https://github.com/3270io/3270connect/blob/main/docs/workflow.md Example of the top-level connection settings for a 3270Connect workflow. The Host, Port, CodePage, Model, TLS, and LUName properties configure the terminal connection, and Steps contains the workflow steps to execute. CodePage is optional and overridden by the -codePage CLI flag; Model defaults to 3279-2 and is overridden by -model; TLS requires TLSSkipVerify to be set if skipping certificate validation. ```json { "Host": "mvs.example.com", "Port": 992, "CodePage": "cp278", "Model": "4", "TLS": true, "LUName": "LU01", "Steps": [ { "Type": "Connect" }, { "Type": "Disconnect" } ] } ``` -------------------------------- ### capabilities object example Source: https://github.com/3270io/3270connect/blob/main/docs/compatibility-profile-schema.md Shows the capabilities object with ind_file, query_reply_ids, and unknown queries. The unknown list is the primary signal for spotting mainframe-vs-Rocket divergence. ```json { "ind_file": "yes" | "no" | "unknown", "query_reply_ids": ["..."], "unknown": ["BindPluName", "Tn3270eOptions"] } ``` -------------------------------- ### protocol object example Source: https://github.com/3270io/3270connect/blob/main/docs/compatibility-profile-schema.md Shows the protocol object with TN3270E negotiation outcome and negotiated functions. ```json { "tn3270e": true, "bind_image_present": true, "structured_fields": true, "lu_name": "LU01", "negotiated_functions": ["BIND-IMAGE", "RESPONSES", "SYSREQ"] } ``` -------------------------------- ### Run 3270 Sample Application with -runApp Source: https://github.com/3270io/3270connect/blob/main/docs/basic-usage.md Runs a test 3270 sample application to assist with testing workflow features. The optional [number] selects an available app (e.g., 1 for Example 1, 2 for Dynamic RSS Reader). The app listens on port 3270, then run a separate 3270Connect with the provided workflow.json to test. ```bash 3270Connect -runApp ``` ```bash 3270Connect -runApp [number] ``` -------------------------------- ### Start dashboard alongside a load test Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Runs a load test with the dashboard automatically enabled. The dashboard starts automatically when -concurrent is greater than 1 or -runtime is set. ```bash 3270Connect -config workflow.json -concurrent 25 -runtime 600 ``` -------------------------------- ### timing object example Source: https://github.com/3270io/3270connect/blob/main/docs/compatibility-profile-schema.md Shows the timing object with connect, first-screen, and keyboard-unlock latencies in milliseconds. Zero indicates the value was not measured. ```json {"connect_ms": 142, "first_screen_ms": 38, "keyboard_unlock_ms": 38} ``` -------------------------------- ### Download and install 3270Connect on Linux Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Downloads the latest Linux binary directly from GitHub, makes it executable, and moves it to /usr/local/bin. The binary is self-contained; s3270 is written to a temporary directory on first connection and run history is stored in ~/.config/3270Connect/. ```shell curl -fsSLO https://github.com/3270io/3270Connect/releases/latest/download/3270Connect_linux chmod +x 3270Connect_linux sudo mv 3270Connect_linux /usr/local/bin/3270connect ``` -------------------------------- ### GET /whoami Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Returns who is signed in and whether they may administer. ```APIDOC ## GET /whoami ### Description Returns who is signed in and whether they may administer. ### Method GET ### Endpoint /whoami ### Response #### Success Response (200) - **body** (application/json) - User identity and admin status. #### Response Example { "user": "...", "admin": false } ``` -------------------------------- ### Connect Source: https://github.com/3270io/3270connect/blob/main/docs/workflow.md Establishes a connection to the terminal. This step is essential to start the interaction with the terminal. ```APIDOC ## Connect ### Description Establishes a connection to the terminal. This step is essential to start the interaction with the terminal. ### Parameters None. ### Usage This step is essential to start the interaction with the terminal. ``` -------------------------------- ### GET /dashboard Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Returns the console page HTML. ```APIDOC ## GET /dashboard ### Description Returns the console page HTML. ### Method GET ### Endpoint /dashboard ### Response #### Success Response (200) - **body** (text/html) - The console page HTML. #### Response Example (HTML content) ``` -------------------------------- ### Example CompatibilityProfile JSON output Source: https://github.com/3270io/3270connect/blob/main/docs/host-profiler.md Shows the structure of the CompatibilityProfile JSON document written by the profiler, including schema version, run ID, timestamp, profiler info, host details, device capabilities, protocol options, and timing measurements. ```json { "schema_version": "1.0.0", "run_id": "8f3b2c1a...", "timestamp": "2026-05-18T10:11:12Z", "profiler": { "tool": "3270Connect", "version": "1.8.6" }, "host": { "host": "mvs01.example.com", "port": 992, "tls": true, "banner_signature": "9b6f...", "banner_preview": "WELCOME TO MVS01 ..." }, "device": { "terminal_type": "IBM-3279-2-E", "rows": 24, "cols": 80, "color": true, "extended_attributes": true, "alt_screen": false }, "protocol": { "tn3270e": true, "bind_image_present": true, "structured_fields": true }, "capabilities": { "ind_file": "unknown", "query_reply_ids": ["..."], "unknown": [] }, "timing": { "connect_ms": 142, "first_screen_ms": 38, "keyboard_unlock_ms": 38 } } ``` -------------------------------- ### Single workflow JSON configuration Source: https://github.com/3270io/3270connect/blob/main/docs/basic-usage.md Example workflow configuration for a single run. It connects to a host, captures the screen, fills two fields, presses Enter, captures again, and disconnects. EveryStepDelay paces steps, StepDelay adds a longer pause before Enter, and EndOfTaskDelay holds the virtual user after completion. WaitForField defaults to true and waits before all steps once connected. ```json { "Host": "10.27.27.62", "Port": 3270, "CodePage": "cp037", // optional host code page / charset; omit to use the emulator default "EveryStepDelay": { "Min": 0.1, "Max": 0.3 }, "WaitForField": true, // optional (default true) to wait before all steps once connected "OutputFilePath": "output.html", // optional; if omitted a temp file is used "RampUpBatchSize": 10, //optional for concurrency runs "RampUpDelay": 1, //optional for concurrency runs "EndOfTaskDelay": { "Min": 30, "Max": 90 }, "Steps": [ { "Type": "Connect" }, { "Type": "AsciiScreenGrab" }, { "Type": "CheckValue", "Coordinates": {"Row": 1, "Column": 29, "Length": 24}, "Text": "3270 Example Application" }, { "Type": "FillString", "Coordinates": {"Row": 5, "Column": 21}, "Text": "user1-firstname" }, { "Type": "FillString", "Coordinates": {"Row": 6, "Column": 21}, "Text": "user1-lastname" }, { "Type": "AsciiScreenGrab" }, { "Type": "StepDelay", "StepDelay": { "Min": 1.0, "Max": 2.0 } }, { "Type": "PressEnter" }, { "Type": "CheckValue", "Coordinates": {"Row": 1, "Column": 29, "Length": 24}, "Text": "3270 Example Application" }, { "Type": "AsciiScreenGrab" }, { "Type": "Disconnect" } ] } ``` -------------------------------- ### Configure MCP server via 3270Connect.env Source: https://github.com/3270io/3270connect/blob/main/docs/mcp.md Example 3270Connect.env file read at startup by the MCP server. Real environment variables take precedence, so a deployment can override the file without editing it. Prefer this over the env block in claude_desktop_config.json for anything secret, especially RSA_TOKEN. ```ini # 3270Connect.env MCP_TOOLS=load MCP_MAX_CONCURRENT=100 MCP_ALLOWED_HOSTS=*.test.example.com RSA_TOKEN=... ``` -------------------------------- ### GET /dashboard/summary?pid= Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Returns the plain-text performance summary for a process. ```APIDOC ## GET /dashboard/summary?pid= ### Description Returns the plain-text performance summary for a process. ### Method GET ### Endpoint /dashboard/summary?pid= ### Parameters #### Query Parameters - **pid** (string) - Required - The process ID. ### Response #### Success Response (200) - **body** (text/plain) - The performance summary. #### Response Example (Plain text summary) ``` -------------------------------- ### profiler object example Source: https://github.com/3270io/3270connect/blob/main/docs/compatibility-profile-schema.md Shows the profiler object with tool and version fields. The tool is either "3270Web" or "3270Connect". ```json {"tool": "3270Web" | "3270Connect", "version": ""} ``` -------------------------------- ### Build and run Docker images Source: https://github.com/3270io/3270connect/blob/main/CLAUDE.md Builds the Linux or Windows Docker images and runs the console with Docker Compose. The Linux image is linux/amd64 only, uses a glibc runtime, runs as non-root uid 10001, stores state in /data via XDG_CONFIG_HOME, and defaults to CMD ["-dashboard"]. The Windows image must be built on a Windows host. The compose file with the lab configuration also starts a terminal and a 3270 host. ```bash docker build -f Dockerfile -t 3270connect . # Linux docker build -f Dockerfile.windows -t 3270connect . # Windows (on a Windows host) docker compose up -d # the console alone docker compose -f docker-compose.lab.yml up -d # + a terminal and a 3270 host ``` -------------------------------- ### GET /admin/api/overview Source: https://github.com/3270io/3270connect/blob/main/docs/administration.md Retrieves the overview's counters and recent trail. ```APIDOC ## GET /admin/api/overview ### Description Returns the overview's counters and recent trail. ### Method GET ### Endpoint /admin/api/overview ### Response #### Success Response (200) - **counters** (object) - Overview counters - **recentTrail** (array) - Recent trail entries #### Response Example { "counters": {}, "recentTrail": [] } ``` -------------------------------- ### GET /console or /console?pid= Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Returns log entries as JSON for all processes or a specific process. ```APIDOC ## GET /console or /console?pid= ### Description Returns log entries as JSON for all processes or a specific process. ### Method GET ### Endpoint /console or /console?pid= ### Parameters #### Query Parameters - **pid** (string) - Optional - The process ID to filter logs. ### Response #### Success Response (200) - **body** (application/json) - Log entries as JSON. #### Response Example { "logs": [] } ``` -------------------------------- ### Run 3270connect with CLI flags Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Shows common command-line invocations: start the dashboard console on port 9200, run a workflow from a config file, and run a specific app with a custom port. ```shell 3270connect -dashboard # the console on :9200 3270connect -config workflow.json # one run 3270connect -runApp 1 -runApp-port 3270 # a 3270 host to aim at ``` -------------------------------- ### Run the console on port 9200 Source: https://github.com/3270io/3270connect/blob/main/docs/basic-usage.md Starts the operations console, which listens on port 9200. This is the default command when no other flags are given. ```bash docker run --rm -p 9200:9200 ghcr.io/3270io/3270connect:latest ``` -------------------------------- ### host object example Source: https://github.com/3270io/3270connect/blob/main/docs/compatibility-profile-schema.md Shows the host object with network identity and banner fingerprint. The banner_signature is a sha256 hex of the first screen after normalization. ```json { "host": "mvs01.example.com", "port": 992, "tls": true, "banner_signature": "", "banner_preview": "first ~240 chars of first screen, normalised" } ``` -------------------------------- ### Download 3270Connect on Windows with PowerShell Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Downloads the Windows executable using PowerShell and optionally moves it to a PATH directory (requires admin). Double-clicking the executable with no arguments starts the console in a window. ```powershell $latest = "https://github.com/3270io/3270Connect/releases/latest/download/3270Connect.exe" Invoke-WebRequest -Uri $latest -OutFile 3270Connect.exe # Optionally, move it somewhere on PATH (requires admin) # Move-Item -Path 3270Connect.exe -Destination "C:\Program Files\3270Connect.exe" ``` -------------------------------- ### Set model, TLS, and LU name on command line Source: https://github.com/3270io/3270connect/blob/main/docs/basic-usage.md Command-line settings for screen size, TLS, and LU name. Model 4 starts on the 24-row primary screen and moves to 43 rows when the host writes to the alternate size; TLS enables certificate validation (use -tlsSkipVerify to disable); LUName binds to a named logical unit. ```bash # a 43x80 model 4 session, over TLS, bound to a named LU 3270Connect -config workflow.json -model 4 -tls -luName LU01 ``` -------------------------------- ### Show help with make help Source: https://github.com/3270io/3270connect/blob/main/docs/MAKEFILE_README.md Shows all available targets and current configuration. ```bash make help ``` -------------------------------- ### raw object example Source: https://github.com/3270io/3270connect/blob/main/docs/compatibility-profile-schema.md Shows the optional raw object with s3270 Query responses keyed by query name. Only emitted when collect_raw or -profileCollectRaw is passed. ```json {"ScreenSizeMax": "rows 43 columns 80", "Model": "IBM-3279-2-E"} ``` -------------------------------- ### Workflow step JSON with FillString and Coordinates Source: https://github.com/3270io/3270connect/blob/main/internal/agent/builtin/instructions/workflow-authoring.instructions.md Example of a workflow step using the required keys Type, Coordinates, and Text. Coordinates are 1-based, so the top-left cell is Row 1, Column 1. Use {{placeholder}} in Text and supply an injection file to map placeholders to per-user values. ```json { "Type": "FillString", "Coordinates": { "Row": 10, "Column": 20, "Length": 8 }, "Text": "{{username}}" } ``` -------------------------------- ### GET /dashboard/output?pid= Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Returns the captured screens for a process. Supports byte offset for incremental retrieval. ```APIDOC ## GET /dashboard/output?pid= ### Description Returns the captured screens for a process. Supports byte offset for incremental retrieval. ### Method GET ### Endpoint /dashboard/output?pid= ### Parameters #### Query Parameters - **pid** (string) - Required - The process ID. - **from** (integer) - Optional - Byte offset to return only appended data after that offset. ### Response #### Success Response (200) - **body** (application/octet-stream) - The captured screens. - **X-Output-From** (string) - The byte offset of the returned data. - **X-Output-Total** (string) - Total size of the output. - **X-Output-Reset** (string) - Present when the file has been replaced under the reader. #### Response Example (Output data) ``` -------------------------------- ### GET /terminal-console?pid= Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Returns the same log lines as plain text for a specific process. ```APIDOC ## GET /terminal-console?pid= ### Description Returns the same log lines as plain text for a specific process. ### Method GET ### Endpoint /terminal-console?pid= ### Parameters #### Query Parameters - **pid** (string) - Required - The process ID. ### Response #### Success Response (200) - **body** (text/plain) - The log lines as plain text. #### Response Example (Plain text log lines) ``` -------------------------------- ### Build for the First Time Source: https://github.com/3270io/3270connect/blob/main/MAKEFILE_QUICKREF.md Build Linux binaries only, recommended for first-time builds. ```bash make linux-only ``` -------------------------------- ### Lab URLs for terminal and console Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Shows the URLs for the lab's terminal and console after installation. The terminal connects to host "sampleapps" on port 3271, and the console is available at localhost:9200. ```text http://localhost:3270 the terminal. Connect to host "sampleapps", port 3271 http://localhost:9200 the console ``` -------------------------------- ### Workflow JSON with CodePage property Source: https://github.com/3270io/3270connect/blob/main/README.md Example workflow JSON that sets the host code page to cp278 via the CodePage property. In API mode, the per-request CodePage property wins over the -codePage flag the server was started with. ```json { "Host": "mvs.example.com", "Port": 992, "CodePage": "cp278", "Steps": [ ... ] } ``` -------------------------------- ### InitializeOutput Source: https://github.com/3270io/3270connect/blob/main/docs/workflow.md Re-initializes the workflow output file. This step is optional and rarely needed as the output file is automatically initialized at the start of each workflow run. ```APIDOC ## InitializeOutput ### Description Re-initializes the workflow output file. This step is optional and rarely needed as the output file is automatically initialized at the start of each workflow run. ### Parameters None. ### Usage In most cases you do not need this step: the output file is initialized automatically at the start of each workflow run. The output destination comes from the top-level `OutputFilePath` setting (CLI mode) or an internal temporary file (API mode). ``` -------------------------------- ### Run the 3270connect console with Docker Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Starts the operations console in a detached container. The image sets DASHBOARD_BIND=0.0.0.0 so the console is reachable from the host; the port mapping controls exposure. The console is available at http://localhost:9200/dashboard. ```shell docker run -d --name 3270connect \ -p 127.0.0.1:9200:9200 \ -e DASHBOARD_BIND=0.0.0.0 \ -v "$PWD/data":/data \ ghcr.io/3270io/3270connect:latest ``` -------------------------------- ### Run 3270Connect with concurrent workers and headless mode Source: https://github.com/3270io/3270connect/blob/main/docs/index.md Use this command to start a 3270Connect load run with 25 concurrent workers for 60 seconds in headless mode, using the specified workflow configuration file. The output shows successful connection to the mainframe, spawned workers, executed steps, and Prometheus metrics scraping. ```bash 3270Connect -config workflow.json \ -concurrent 25 -runtime 60 -headless › connect mvs.example.com:992 [ok] › workers 25 spawned [live] › steps FillString · PressEnter [ok] › metrics :9090/metrics scraped [up] › ``` -------------------------------- ### 3270Web POST /chaos/mindmap/compare Source: https://github.com/3270io/3270connect/blob/main/docs/host-profiler.md Endpoint that visualises differences between CompatibilityProfile JSON documents across hosts. Feed both profiles to get a divergence report. ```APIDOC ## POST /chaos/mindmap/compare ### Description Visualises differences between CompatibilityProfile JSON documents across hosts. Feed both profiles to get a divergence report. ### Method POST ### Endpoint `/chaos/mindmap/compare` ### Request Body - **profiles** (array of CompatibilityProfile) - Required - The profiles to compare. ### Response #### Success Response (200) - **divergence_report** (object) - The divergence report. ### Notes This endpoint is part of 3270Web's Chaos Mind-Map Compare feature. ``` -------------------------------- ### Run concurrent workflow with -concurrent and -runtime Source: https://github.com/3270io/3270connect/blob/main/docs/terminal-ui.md Run a workflow with multiple workers to switch to a live stats row printed every five seconds. The dashboard starts automatically and its address is printed above the stats. ```bash 3270Connect -config workflow.json -concurrent 4 -runtime 12 ``` -------------------------------- ### Enable /metrics endpoint with -promListen flag Source: https://github.com/3270io/3270connect/blob/main/docs/metrics.md Starts the metrics listener on the given host:port. Disabled when empty (the default). The listener uses a 5-second read-header timeout and runs in its own goroutine; failures are logged but never abort the workflow runner. ```bash 3270Connect -config workflow.json -concurrent 10 -runtime 300 -promListen :9091 ``` -------------------------------- ### Extension pack folder layout and 3270-extension.json manifest Source: https://github.com/3270io/3270connect/blob/main/docs/skills.md Shows the folder layout for an extension pack and the required 3270-extension.json manifest. The manifest declares the pack name, version, product requirement (3270Connect 1.9.0+), and the contributed skills, instructions, and workflows. Install by unzipping into extensions/ and restarting; disable without deleting by listing the name in extensions/.disabled. ```text extensions/ acme-billing/ 3270-extension.json skills/ acme-billing-load/SKILL.md instructions/ acme-conventions.instructions.md workflows/ billing.json ``` ```json { "schemaVersion": 1, "name": "acme-billing", "version": "1.0.0", "displayName": "ACME billing load pack", "description": "Load profiles and conventions for the ACME billing region.", "requires": { "product": "3270Connect", "minVersion": "1.9.0" }, "contributes": { "skills": [{ "dir": "skills/acme-billing-load", "name": "acme-billing-load" }], "instructions": [{ "file": "instructions/acme-conventions.instructions.md" }], "workflows": [{ "file": "workflows/billing.json" }] } } ``` -------------------------------- ### Customize Theme Colors in :root Source: https://github.com/3270io/3270connect/blob/main/mainframe-theme.md Shows how to customize theme colors by modifying CSS variables in the :root selector, with examples for a warmer terminal green and a different accent color. ```css :root { /* Example: Warmer terminal green */ --foreground: oklch(0.75 0.15 160); /* Example: Different accent color */ --accent: oklch(0.70 0.15 60); /* More yellow */ } ``` -------------------------------- ### Build Everything Source: https://github.com/3270io/3270connect/blob/main/MAKEFILE_QUICKREF.md Build all binaries for Linux and Windows (default target). ```bash make all ``` -------------------------------- ### Build documentation with mkdocs Source: https://github.com/3270io/3270connect/blob/main/README.md Builds the project documentation using mkdocs. ```bash mkdocs build ``` -------------------------------- ### Build 3270Connect from source Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Clones the repository, builds binaries into dist/ with build.sh, and runs tests. Requires Go 1.25 or newer; the embedded x3270 binaries are produced separately (see BUILD.md). ```shell git clone https://github.com/3270io/3270Connect.git cd 3270Connect ./build.sh # binaries into dist/ go test ./... ``` -------------------------------- ### Terminal Command Output with Status Indicators Source: https://github.com/3270io/3270connect/blob/main/mainframe-theme.md Terminal command output example showing a system status command and its response. Displays network and status indicators with accent colors and a blinking cursor. Useful for simulating terminal interactions in the UI. ```html
$ system status
Checking system components...
NETWORK: SECURE
STATUS: OPERATIONAL
$ █
``` -------------------------------- ### Run 3270Connect in API mode with -api and -api-port Source: https://github.com/3270io/3270connect/blob/main/docs/advanced-features.md Starts 3270Connect as an API server on port 8080. The -config flag is optional here because each request to /api/execute carries its own workflow; it is still required when running from the command line. ```bash 3270Connect -api -api-port 8080 ``` -------------------------------- ### GET /admin/api/tokens Source: https://github.com/3270io/3270connect/blob/main/docs/administration.md Lists all tokens. ```APIDOC ## GET /admin/api/tokens ### Description Lists all tokens. ### Method GET ### Endpoint /admin/api/tokens ### Response #### Success Response (200) - **tokens** (array) - List of tokens #### Response Example { "tokens": [] } ``` -------------------------------- ### GET /admin/api/groups Source: https://github.com/3270io/3270connect/blob/main/docs/administration.md Lists all groups. ```APIDOC ## GET /admin/api/groups ### Description Lists all groups. ### Method GET ### Endpoint /admin/api/groups ### Response #### Success Response (200) - **groups** (array) - List of groups #### Response Example { "groups": [] } ``` -------------------------------- ### Run 3270Connect with Finnish/Swedish code page (cp278) Source: https://github.com/3270io/3270connect/blob/main/README.md Use this command to start 3270Connect with the Finnish/Swedish host code page cp278. The -codePage flag overrides the CodePage property in the workflow JSON. The value is passed directly to the embedded x3270/s3270 -codepage option, so any recognized code page name, alias, or number is accepted. ```bash 3270Connect -config workflow.json -codePage cp278 ``` -------------------------------- ### Set grace period and auto-shutdown with -gracePeriod and -autoShutdown Source: https://github.com/3270io/3270connect/blob/main/docs/basic-usage.md Sets grace period to 60 seconds and auto-shutdown countdown to 20 seconds. After the runtime deadline, in-flight workflows get extra time; if still running after grace, prompts 'Continue waiting? (y/N)' and counts down before shutdown. ```bash 3270Connect -config workflow.json -concurrent 10 -runtime 120 -gracePeriod 60 -autoShutdown 20 ``` -------------------------------- ### List MCP tools with --list-tools Source: https://github.com/3270io/3270connect/blob/main/docs/mcp.md Prints the tool catalogue as JSON and exits. It requires no host, workflow, or run in progress; seeing JSON confirms the server wiring is correct. ```bash 3270Connect mcp --list-tools ``` -------------------------------- ### GET /admin/api/users Source: https://github.com/3270io/3270connect/blob/main/docs/administration.md Lists all user accounts. ```APIDOC ## GET /admin/api/users ### Description Lists all user accounts. ### Method GET ### Endpoint /admin/api/users ### Response #### Success Response (200) - **users** (array) - List of user accounts #### Response Example { "users": [] } ``` -------------------------------- ### Build and run commands Source: https://github.com/3270io/3270connect/blob/main/CLAUDE.md Commands to build the project and run it with various options: workflow execution, concurrent load testing, API server mode, embedded sample app, user/token management, and tests. ```bash # Build binaries (outputs to dist/) ./build.sh # Run with a workflow ./dist/3270Connect -config workflow.json # Concurrent load test (10 workers, 60s) ./dist/3270Connect -config workflow.json -concurrent 10 -runtime 60 # API server mode ./dist/3270Connect -api -api-port 8080 # Run embedded sample app for testing ./dist/3270Connect -runApp 1 -runApp-port 3270 # Accounts (only meaningful with AUTH_MODE=local or oidc) ./dist/3270Connect user add root --admin ./dist/3270Connect token add root "ci pipeline" # Tests go test -v ./... # Unit tests only — skips the compatibility suite, which launches emulators go test -short ./... # The compatibility suite alone go test -run TestCompat -v ./connect3270/ ``` -------------------------------- ### GET /admin/api/audit.jsonl Source: https://github.com/3270io/3270connect/blob/main/docs/administration.md Returns the whole trail, oldest first. ```APIDOC ## GET /admin/api/audit.jsonl ### Description Returns the whole trail, oldest first. ### Method GET ### Endpoint /admin/api/audit.jsonl ### Response #### Success Response (200) - **audit** (array) - Full audit trail entries #### Response Example { "audit": [] } ``` -------------------------------- ### GET /admin/api/runs Source: https://github.com/3270io/3270connect/blob/main/docs/administration.md Returns every load run on the machine. ```APIDOC ## GET /admin/api/runs ### Description Returns every load run on the machine. ### Method GET ### Endpoint /admin/api/runs ### Response #### Success Response (200) - **runs** (array) - List of load runs #### Response Example { "runs": [] } ``` -------------------------------- ### Build all binaries with make Source: https://github.com/3270io/3270connect/blob/main/docs/MAKEFILE_README.md Builds all binaries for both Linux and Windows platforms. This is the default target and performs the full build process including cloning the x3270 repository, checking out version 4.4ga6, building, stripping, testing, and saving version info to .x3270_version. ```bash make ``` -------------------------------- ### GET /admin/api/audit Source: https://github.com/3270io/3270connect/blob/main/docs/administration.md Returns the recent trail, with an optional limit up to 2000. ```APIDOC ## GET /admin/api/audit ### Description Returns the recent trail, with an optional limit up to 2000. ### Method GET ### Endpoint /admin/api/audit ### Query Parameters - **limit** (integer) - Optional - Maximum number of entries (up to 2000) ### Response #### Success Response (200) - **audit** (array) - Recent audit trail entries #### Response Example { "audit": [] } ``` -------------------------------- ### Run 3270Connect -profile with explicit host, port, TLS, and output Source: https://github.com/3270io/3270connect/blob/main/docs/host-profiler.md Connects once to a TN3270 host, probes its terminal model, protocol options, and capabilities, and writes a CompatibilityProfile JSON document to the specified output file. The process exits non-zero on failure so CI can fail fast. ```bash 3270Connect -profile -profileHost mvs01.example.com -profilePort 992 -profileTLS \ -profileOut mvs01.profile.json ``` -------------------------------- ### Build Windows binaries with make windows Source: https://github.com/3270io/3270connect/blob/main/docs/MAKEFILE_README.md Builds only the Windows binaries (s3270.exe, x3270if.exe, ws3270.exe, wc3270.exe). ```bash make windows ``` -------------------------------- ### Run the sample workflow in the lab Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Runs the pre-configured workflow against the lab's sample applications. The workflow file is workflow-sampleapp.json and the command runs in headless mode. ```shell cd 3270-lab docker compose run --rm 3270connect -config workflow-sampleapp.json -headless ``` -------------------------------- ### Run headless with an output directory Source: https://github.com/3270io/3270connect/blob/main/docs/basic-usage.md Mounts a directory for output so the container can write results back. Bind-mounting a file that does not exist yet creates a directory instead, so create the output directory first. ```bash mkdir -p out docker run --rm -v "$PWD/workflow.json":/data/workflow.json -v "$PWD/out":/data/out \ ghcr.io/3270io/3270connect:latest -config workflow.json -headless ``` -------------------------------- ### Configuration Commands Source: https://github.com/3270io/3270connect/blob/main/MAKEFILE_QUICKREF.md Commands to build with a specific version and to check the current version. ```bash # Use a different version make X3270_VERSION=4.3ga10 linux-only # Check current version make help ``` -------------------------------- ### GET /healthz Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Liveness endpoint for container health checks or uptime probes. Does not require authentication. ```APIDOC ## GET /healthz ### Description Liveness endpoint for container health checks or uptime probes. Does not require authentication. ### Method GET ### Endpoint /healthz ### Response #### Success Response (200) - **body** (text/plain) - Liveness status. #### Response Example OK ``` -------------------------------- ### GET /dashboard/workflow?pid= Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Returns the workflow JSON for a specific process identified by its PID. ```APIDOC ## GET /dashboard/workflow?pid= ### Description Returns the workflow JSON for a specific process identified by its PID. ### Method GET ### Endpoint /dashboard/workflow?pid= ### Parameters #### Query Parameters - **pid** (string) - Required - The process ID. ### Response #### Success Response (200) - **body** (application/json) - The workflow JSON for the process. #### Response Example { "workflow": {} } ``` -------------------------------- ### Build specific version with make X3270_VERSION Source: https://github.com/3270io/3270connect/blob/main/docs/MAKEFILE_README.md Builds a specific version (4.3ga10) and verifies it with the s3270 binary. ```bash # Build version 4.3ga10 make X3270_VERSION=4.3ga10 deepclean all # Verify the version ./binaries/linux/s3270 -v ``` -------------------------------- ### GET /dashboard/data Source: https://github.com/3270io/3270connect/blob/main/docs/dashboard.md Returns metrics as JSON for every running process, or the last snapshot when none are running. ```APIDOC ## GET /dashboard/data ### Description Returns metrics as JSON for every running process, or the last snapshot when none are running. ### Method GET ### Endpoint /dashboard/data ### Response #### Success Response (200) - **body** (application/json) - Metrics for all running processes, or the last snapshot. #### Response Example { "aggregated": {} } ``` -------------------------------- ### Prepare /data for bind mount Source: https://github.com/3270io/3270connect/blob/main/docs/installation.md Prepares a bind-mounted /data folder for the container, which runs as uid 10001. The container writes metrics, logs, and workflow output to /data; a named volume does not need this step. ```shell mkdir -p ./data && sudo chown -R 10001:10001 ./data ``` -------------------------------- ### Build Linux binaries with make linux Source: https://github.com/3270io/3270connect/blob/main/docs/MAKEFILE_README.md Builds only the Linux binaries (s3270, x3270if, x3270). ```bash make linux ``` -------------------------------- ### Build with custom version using make X3270_VERSION Source: https://github.com/3270io/3270connect/blob/main/docs/MAKEFILE_README.md Specifies a different x3270 version to build. The Makefile tracks the last built version in .x3270_version; building the same version again will skip the build unless make deepclean is run first. ```bash make X3270_VERSION=4.3ga10 all ``` -------------------------------- ### Build x3270 binaries with Makefile Source: https://github.com/3270io/3270connect/blob/main/CLAUDE.md Builds the embedded x3270 binaries for Linux, Windows, or both platforms. Use 'make linux' for Linux, 'make windows' for cross-compiling to Windows, and 'make all' for both. Pre-built binaries are checked into the 'binaries/' directory. ```bash make linux # Build s3270/x3270if for Linux make windows # Cross-compile for Windows make all # Both platforms ```