l1ackers
Not marked. Sign in and it follows you.

~/tutorials/002-the-shell.md

002: The shell is the site

There is a terminal at the bottom of every page, and it is not a gimmick bolted onto a website.

The pages you are reading are files. The shell reads the same files. That is the entire architecture, and once it clicks you stop thinking of this as a website with a terminal and start treating it as a machine that happens to be browsable.

The same tree, two views

When you click News in the header, you are looking at the directory news/. When you type ls in the shell, you are looking at the same directory. When you click a title, you are reading a file. When you type cat ~/news followed by the name, you are reading the same file, including the frontmatter the page strips out to render.

That last part matters more than it sounds. A page hides the metadata that says where a post came from, when, and what class of thing it is. The file does not hide anything. If those two ever disagree, the file is the one that is true.

Try it

  1. Open a news post, then cat the same path in the shell. Read the frontmatter the page did not show you.
  2. cd into a directory and run ls. Notice that the shell knows where you are, and that the URL does not have to follow you. Reading a file does not move you, same as a real shell.
  3. Click a command in the tools shelf instead of typing it. It is the same command, run the same way, which is why both work.

What this shell deliberately cannot do

It has no outbound network. You cannot curl a website from here, and that is a decision rather than a limitation: a shell reachable by strangers that also reaches the internet is a proxy, and it would be abused within a day.

git clone is the one thing that looks like an exception and is not. It fetches nothing itself: it reads the address, checks the host is a forge it recognises, and gives you the archive's name with a link that works. The download is served through this site, which sends you to the forge rather than copying the file through itself.

Everything else here is real: the paths, the files, the commands that read them.

Why this is lesson two

Lesson one was about reading what a command actually said. This one is about knowing what you are actually holding when you run it. The shell is not a demonstration of a filesystem. It is the filesystem, wearing a prompt.

Not marked. Sign in and it follows you.
l1ackers · shell this is a way in, not a requirement
$