1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
{
"id": "01-orientation",
"title": "Orientation — what newOS4 is",
"icon": "🚀",
"level": "beginner",
"lessons": [
{
"id": "1.1",
"title": "A terminal in your browser",
"objective": "Understand what newOS4 is and run your first three commands.",
"minutes": 6,
"commands": [
"help",
"status",
"ls"
],
"blocks": [
{
"type": "text",
"text": "newOS4 is a terminal-centric browser OS. Every command runs in your tab, files live in a virtual filesystem (VFS), and modules add commands at runtime."
},
{
"type": "cmd",
"text": "help"
},
{
"type": "text",
"text": "`help` lists every registered command grouped by the module that owns it."
},
{
"type": "cmd",
"text": "status"
},
{
"type": "cmd",
"text": "ls"
},
{
"type": "tip",
"text": "The VFS survives reloads. Create a file with `touch notes.txt`, then run `ls`."
}
],
"exercise": {
"instruction": "Run `status` and read the loaded-modules line.",
"accept": [
"status"
],
"check": {
"type": "command"
},
"hint": "Type: status"
},
"quiz": {
"q": "Where do files live in newOS4?",
"options": [
"On the web server",
"In the browser VFS",
"In a SQL database"
],
"answer": 1
},
"sources": [
"modules/core/terminal.js",
"modules/core/virtual-fs.js"
]
},
{
"id": "1.2",
"title": "Finding your way around",
"objective": "Navigate the virtual filesystem and create your first file.",
"minutes": 8,
"commands": [
"pwd",
"cd",
"tree",
"cat",
"touch"
],
"blocks": [
{
"type": "text",
"text": "The VFS is a tree rooted at `/`. `pwd` prints where you are, `cd` moves, `tree` shows the branch, `cat` prints a file."
},
{
"type": "cmd",
"text": "pwd"
},
{
"type": "cmd",
"text": "tree"
},
{
"type": "warn",
"text": "`echo \"text\" > file` is NOT supported by the VFS. Use `touch`, the editor (`edit <file>`), or `webx11.fs.writeFile()` in the console."
},
{
"type": "cmd",
"text": "touch hello.txt"
},
{
"type": "cmd",
"text": "ls"
}
],
"exercise": {
"instruction": "From the root, create `hello.txt` and list it.",
"accept": [
"touch hello.txt",
"ls"
],
"check": {
"type": "file",
"path": "/hello.txt"
},
"hint": "Type: touch hello.txt — then ls"
},
"quiz": {
"q": "Which command prints the current directory?",
"options": [
"ls",
"pwd",
"cd"
],
"answer": 1
},
"sources": [
"modules/core/module-fs.js",
"modules/core/virtual-fs.js"
]
}
]
}
|