TinyCMD a tiny cmd.exe
AlphaNew software. Things will break, and features are missing.

Version 0.1.0.1818 · Free · Mac · Windows · Linux · FreeBSD · Plan 9

cmd.exe, small. On every computer you have. Free.

TinyCMD is the Windows command prompt in one small program. It runs batch files and the usual commands, with Windows names such as C:\Users, on a Mac, Linux, FreeBSD or Plan 9 as well as on Windows. Its output was checked against the real cmd.exe.

No account, no advertising.

TinyCMD in a terminal: type of a batch file, the batch file run with an argument, and a for loop over the text files

F1 · Language

cmd.exe's language, in cmd.exe's order.

TinyCMD reads a line in the phases cmd.exe uses, so tricky batch files give the answers they give on Windows.

Variables

%VAR%, %VAR:~a,b%, %VAR:x=y%, %0 to %9, %*, %~dpnx1, and !VAR! after SETLOCAL ENABLEDELAYEDEXPANSION.

Control

IF (/I, NOT, EXIST, DEFINED, ERRORLEVEL), FOR (/D, /R, /L, /F), GOTO, CALL, SHIFT, EXIT /B.

Operators

^, ", &, &&, ||, |, <, > and ( ) blocks.

Checked against cmd.exe

Each test case was run with the real cmd.exe on a Windows PC. TinyCMD must give the same output, error output and exit code.

F2 · Commands

The commands you know.

The built-in commands work on the host's files, so they work where there are no programs to start.

  • DIR
  • CD
  • MD
  • RD
  • COPY
  • XCOPY
  • MOVE
  • DEL
  • REN
  • TYPE
  • TREE
  • FIND
  • FINDSTR
  • SORT
  • MORE
  • WHERE
  • SET
  • ECHO
  • VER
  • HELP
  • Windows names. C:\Users\me\notes.txt, found without regard to case.
  • vi built in. VI and VIEW are TinyVi, and its :! runs TinyCMD commands.

F3 · Prompt

The prompt edits lines as the Windows console does.

The arrows, Home, End, Insert and Esc, and Ctrl-Left and Ctrl-Right by word.

History

Up, Down, PgUp and PgDn, F7 for a list, F8 to search and F9 to pick by number.

Copy from the last line

F1, F2, F3 and F4 copy from the last command, as in the Windows console.

Completion

Tab completes file names.

Batch files

tinycmd file.bat args runs a batch file. /C and /K run a string. Ctrl-C in a batch file asks "Terminate batch job (Y/N)?".

F4 · Everywhere

Mac, Windows, Linux, FreeBSD and Plan 9.

One program, no libraries to install.

Windows

The drives are the computer's own drives.

Mac, Linux and FreeBSD

C: is the root, /. Programs are run by their names, such as ls.

Plan 9

Built for 9front and Plan 9 on x64, 386 and ARM.

A library too

TinyCMD is a Go library. A host adds its own drives, so inside TreeMendous a remote server can be a drive letter.

F5 · Download

Download TinyCMD 0.1.0.1818

Free, on every system: the licence. Choose the file for your computer. Each holds the program, with the licence and the third-party notices.

TinyCMD 0.1.0.1818 downloads by system
SystemYou needDownload
macOSmacOS 13 Ventura or later, on Apple Silicon or Intel
WindowsWindows 10 or later, or Windows Server 2016 or later
LinuxLinux kernel 3.2 or later. No libraries needed. ARM64 for a Raspberry Pi 3, 4 or 5 with a 64-bit OS
FreeBSDFreeBSD 14 or later
Plan 99front or Plan 9 from Bell Labs
How to install it

Mac, Linux and FreeBSD: unpack it, then put the program where your shell finds it:

tar -xzf tinycmd-*.tar.gz        # on a Mac: unzip tinycmd-*.zip
sudo install -m 755 tinycmd-*/tinycmd /usr/local/bin/
tinycmd

Windows: unzip it, and put tinycmd.exe in a folder on your PATH. Run it in Windows Terminal or a console window.

Plan 9: unpack it with tar xzf, and copy tinycmd to $home/bin/$cputype/.

Run it with tinycmd. tinycmd /? lists the switches.

The Mac program is not notarised by Apple yet. If macOS refuses to run it, open System Settings, go to Privacy & Security, and click Open Anyway, or run xattr -d com.apple.quarantine tinycmd.