Clickity Clackity - Terminal Click Guide

Clickity Clackity

Welcome to Terminal Click!

Terminal Click (TC) is our next-gen emulator that is bringing dead text to life: we capture this notion by saying it’s clickity clackity. Don’t let this fool you, however, as we support keyboard shortcuts for almost every mouse click. TC was inspired by A Constructive Look At TempleOS and Gary Bernhardt’s A Whole New World: we share our heartfelt gratitude to both.

Assuming you’ve joined Early Access let’s walk through TC’s features!

Author’s Note: If you prefer video walkthroughs we’ve got that too.

Cross-Platform

TC works natively on the major OSes: Windows, Mac and Linux. The final executable is ~5MB with the goal of reducing its size further. If you’re on a different platform (NixOS, FreeBSD, etc.) and would like to see support for it, email the author to help us gauge interest: abner at terminal dot click.

All builds are offline binaries. No Internet required.

1. Walkable Working Directory

Although we can still use cd or ls to explore our filesystem, TC offers a faster alternative with the walkable working directory:

// GIF or video

Clicking the working directory allows us to “walk around” the filesystem. The bottom status bar tells us how many folders and non-folder items are within the directory we’re standing on. We can mouse-hover over listed files to see their sizes, permission bits or last modified dates. Certain file types are automatically previewed inside our terminal. (See File Preview.) Double-clicking or pressing <Enter> executes a selected file. Finally, listed files may be filtered down by typing characters to fuzzy-match the ones we want.

The mouse can be avoided with the following shortcuts. macOS users may try the command key <Cmd> instead of <Ctrl>:

Keyboard Shortcut Result
<Ctrl-P> Trigger walk
<Ctrl-P> OR <Backspace> Walk backward
<Ctrl-N> OR <Tab> Walk forward
<Up> OR <Down> Select files within current location
<Esc> Return to starting directory
<Enter> Change working directory to current location

<Esc> or <Enter> will halt the walking process, requiring us to trigger a new walk. Be warned that hitting <Enter> when a file is selected will execute it.

Author’s Note: The Walkable Working Directory is not a file explorer. For example, we can’t copy/delete items or right-click for a context menu. We’re a replacement for cd and ls.

2. File Preview

If we’re walking through directories (see Walkable Working Directory) we can also mouse-hover over listed files, or alternatively use the <Up> and <Down> arrow keys. TC supports the inline preview of certain file types:

Static Images

// GIF or video

Common image types such as PNG and JPEG are supported under TC.

Animated GIFs

// GIF or video

Most animated GIF files are supported under TC.

3D Objects

// GIF or video

Right now TC can only render a subset of GLTF files. It is our desire to support all possible GLTF files and other file formats, so keep an eye on the author’s blog post for updates.

Author’s Note: In upcoming versions we’ll support additional file types such as text and audio.

3. Environment Table

To view or edit environment variables, run the environ built-in command:

// GIF or video

We currently do not preserve changes across terminal sessions (for the sake of extra safety during Early Access.)

4. Command Feedback

TC helps us better understand the commands we run every day, thanks to some built-in features.

Command Suggestions

TC suggests available commands as we type on our keyboard:

// GIF or video

Use the mouse to highlight a suggested command. Clicking it auto-completes it for us. The bottom status bar shows us the install path of our command. We may click this path to trigger a walkable directory and explore it. (see Walkable Working Directory.) Press <Esc> to return to the original directory. The status bar also displays our command’s binary size and its last-modified date. Hit <Enter> to run the command like in any other terminal.

Keyboard Shortcut Result
<Tab> OR <Down> Navigate down the list of suggestions
<Shift-Tab> OR <Up> Navigate up the list of suggestions
<Enter> Auto-complete command (hit <Enter> again to run)

Command Spellchecker

Every time we type out a command, TC detects whether it’s in our PATH environment variable. If we fail to find it, TC underlines the command in red:

// GIF or video

Note that we can attempt to run the command anyway.

Progress Indicator

When a command is actively running we display an animated progress icon:

// GIF or video

This is helpful for long-running programs (e.g. apt update) as we can confirm the terminal itself isn’t hung or frozen.

Instant Exit Code

After a command finishes we immediately display its exit status code:

// GIF or video

Elapsed Time

After a command finishes we immediately display how long it took to execute:

// GIF or video

Bang Bang Expansion

Many of us know about !!. For example if a program we attempted to run needs elevated privileges we just type sudo !! to avoid repeating ourselves. Under TC we automatically expand !! to the previous command:

// GIF or video

We believe it’s helpful to confirm what we’re about to run before we run it.

Grid Visualizer

Run the grid built-in to display a TUI grid. Use the mouse to hover over cells and see their row-column coordinates:

// GIF or video

We believe it’s helpful for TUI authors to visualize the cell grid, which terminals use internally for layout. Run grid again to turn it off.

5. Instant Man Page

Although we can still use man to open man pages, TC offers a faster alternative with instant man pages:

// GIF or video

Simply highlight a suggested command, click the book icon and boom. To avoid the mouse entirely, <Shift-Enter> would also do the trick.

Author’s Note: This feature is experimental on Windows and might fail, as programs don’t have standardized paths for documentation.

6. History Rewind

If we run a bunch of commands most terminals will only preserve their names in our history. Everything else is lost to time: the command’s output, timestamp, exit code and so on. With TC we can “rewind” our commands for playback. Indeed, press the <Up> key to trigger History Rewind. Alternatively, run the hist built-in command:

// GIF or video

Notice how we “scrub” through command output to play back what exactly happened. Each command preserves the date it was executed, how long it took to run and the exit code. The common shortcuts are as follows:

Keyboard Shortcut Result
<Up> OR <F2> Trigger history rewind
<Up> OR <Down> Cycle through old commands
<Ctrl-C> Copy output to clipboard
<Enter> Repeat command
<Shift-Enter> Repeat command under mouse trap (advanced)
<Esc> Exit history rewind

Author’s Note: Users might see the message [Playback Unsupported] for particularly hairy programs like vim. We intend to support them in upcoming versions.

7. Mouse Traps (Advanced)

We can trap or “sandbox” any command with a single mouse click.

// GIF or video

To avoid using the mouse we can press <Shift-Enter> after typing out a command. If the command is already running, <Shift-Enter> would also trap it (we call this live trapping.) Mouse traps stay hidden in the background until we bring them to the foreground again. We might think of this feature as a fancy graphical tmux.

We’re still experimenting with mouse traps as there’s plenty of untapped potential with kinks to iron out. We recommend trying it as a novel curiosity to give the author constructive feedback.

Bonus: Arithmetic

Why reach for Python or qalc when we can just… not?

// GIF or video

The arithmetic expressions one would run inside a Python REPL are recognized natively in our terminal. In addition, results can be converted between decimal, hex, or binary notation.

Author’s Note: Just like Python, exponentiation must be done using **, because the ^ operator is reserved for bitwise logic.