Est. 1994 Beginner

Tera Term Pro Macro

Tera Term Language (TTL), the BASIC-like scripting language interpreted by TTPMACRO to automate logins, file transfers, and terminal sessions in the Tera Term emulator for Windows.

Created by Takashi Teranishi (later maintained by the Tera Term Project)

Paradigm Imperative scripting; interpreted terminal-automation macro language
Typing Dynamic and weak; two value types only — signed 32-bit integers and strings (historically limited to 255 characters)
First Appeared Around 1994, alongside the first releases of Tera Term Pro (exact first-appearance year of the macro is not precisely documented)
Latest Version Bundled with Tera Term 5.6.1 (released April 2026)

Tera Term Pro Macro — properly the Tera Term Language (TTL) — is a small, interpreted scripting language for automating the Tera Term terminal emulator on Windows. Scripts are plain text files with a .ttl extension, executed by a companion interpreter historically called TTPMACRO (TTPMACRO.EXE). Its purpose is narrow and practical: drive a terminal session without a human at the keyboard — dial a connection, log in, send commands, transfer files, and react to whatever the remote side prints back. In spirit it belongs to the same family as Unix expect, but it grew up inside a Japanese freeware terminal program that became a fixture of Windows-based network and serial-console work.

History & Origins

Tera Term was created by Takashi Teranishi and first released in 1994 as free software in Japan. At the time it stood out as one of the few freely available Windows terminal emulators with strong Japanese-language support, alongside VT100/VT-series emulation, Telnet, and serial-port connections. The macro subsystem dates to this same early period: the TTPMACRO documentation carries a copyright of 1994–1997 in Teranishi’s name, so the TTL language is essentially as old as Tera Term itself, even though its exact first-appearance version is not precisely recorded.

The early program was written in Pascal; version 1.4 — released reportedly around 1995, though the exact date is not officially documented — was the last release to support 16-bit Windows (Windows 3.1). By version 2.3 (1998) — the final release Teranishi himself shipped — Tera Term targeted Windows 95 and NT and its scripting language and file-transfer support had matured. That same year, Robert O’Callahan released the TTSSH plugin, adding SSH1 to what had been a Telnet-and-serial tool.

After Teranishi stepped back, development branched. Ayera Technologies produced a commercial-lineage TeraTerm Pro 3.1.3 in 2002 that added SSH2 and extended the macro scripting language (notably with ODBC database access). Independently, in 2004, Yutaka Hirata restarted an open-source line from the version 2.3 code base, and the Tera Term Project was launched, numbering its releases 4.xx to keep them distinct. That open-source project has maintained Tera Term — and the TTL language along with it — ever since, moving through SourceForge/OSDN to GitHub, and reaching the 5.x series in recent years.

Design Philosophy

TTL is deliberately simple. Its own documentation describes it as “a simple interpreted language like BASIC,” and that comparison is apt: numbered-line thinking, goto/gosub control flow, and a flat namespace of variables. The design goal was accessibility for the people who actually needed it — network operators, administrators, and hobbyists automating dial-up and login chores — not language elegance.

Two ideas define the language:

  • The macro controls the terminal, not the other way around. TTL is an external driver. The interpreter (TTPMACRO) runs as its own process and steers a Tera Term session, so a script is fundamentally a sequence of “send this, wait for that” interactions against a live connection.
  • Everything is an integer or a string. The type system has exactly two value types: signed 32-bit integers and strings (historically capped at 255 characters). There are no records, no floating-point in the classic core, and no user-defined types — just enough to hold a hostname, a password, a counter, and a captured line of output.

Key Features

The command vocabulary is organized around the tasks of terminal automation:

  • Communicationconnect, disconnect, send/sendln, wait, waitln, recvln, and timeout controls to script the send-and-expect rhythm of a session.
  • Control flowif/then/else/endif, goto, gosub/return, while/endwhile, and for/next, giving the language ordinary structured and unstructured control despite its BASIC-like feel.
  • String and integer operations — concatenation, substring, search, case conversion, and integer arithmetic for building commands and parsing responses.
  • File operations and logging — open, read, write, and append to files, plus session logging, so captured output can be persisted.
  • File-transfer protocols — scripted XMODEM, ZMODEM, Kermit, B-Plus, and Quick-VAN transfers over the active connection.
  • Password handling — commands that read from and write to an encrypted password file, so credentials need not sit in plaintext inside a .ttl script.
  • User interaction — message boxes, input boxes, and yes/no dialogs, letting a macro prompt an operator mid-run.

A minimal auto-login macro shows the flavor:

; connect to a host over SSH and log in
connect '/ssh /2 host.example.com /user=admin'
wait 'Password:'
sendln 'secret'
wait '$'
sendln 'show version'

Evolution

Because TTL ships inside Tera Term rather than as a standalone product, the language evolved with the emulator. New connection types brought new macro capabilities: the SSH work of the late 1990s and 2000s meant connect could open encrypted sessions, and Ayera’s branch famously added ODBC database access from macros. The open-source Tera Term Project has continued to extend the command set, refine string and file handling, and keep the interpreter working on modern 64-bit Windows, all while preserving backward compatibility with decades-old .ttl scripts. The macro reference is maintained as part of the official 4.x and 5.x manuals.

Current Relevance

TTL is a living, if niche, language. Tera Term itself remains a popular free terminal on Windows — version 5.6.1 was released in April 2026 — and the macro engine ships with it. In environments where engineers connect to serial consoles, network gear, and legacy systems from Windows desktops, TTL macros are still written today to script logins, batch commands, and capture logs. It occupies the same practical niche it always has: not a language people study for its own sake, but one they reach for because the terminal they already use happens to be scriptable.

Why It Matters

Tera Term Pro Macro is a small but genuine piece of computing history. It is one of the longer-lived terminal-automation languages still in active use, and it illustrates a pattern that recurs across software: a tool acquires a scripting language almost as an afterthought, and that language outlives the specific hardware and networks it was built for. For a generation of Windows-based network and embedded engineers — especially in Japan, where Tera Term first took hold — TTL was the way you taught a terminal to do the boring parts by itself. That it still ships, still runs old scripts, and is still documented more than three decades after Tera Term’s 1994 debut is a quiet testament to the durability of “simple enough to be useful.”

Timeline

1994
Takashi Teranishi releases Tera Term in Japan as free terminal-emulator software for Windows; the accompanying TTPMACRO interpreter and its TTL macro language date from this early period (TTPMACRO carries a 1994 copyright)
1995
Version 1.4 ships (reportedly around this time; the exact date is not officially documented) as the last release supporting 16-bit Windows (Windows 3.1); the early code base was written in Pascal
1997
The TTPMACRO documentation is published carrying a 1994–1997 copyright, describing TTL support for auto-dialing, auto-login, file-transfer protocols (XMODEM, ZMODEM, Kermit, and others), and encrypted password handling
1998
Version 2.3 — the last release by Teranishi — targets Windows 95/NT with a matured scripting language and ZMODEM transfers; separately, Robert O'Callahan releases the TTSSH plugin adding SSH1 support
2002
Ayera Technologies releases TeraTerm Pro 3.1.3 with SSH2 support and extends the TT macro scripting language, including ODBC database access from macros
2004
Yutaka Hirata restarts open-source development from the version 2.3 base and the Tera Term Project is launched (on SourceForge.jp), with releases numbered 4.xx to distinguish them from Ayera's build
2007
Ongoing maintenance is carried by the Tera Term Project developer team as open-source software, carrying the TTL macro language forward with the emulator
2014
Version 4.81 is released as a "celebrating 20 years" milestone, marking two decades since Tera Term's first appearance
2026
Tera Term 5.6.1 is released (April 2026); TTPMACRO and the TTL language remain bundled and actively maintained, documented for the current 5.x manual

Notable Uses & Legacy

Network device provisioning

Network and telecom engineers use TTL scripts to automate logging into routers, switches, and modems over serial or SSH/Telnet, sending configuration command sequences and capturing output to log files — a direct descendant of the language's original auto-dial and auto-login purpose.

Serial-port and embedded hardware work

Because Tera Term is a long-standing serial terminal on Windows, TTL macros are widely used to drive COM-port sessions: flashing firmware prompts, exercising bootloaders, and stepping embedded devices through provisioning or test sequences.

Automated login and session setup

The connect, wait, sendln, and encrypted password commands let TTL reproduce a full interactive login handshake unattended, so repetitive connect-and-authenticate workflows can be launched from a single .ttl file or command-line invocation.

Unattended file transfer

TTL exposes the emulator's file-transfer protocols (XMODEM, ZMODEM, Kermit, B-Plus, Quick-VAN) as macro commands, allowing scripted uploads and downloads over the same connection used for the terminal session.

Repetitive terminal task automation

System administrators and support engineers use TTL as lightweight glue to script otherwise manual, error-prone keystroke sequences — menu navigation on legacy systems, batch queries, and data capture — with conditionals, loops, and dialog boxes for interaction.

Language Influence

Influenced By

Running Today

Run examples using the official Docker image:

docker pull
Last updated: