How to edit files in the terminal

Open a text file, type your changes, and press Ctrl+S to save. TTE is a free terminal text editor with tabs, a file explorer, and mouse support for macOS, Linux, and Windows.

You can use it for notes, Markdown, configuration files, or reviewing code alongside your command-line tools. This guide takes you from installation to editing a workspace.

Install TTEPrefer a browser editor?

In this guide

1. Install the terminal editor

macOS or Linux

Run this in your terminal. On a minimal Linux installation, install the download prerequisites first.

curl -fsSL https://trytte.com/install.sh | sh

The installer shows the published version and build before downloading the binary for your operating system and processor. It asks where to install before the download begins, then verifies the SHA-256 checksum and confirms that the binary matches the announced release before installing.

Alpine, Arch Linux, and Ubuntu prerequisites

All three distributions use the same installer. If curl or trusted CA certificates are missing, run the matching command as root, or prefix each package manager invocation with configured sudo or doas:

DistributionPrerequisite command (as root)
Alpineapk add --no-cache curl ca-certificates
Arch Linuxpacman -Syu --needed curl ca-certificates
Ubuntuapt update && apt install curl ca-certificates

The Arch command also performs a full system update. For Ubuntu with sudo, use sudo apt update && sudo apt install curl ca-certificates. See the distribution documentation for Alpine apk, Arch pacman, and Ubuntu APT.

After installing prerequisites, run the macOS/Linux installer above as your normal user. The static Linux binary also runs on Alpine without a glibc compatibility package. Alpine's BusyBox sh/ash and utilities are supported without installing Bash or GNU coreutils.

The installer selects the binary using uname for the operating system and architecture. It checks /etc/alpine-release only to show Alpine setup guidance when curl is missing. It does not detect Arch or Ubuntu or install OS packages automatically. If curl is missing in the one-line download command, the shell fails before the installer can run; install the prerequisites first.

Install location and permissions

Choose the default ~/.local/bin for a per-user installation, /usr/local/bin for a system-wide installation, or option 3 for another absolute directory. A writable destination needs no privilege helper; otherwise the installer uses sudo if available, or doas when sudo is absent. The selected helper must already be configured. Without either helper, run as root or choose a directory you own.

Without a controlling terminal, the default is $HOME/.local/bin; when run as root, this means root's home. Set TTE_INSTALL_DIR to an absolute path on the sh side of the pipeline to skip the prompt:

curl -fsSL https://trytte.com/install.sh | TTE_INSTALL_DIR="$HOME/.local/bin" sh

Use TTE_INSTALL_DIR=/usr/local/bin for an explicit system-wide destination. Run the installer again with the same destination to update that copy.

Add TTE to PATH

If the install directory is already on PATH, tte . works immediately. Otherwise, the installer prints a one-time export PATH="...:$PATH" && tte . command for your current terminal and adds the directory to your shell startup file for future terminals. It preserves existing settings and avoids duplicate entries on repeat installs. It chooses the file from $SHELL:

ShellLinux startup filemacOS startup file
Bash~/.bashrc~/.bash_profile
Zsh~/.zshrc~/.zshrc
sh/ash/dash/ksh, or unset/empty SHELL~/.profile~/.profile

Zsh honors ZDOTDIR when set. Other shells receive manual PATH guidance. If the file is not writable, the installer prints the line to add manually.

A piped installer cannot change its parent terminal's environment. Run the printed command once, open a new terminal, or use the full executable path. After an interactive installation, the installer also offers to open TTE in your current directory immediately. Unattended installs and explicit TTE_INSTALL_DIR installs skip this offer.

command -v tte
tte --version

If this selects an older copy, put the intended directory first on PATH. You can also run "$HOME/.local/bin/tte" . directly before configuring PATH.

Windows

Open PowerShell and run:

irm https://trytte.com/install.ps1 | iex

The Windows installer shows the version, asks for an install directory, then downloads, verifies, and installs TTE. It updates your user PATH and the current PowerShell session. Open a new terminal if an existing terminal does not recognize the command.

You can also download a binary and its checksum directly. TTE runs as a single binary with no runtime dependencies. Run the installer again to update it.

2. Open a file or a folder

Move to the directory containing your files, then open an existing file:

tte notes.txt

To browse the current folder as a workspace, use:

tte .

A directory argument opens the file explorer. With no argument, tte resumes the current workspace with its saved tabs, drafts, and cursor positions. Use quotes around a path containing spaces:

tte "meeting notes.md"

3. Edit, save, and close

Click in the document or move with the arrow keys and start typing. There is no separate insert mode to enter. Select text by dragging the mouse or holding Shift while moving the cursor.

ActionShortcut
Save the active fileCtrl+S
Find textCtrl+F
Find and replaceCtrl+R
Undo / redoCtrl+Z / Ctrl+Y
Sort selected lines alphabeticallyCtrl+K
Go to a lineCtrl+G
Close a tab / quitCtrl+W / Ctrl+Q

Sorting ignores case by default. Turn on Edit → Case-sensitive sort to match case; the choice is saved between sessions. Select at least two lines, or press Ctrl+A to sort the whole file.

On macOS these are Control shortcuts inside TTE. The terminal application may keep Command shortcuts for its own actions. The menus also expose the editor commands.

For a new draft, press Ctrl+T. The first save asks for a path. Auto-save is off by default; enable it under TTE → Experimental if you want named files saved after typing pauses. Draft recovery preserves unsaved work in the session, but saving is what updates your actual file.

4. Work with multiple files

Press Ctrl+O for quick-open, or Ctrl+E to show the explorer. Click a folder to expand it; double-click a file to open it in a tab. The tab bar lets you switch between files without leaving the terminal.

Use Ctrl+N to create a named file. The explorer's ⋯ menu provides rename, duplicate, and Move to Trash for files. If another process changes an open file, TTE reloads a clean buffer. If you have unsaved edits too, it keeps them and asks before overwriting either copy.

5. Read Markdown, CSV, and Excel files

Open a Markdown file and press Ctrl+D to switch between editable source and Smart View (rendered Markdown). The optional outline panel helps navigate headings. For CSV or TSV, Ctrl+D switches between source text and Smart View (an editable table with a cell cursor). Select a cell with the arrows or a click, then press Enter to edit it. Enter applies, Escape cancels, and Tab applies and edits the next cell. Ctrl+Enter adds a newline within a cell; Ctrl+S saves the file. Ctrl+Z and Ctrl+Y undo and redo applied edits.

For an Excel workbook, run tte "report.xlsx". It opens directly as a read-only spreadsheet. Use Tab and Shift+Tab to switch worksheets, arrows to select a cell, and Ctrl+C to copy its displayed value. See how to view Excel files in the terminal for supported formats, formulas, and limits.

Markdown Smart View is read-only; switch back to source to edit it. CSV and TSV support editing both cells in Smart View and the source text. TTE can also preview DOCX, PPTX, and PDF documents, and edit binary data in a hex view. See supported file formats and previews.

Editing on a remote machine over SSH

Install TTE on the remote machine, connect over SSH, and run tte . in the remote folder. The editor reads and saves files on that machine.

Selecting text and pressing Ctrl+C sends it to your local terminal's clipboard through OSC 52, if the terminal permits clipboard writes. This also works when the remote host is a Mac. Paste using your local terminal's paste shortcut.

If tmux is in the connection, it may need set -s set-clipboard on. Terminal support and configuration determine whether clipboard forwarding works. In tmux, use Ctrl+E for the explorer; Ctrl+B may be consumed as the tmux prefix.

Common setup questions

Why does my shell say “tte: command not found”?

Your installation directory may not be on PATH. Follow the PATH command printed by the installer, reopen the shell, or run the full path, such as ~/.local/bin/tte .. On Windows, start a new terminal after installing.

Why do some modified arrow keys fail in Apple Terminal?

Apple Terminal needs mappings for some Shift and Control/Option arrow combinations. In TTE, open Help → Terminal Mappings for the sequences to add to your terminal profile. Ordinary typing, saving, and mouse interaction do not need those mappings.

Can I edit text without installing a terminal program?

Yes. The TTE browser text editor stores a separate workspace locally in your browser. Import files to edit them and export them when you want a copy on your device.