Skip to content
← Free FDE training guides

Free learning / 35-minute terminal lab

Your first command: know what will run

Separate the terminal, shell, CLI and coding agent. Run a real local helper and inspect how arguments, folders and output channels change its result.

No account needed. Use your own copy for writing and keep the original as a reference.

Engineering lab library / Run locally

Understand the command before the agent.

Run one local helper in two folders. Read its actual report, diagnostic and exit code before deciding whether it answered the task.

Synthetic records. No provider key or model inference. Runs locally with the standard library.

  1. Start here / Node.js 24 · Offline exercise

    First command and working directory

    Run five actual process cases and explain the report, diagnostics and exit code.

    Node.js 24 · Standard library · No model or account

A colleague asks you to inspect one ticket from North workshop. You will use a small command-line program, then deliberately run it in the wrong folder. The point is to understand what the command actually did before accepting an agent's explanation or a green process result.

This original 35-minute exercise uses Node.js 24 and fictional files. There is no model, provider account, package installation or customer service. The interactive version is in the protected Academy lesson; the runnable exercise and all instructions here are free.

1. Separate the window from the program

A terminal displays text and delivers your keystrokes. A shell interprets command lines and starts programs. Bash, zsh and PowerShell are shells, with differences in syntax. A command-line interface (CLI) is the operations and options a program accepts through text arguments.

Node.js is a runtime: it executes JavaScript outside the browser. Our .mjs file is the program it runs. A coding agent is a separate application that may use a model to propose commands and inspect results. An ordinary terminal command does not automatically involve an agent.

Text example
You type in the terminal
        |
        v
The shell interprets the command
        |
        v
Node.js runs the JavaScript helper
        |
        +--> stdout: the report
        +--> stderr: the note or diagnostic
        +--> exit code: the process result

Think of a function call with an operation and inputs. The analogy has a limit: a command also has a working directory, an environment and system permissions. Those details matter when an FDE works across customer systems.

2. Prepare the small local workshop

Download First command · Node.js into a new folder. Open your terminal in that folder. Check your runtime and run the reproducible comparisons:

Code example
node --version
node fde-first-command.mjs test
node fde-first-command.mjs compare
node fde-first-command.mjs init

Use Node.js 24. Eight checks exercise actual child processes, folder-dependent reads, argument handling, diagnostics, bounded input and preservation of an existing workshop. compare prints five cases from temporary synthetic files and removes only its own temporary directory.

init creates this new folder beside your download:

Text example
fde-first-command.mjs
cli-workshop/
  north/
    project brief.json   → North workshop, tickets N-1 and N-2
  south/
    project brief.json   → South workshop, tickets S-1 and S-2

If cli-workshop already exists, init refuses to overwrite it. Keep your work and use a different parent folder if you need a fresh workshop. inspect reads its chosen file; it does not edit it. Installing Node itself may need internet access; the exercise uses the installed standard library and makes no network requests.

3. Read the command before pressing Enter

In Bash, zsh or PowerShell:

Code example
cd cli-workshop/north
node ../../fde-first-command.mjs inspect --file "project brief.json" --limit 1

In Windows Command Prompt:

Code example
cd cli-workshop\north
node ..\..\fde-first-command.mjs inspect --file "project brief.json" --limit 1
PieceWhat it does here
nodeRuns the JavaScript runtime
../../fde-first-command.mjsNames the script two folders above the current location
inspectSelects the helper's operation
--fileNames an option
"project brief.json"Groups a filename with a space into one argument
--limit 1Supplies an option and its value

The grouping quotes are not part of the filename. The helper receives the filename as one string. Its --limit value also arrives as text; the helper checks that it is from 1 to 3 before converting it to a number.

The comparison runner passes argument arrays to a fixed Node executable with shell: false. It records actual process outputs, but it does not exercise a shell parser, PATH lookup or a coding agent. The displayed commands are the equivalent commands for a learner to type.

In an ordinary shell, PATH helps locate executable names such as node. Built-in commands such as cd may be handled by the shell itself. Use the installed shell's help for its exact rules. Do not treat every tool's flags as interchangeable.

4. Follow the working directory

The current working directory is the folder from which relative file paths start. It is not necessarily the folder containing the script.

After the North command, move to the neighboring folder and repeat it. In Bash, zsh or PowerShell:

Code example
cd ../south
node ../../fde-first-command.mjs inspect --file "project brief.json" --limit 1

In Windows Command Prompt:

Code example
cd ..\south
node ..\..\fde-first-command.mjs inspect --file "project brief.json" --limit 1

The arguments are unchanged. The report now names South workshop because that is where the relative filename was read. Both runs can exit 0. Only the North result answers the original task.

Change --limit 1 to --limit 2 and predict the ticket count. Then change it to --limit 0: the helper should refuse that value. Change one input at a time so the observation has a clear cause.

5. Inspect three separate results

stdout, standard output, contains this helper's JSON report. stderr, standard error, contains its note or diagnostic. The exit code is a separate numeric result when the program finishes.

CasestdoutstderrExit code
North folder, ordinary argumentsNorth reportTraining-fixture note0
South folder, same argumentsSouth reportTraining-fixture note0
Missing filenameEmptyInput diagnostic2
Misspelled --limtiEmptyUsage diagnostic2
Limit outside 1–3EmptyUsage diagnostic2

A terminal may show both channels together. Text on stderr does not necessarily mean failure: the ordinary run writes an explanatory note there. This program defines 0 as completion and 2 as refused arguments or input. Other programs define their own nonzero results.

Check status immediately after the command, using the syntax for your shell:

Code example
# Bash or zsh
echo $?
Code example
# PowerShell: after a native executable such as node
$LASTEXITCODE
Code example
REM Windows Command Prompt
echo %ERRORLEVEL%

A later command can change the saved status. Do not type all three variants; choose the one for the shell you are using.

Try the refusal from either workshop folder:

Code example
node ../../fde-first-command.mjs inspect --file missing.json --limit 1

Use ..\..\fde-first-command.mjs in Command Prompt. Expect an empty report, an input diagnostic and exit code 2. The helper limits input to 8 KiB and does not include supplied file contents or raw exception paths in diagnostics. Its JSON report is local output from the file you explicitly selected.

6. Explain what a successful command does not prove

The South run is a successful process and an unsuccessful answer to the North task. Keep both facts. A model summarizing the output cannot change which folder the process used.

Before approving an agent's proposed command, identify the executable, working directory, arguments and expected effects. Afterwards inspect the actual report, diagnostic and process result. This exercise only reads fictional files; it establishes no permission to run a command in a customer environment and measures no agent behavior.

Keep a short command note:

  1. What task was requested?
  2. Which program and operation ran, and in which folder?
  3. What arguments and effects were expected?
  4. What appeared on stdout and stderr, and what was the exit code?
  5. Did that observation answer the intended task?

For a transfer exercise, imagine an agent reports that tests passed but the command ran in a neighboring checkout. Preserve that output, identify the intended checkout and test command, and obtain evidence from the right place.

Continue with repository orientation in the Claude Code course. It uses the existing offline ticket-triage project and a real failing test.

Primary references and further learning

Checked 20 October 2026. The workshop, program and instructional examples above are original LockedIn Labs material.

Before you move on

Keep the evidence of your work.

  • An explanation of the runtime, script and command arguments.
  • Two actual reports from different working directories.
  • A command note separating process success from the intended task.

Keep these in your own working copy. Reading this page does not save work or record completion.

Suggested next free session

Client delivery workbook

Carry command observations into the shared client-delivery case. This is a suggested sequence; choose the practice that addresses your current gap.

Open the next free guide
Have Academy access?

Continue with worked explanations, practice and review in the related lesson.

Open the related Academy lesson →
Back to top ↑