Command Line

Run this site’s tools as commands: generate UUIDs, check an ABN, look up a BSB

Loading...

About the Command Line

Most of the tools on this site are a page with a box on it. That suits work you do once, but it is slow for the small jobs you do twenty times a day. This is the same logic reached by typing instead of clicking: uuid -n 5 gives you five UUIDs, abn invents a test ABN while abn 51824753556 checks one, and bsb 062-000 names the branch a BSB belongs to.

It is a real command line, not a recording. Flags work in the forms you would expect, both -n 5 and --count=5. Quoting works, so a value that starts with a dash can be passed through. Pipes and redirects work, and there is a filesystem for them to write into. Tab completes a command name or a path, the arrow keys walk back through your history, and the screen clears with Ctrl+L, or with Cmd+K on a Mac the way it does in a terminal application.

What it can do

  • uuid: random version 4 UUIDs, one or a hundred
  • abn, acn, tfn, medicare: check or generate Australian identifiers
  • ird, nzbn: check or generate New Zealand identifiers
  • iban: check an international bank account number, or generate one for a given country
  • bsb, nz-bank: check a bank routing number, and for a BSB, name the branch
  • password, phone: invent a password, or numbers that fit a real national dialling plan
  • base64, json, jwt, hash: encode, reformat, decode a token, take a digest
  • color, cron: convert a colour and check its contrast, read a cron expression back in English
  • ls, cd, cat, echo, touch, mkdir, cp, mv, rm: a filesystem that lasts as long as the tab
  • save, load: move a file or a folder between that filesystem and your own disk
  • grep, cut, head, tail, wc, sort, uniq, diff: something for the far end of a pipe
  • tools, open: list the rest of the site, and jump to any of it

Text in, text out

The commands that transform a value all take it as an argument or through a pipe, so they chain. cat token.txt | jwt -p | json -s decodes a JWT and prints its claims with the keys in order. cut -d , -f 2 people.csv | sort | uniq -c counts how many rows share a column, which is the shape of question a spreadsheet makes harder than it should be. And cat emails.txt | hash -l -a sha256 hashes a list a line at a time.

A few of these deliberately stop short of what the matching page does. jwt decodes a token but will not verify one, because checking a signature needs the key and a key typed at a prompt is a key left in the scrollback. password generates but does not run bcrypt or scrypt, which are slow by design and would block the terminal while they worked. Both pages have the other half.

Pipes, redirects and somewhere to put things

|sends one command’s output into the next, and > sends it to a file instead of to the screen. That is what turns a list of answers into a piece of work: uuid -n 100 > ids.txt keeps a hundred of them, cat suppliers.txt | abn -q prints the ABNs in a list that are valid and sends the rest to the screen as rejects, and abn -n 20 | abn generates twenty and checks them straight back.

There are two directories. /bin is the commands themselves, read-only, so cat /bin/iban tells you what iban is for. /home is yours and starts empty. Tab completes a path there the same way it completes a command name.

None of it is written to your disk on its own. There is no localStorage, no database and no upload: the files live in the page’s memory and are gone when you reload, which is the simplest way for this site to keep promising that nothing you type is stored anywhere.

Getting files in and out

Drag a file onto the terminal, or type load to pick one, and it lands in the working directory ready to be read. That is usually the point of all this: cat suppliers.csv | abn -q checks a column of numbers that started life in a spreadsheet. Dragging a whole folder works too, and the folders inside it are kept. Text only, up to 2 MB a file, since the terminal holds text and a PDF would arrive as nonsense.

save ids.txt sends a file back the other way, and save work sends a directory as a zip, which you can drop back onto the terminal later to get the directory again. You can skip the middle step entirely: uuid -n 100 | save ids.txt never writes anything in the tab at all.

Loading reads; it does not upload. The bytes go from the file you chose into this page and no further, the same as everything else here. Saving is the one moment the site touches your disk, it happens because you typed a command, and your browser decides where the file lands.

It follows you around the site

This page is not the only way in. Press Ctrl+K, or Cmd+K on a Mac, on any page of this site, or use the terminal button in the header, and the same prompt opens over whatever you are doing. Escape closes it and puts the cursor back where it was. It is the same terminal with the same commands, so anything described here works there.

Once the prompt has the cursor, that chord means what it means in a terminal application: it clears the screen rather than closing the window. Pressing it out of habit halfway through a piece of work should tidy the scrollback, not throw the work away.

Checking and generating

The nine identifier commands do both, and which one you get falls out of what you typed. A number after the command is a number to check, so abn 51824753556 checks it. Nothing after the command means invent one, so abn hands you a test ABN the same way uuid and password do. -g still works and still wins, so anything you had written down keeps meaning what it meant.

A pipe counts as having been given something, even when it carried nothing. cat suppliers.txt | abn on an empty file says nothing rather than inventing a number, because that question has already been answered and making one up would be the command inventing a fact about your file.

Why some commands refuse to generate

There is no bsb --generate, and no generator for New Zealand bank accounts. An ABN or a test TFN that passes a checksum is just arithmetic, but six digits that happen to be an allocated BSB name somebody’s real branch, and an account number that passes the check digit routine names somebody’s real account. Type help bsb and the terminal says so itself.

Nothing you type is sent anywhere

Every command runs in your browser tab. There is no server to receive a command, because this site is a set of static files. The one exception is the branch details behind bsb, which are fetched from this site as a small data file the first time you ask for one, and never include what you typed.

BSB branch data comes from Australian Payments Network Limited (AusPayNet), "BSB Directory". Any interpretation of it is ours, not AusPayNet’s.

It does not download what you do not use

The page knows the name, the flags and the help text of every command from the start, which is how it can complete a name or reject a typo instantly. The code that does the work is fetched per command, the first time you run it, so the page starts out roughly the size of one tool rather than thirty-eight. Opening it and typing uuid downloads the UUID generator and nothing else.

It goes one level further where a command has a library behind it. hashuses the browser’s own cryptography for SHA-1 and SHA-2 and costs nothing extra; MD5, SHA-3 and RIPEMD-160 fetch an implementation only when you name one. The cron parser arrives when you type cron and not before.

Frequently Asked Questions

What is the Command Line tool?

It is a terminal in your browser that runs the same logic as the tool pages on this site, reached by typing instead of clicking. Typing "uuid -n 5" gives you five UUIDs, "abn" on its own invents a test Australian Business Number, "abn 51824753556" checks one, and "bsb 062-000" names the branch a BSB belongs to. It is aimed at the small jobs you repeat many times a day, where opening a page and clicking a button is slower than typing six characters.

Which commands are available?

Thirty-nine, in five groups. uuid, password and phone invent a value. abn, acn, tfn and medicare check or generate Australian identifiers, ird and nzbn do the same for New Zealand, iban checks or generates an international bank account number, and bsb and nz-bank check bank routing numbers with bsb also naming the branch. base64, json, jwt, hash, color and cron transform or explain a value you already have. ls, cd, cat, echo, touch, mkdir, cp, mv, rm, save and load work on a small filesystem. grep, cut, head, tail, wc, sort, uniq and diff give a pipe somewhere to end. tools lists everything else on the site and open jumps to any of it. Type help to see the current list, or help followed by a command name for its flags and examples.

Can it decode a JWT, hash a string or convert a colour?

Yes, and they chain, which is the reason to do it here rather than on the pages. "cat token.txt | jwt -p | json -s" decodes a JSON Web Token and prints its claims with the keys in order. "hash -a sha256 hello" takes a digest, with -l to hash each line of a list separately. "base64 -d" decodes either alphabet, padded or not. "color #3b82f6 --on white" converts a colour between notations and reports its contrast under both WCAG 2 and APCA. "cron '0 9 * * 1-5'" says what a schedule means and when it next runs. Each of these mirrors a tool page, and each is downloaded only when you first type it.

Will the jwt command check a signature?

No, on purpose. Verifying a token means supplying the key, and a key typed at a prompt sits in the scrollback of a page you can scroll back through, which is a worse place for it than almost anywhere else. So the command decodes the header and the payload, reads the time claims, and says on every run that the signature was not checked, because a decoded token proves nothing about who wrote it. The JWT Decoder page has the verifying half if you need it. The password command draws the same line for the same kind of reason: it generates, but the bcrypt and scrypt hashing stays on its page, where a slow algorithm does not block a prompt you are typing at.

Can I pipe one command into another?

Yes. A vertical bar sends one command output into the next, and a greater-than sign writes it to a file instead of the screen, with two of them appending rather than replacing. "uuid -n 100 > ids.txt" keeps a hundred UUIDs, "cat suppliers.txt | abn -q" prints the valid ABNs in a list and reports the rest as rejects, and "abn -n 20 | abn" generates twenty and checks them straight back. Only the results travel down a pipe: warnings and errors go to the screen wherever they happen, the same way they do in a real shell.

Can I open my own files in it, or take files out?

Both. Drag a file onto the terminal, or type load to pick one, and it lands in the working directory, so a column of numbers from a spreadsheet can go straight into a checker with "cat suppliers.csv | abn -q". Dragging a folder works too and keeps the folders inside it. Loading reads the file: nothing is uploaded, because there is nowhere to upload it to. Going the other way, "save ids.txt" hands a file to your browser and "save work" hands over a directory as a zip, which you can drop back on the terminal later to get the directory back. Text files only, up to 2 MB each, since the terminal holds text.

Where do the files go, and do they stay there?

They stay until you reload the page, and no further. There are two directories: /bin holds the commands themselves and is read-only, so "cat /bin/iban" tells you what iban does, and /home starts empty and is yours to write in. Nothing is written to your disk, because there is no localStorage, no database and no upload behind any of it. The files live in the memory of the page, which is why closing the tab is all it takes to be rid of them.

Does anything I type get sent to a server?

No. Every command runs inside your browser tab, and this site is a set of static files with no server to receive a command in the first place. The single exception is the branch details behind the bsb command: those live in a small data file on this site that is fetched the first time you ask for one. That request carries no part of what you typed, only which block of BSB numbers is needed.

When does a command check a number and when does it invent one?

It depends on whether you gave it something to check. A number after the command is a number to check, so "abn 51824753556" checks it. Nothing after the command means invent one, so "abn" on its own hands you a test ABN the same way "uuid" and "password" hand you a UUID and a password. The -g flag still works and still wins, so an older line like "abn -g -n 20" keeps doing exactly what it did. A pipe counts as having been given something even when it carried nothing, which is the case worth knowing: "cat suppliers.txt | abn" on an empty file says nothing rather than inventing a number, because that question has been answered and making one up would be the command inventing a fact about your file.

Why will bsb not generate a number?

Because it would be generating somebody real. An ABN or a test TFN that passes its checksum is a piece of arithmetic and belongs to nobody, which is why those commands can invent one. Six digits that happen to be an allocated BSB name a real branch of a real bank, and a New Zealand account number that passes the check digit routine names a real account. So this site checks both and invents neither. Typing "help bsb" says the same thing in the terminal.

Does opening this page download every tool on the site?

No, and that is deliberate. The page starts out knowing only the name, flags and help text of each command, which is enough to complete a name or reject a typo the moment you type it. The code that does the actual work is downloaded per command, the first time you run it. Opening the page and running uuid fetches the UUID generator alone, and the other commands stay on the server until you ask for them. It goes one level deeper where a command has a library behind it: hash uses the cryptography already in your browser for SHA-1 and SHA-2 and fetches nothing, while MD5, SHA-3 and RIPEMD-160 pull in an implementation only when you name one, and the cron parser arrives when you type cron and not before.

Can I open the command line from other pages?

Yes. Press Ctrl+K on Windows and Linux, or Cmd+K on a Mac, from any page on this site and the same prompt opens over what you are doing. Escape closes it and returns the cursor to wherever it was, so it does not interrupt a tool you are halfway through. On a Mac the shortcut is deliberately Cmd+K rather than Ctrl+K, because Ctrl+K deletes to the end of the line in Mac text fields and in the editors several of these tools are built on. Once the prompt has the cursor the same chord clears the screen instead of closing the window, which is what it does in a terminal application and what a hand that has typed it for years expects.

What keyboard shortcuts does it support?

Tab completes a command name, filling in as much as is unambiguous and listing the candidates when several match, and completes a file path once you are past the command word. The up and down arrows walk back and forward through the commands you have already run. Ctrl+L clears the screen, as does Cmd+K once the prompt has the cursor, and as does typing clear. Flags accept the usual forms, so "-n 5", "--count 5" and "--count=5" all mean the same thing, and quoting works if you need to pass a value that starts with a dash.