Ten terminal commands
You will learn
Ten terminal commands that cover a first day, and the one of them that cannot be undone.
The terminal is a window where you type a command and press Enter. Ten commands go a long way: pwd, ls, cd, mkdir, touch, cat, cp, mv, rm and clear. They are safe to try, with one exception: rm deletes a file with no undo, so read it twice before you press Enter. The spec lists all 10 with a one-line meaning each and marks exactly 1 of them as having no undo.
Try it
In the spec, find the list NO_UNDO. Mark cat with a 1 as well and run the player: the test that counts the commands with no undo fails. Then put it back to 0.
Ten terminal commands that cover a first day, each with a one-line meaning, and the one that cannot be undone. Lesson 5 of the vibecoding course.
specs/vibecoding/ten_commands.t27
// SPDX-License-Identifier: Apache-2.0
; specs/vibecoding/ten_commands.t27 -- lesson 5 of the vibecoding course: ten terminal commands
; Ten commands cover most of a beginner's day in the terminal. Each has a one-line meaning, and
; each has a flag: 1 if it destroys something with no undo, 0 if it does not. Only rm does.
; ASCII only (L3), English only (LANG-EN).
; phi^2 + 1/phi^2 = 3 | TRINITY
module vc_ten_commands;
pub const COMMAND_COUNT : u8 = 10;
pub const COMMANDS : [10]str = ["pwd", "ls", "cd", "mkdir", "touch", "cat", "cp", "mv", "rm", "clear"];
pub const MEANINGS : [10]str = [
"print the folder you are in",
"list what is in this folder",
"change to another folder",
"make a new folder",
"make a new empty file",
"print a file's text",
"copy a file",
"move or rename a file",
"delete a file with no undo",
"wipe the screen, keep your files"
];
; 1 = no undo, 0 = safe to try.
pub const NO_UNDO : [10]u8 = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0];
pub const RM_INDEX : u8 = 8;
test there_are_ten_and_the_last_one_is_clear {
assert COMMAND_COUNT == 10;
assert COMMANDS[0] == "pwd";
assert COMMANDS[9] == "clear";
assert MEANINGS[9] == "wipe the screen, keep your files";
}
test the_names_and_meanings_line_up {
assert COMMANDS[RM_INDEX] == "rm";
assert MEANINGS[RM_INDEX] == "delete a file with no undo";
}
test exactly_one_command_has_no_undo {
assert NO_UNDO[RM_INDEX] == 1;
assert NO_UNDO[0] + NO_UNDO[1] + NO_UNDO[2] + NO_UNDO[3] + NO_UNDO[4] + NO_UNDO[5] + NO_UNDO[6] + NO_UNDO[7] + NO_UNDO[8] + NO_UNDO[9] == 1;
}
All lessons
Module 1 · What vibecoding is
You describe, an agent writes, you run it and check. What a program is, and five myths put to a test.
Module 2 · Your desk
An editor with an agent beside it, ten terminal commands, and reading an error message.
Module 3 · Save points with git
A commit is a save point, a branch is a safe try, and a key is a pair of which one stays private.
Module 4 · Prompting
The parts of a prompt, an example in place of an adjective, and one small step at a time.
Module 5 · The working loop
Four phases from idea to ship, the loop of ask, run, read and fix, and what to do when it is stuck.
Module 6 · A test as the judge
A test says yes or no, a planted bug shows the test works, and a diff is read before it is accepted.
Module 7 · The parts of an agent
What an agent answers with, what it can do with tools, and what it keeps between messages.
Module 8 · A first bot
A bot is a message loop, a bot comes from a spec, and a secret stays out of the repository and the prompt.
Module 9 · Your own project
A spec for your own idea, one thing measured after it runs, and an honest plan for the next month.