Command line usage
Basic options
$ ./ttc -h
usage: ttc [-h] {run,web,asm,usr} ...
The Tiny Computer
optional arguments:
-h, --help show this help message and exit
available commands:
{run,web,asm,usr}
run run the machine in a shell
web start a simulator server
asm assemble a program into a BIOS
usr manage user databases
Running the shell simulator
$ ./ttc run -h
usage: ttc run [-h] FILE
positional arguments:
FILE compiled BIOS
optional arguments:
-h, --help show this help message and exit
Running the web simulator
$ ./ttc web -h
usage: ttc web [-h] [-p PORT] [-b] [-a] [BIOS]
positional arguments:
BIOS default BIOS to load
optional arguments:
-h, --help show this help message and exit
-p PORT, --port PORT port to listen on (default 11699)
-b, --browse open the simulation in a web browser
-a, --anonymous disable clients authentication
Assembling source code
$ ./ttc asm -h
usage: ttc asm [-h] [-p] [-s] INFILE [OUTFILE]
positional arguments:
INFILE assembly source file
OUTFILE where to save assembled file
optional arguments:
-h, --help show this help message and exit
-p, --print print the result
-s, --syntax show help about the syntax
Managing users
$ ./ttc usr -h
usage: ttc usr [-h] [-d USERDB] [-f] [-i CSV] [-a [NUM]] [-l] [-t] [-r]
[EMAIL]
positional arguments:
EMAIL user identifier (must be an email)
optional arguments:
-h, --help show this help message and exit
-d USERDB, --database USERDB
print the result
-f, --force force add/remove users
-i CSV, --import CSV import from a CSV file (columns=email,password)
-a [NUM], --auto-password [NUM]
generate (and print) passwords with NUM syllables
(default 4)
-l, --ls list users and exit
-t, --test test a user password
-r, --rm remove users instead of creating them