Update help text formatting

This commit is contained in:
nickofolas 2022-01-13 18:47:21 -06:00
parent 5126d72742
commit c7b3b9918e

@ -7,7 +7,7 @@ export const TerminalHelpText: string[] = [
' alias [-g] [name="value"] Create or display Terminal aliases', ' alias [-g] [name="value"] Create or display Terminal aliases',
" analyze Get information about the current machine ", " analyze Get information about the current machine ",
" backdoor Install a backdoor on the current machine ", " backdoor Install a backdoor on the current machine ",
"buy [-l/program] Purchase a program through the Dark Web", " buy [-l/-a/program] Purchase a program through the Dark Web",
" cat [file] Display a .msg, .lit, or .txt file", " cat [file] Display a .msg, .lit, or .txt file",
" cd [dir] Change to a new directory", " cd [dir] Change to a new directory",
" check [script] [args...] Print a script's logs to Terminal", " check [script] [args...] Print a script's logs to Terminal",
@ -43,11 +43,12 @@ export const TerminalHelpText: string[] = [
" vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode", " vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode",
" weaken Reduce the security of the current machine", " weaken Reduce the security of the current machine",
" wget [url] [target file] Retrieves code/text from a web server", " wget [url] [target file] Retrieves code/text from a web server",
" ",
]; ];
export const HelpTexts: IMap<string[]> = { export const HelpTexts: IMap<string[]> = {
alias: [ alias: [
'alias [-g] [name="value"] ', 'Usage: alias [-g] [name="value"] ',
" ", " ",
"Create or display aliases. An alias enables a replacement of a word with another string. ", "Create or display aliases. An alias enables a replacement of a word with another string. ",
"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME ", "It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME ",
@ -80,15 +81,16 @@ export const HelpTexts: IMap<string[]> = {
" ", " ",
], ],
analyze: [ analyze: [
"analyze", "Usage: analyze",
" ", " ",
"Prints details and statistics about the current server. The information that is printed includes basic ", "Prints details and statistics about the current server. The information that is printed includes basic ",
"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also ", "server details such as the hostname, whether the player has root access, what ports are opened/closed, and also ",
"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is ", "hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is ",
"available on the server, etc.", "available on the server, etc.",
" ",
], ],
backdoor: [ backdoor: [
"backdoor", "Usage: backdoor",
" ", " ",
"Install a backdoor on the current machine, grants a secret bonus depending on the machine.", "Install a backdoor on the current machine, grants a secret bonus depending on the machine.",
" ", " ",
@ -96,7 +98,7 @@ export const HelpTexts: IMap<string[]> = {
" ", " ",
], ],
buy: [ buy: [
"buy [-l / -a / program]", "Usage: buy [-l / -a / program]",
" ", " ",
"Purchase a program through the Dark Web. Requires a TOR router to use.", "Purchase a program through the Dark Web. Requires a TOR router to use.",
" ", " ",
@ -106,9 +108,10 @@ export const HelpTexts: IMap<string[]> = {
"If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs.", "If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs.",
" ", " ",
"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.", "Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.",
" ",
], ],
cat: [ cat: [
"cat [file]", "Usage: cat [file]",
" ", " ",
"Display message (.msg), literature (.lit), or text (.txt) files. Examples:", "Display message (.msg), literature (.lit), or text (.txt) files. Examples:",
" ", " ",
@ -117,9 +120,10 @@ export const HelpTexts: IMap<string[]> = {
" cat foo.lit", " cat foo.lit",
" ", " ",
" cat servers.txt", " cat servers.txt",
" ",
], ],
cd: [ cd: [
"cd [dir]", "Usage: cd [dir]",
" ", " ",
"Change to the specified directory. Note that this works even for directories that don't exist. If you ", "Change to the specified directory. Note that this works even for directories that don't exist. If you ",
"change to a directory that does not exist, it will not be 'created'. Examples:", "change to a directory that does not exist, it will not be 'created'. Examples:",
@ -129,9 +133,10 @@ export const HelpTexts: IMap<string[]> = {
" cd /logs", " cd /logs",
" ", " ",
" cd ../", " cd ../",
" ",
], ],
check: [ check: [
"check [script name] [args...]", "Usage: check [script name] [args...]",
" ", " ",
"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by ", "Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by ",
"a space. Remember that a running script is uniquely ", "a space. Remember that a running script is uniquely ",
@ -142,29 +147,33 @@ export const HelpTexts: IMap<string[]> = {
"Then to run the 'check' command on this script you would have to pass the same arguments in: ", "Then to run the 'check' command on this script you would have to pass the same arguments in: ",
" ", " ",
" check foo.script 1 2 foodnstuff", " check foo.script 1 2 foodnstuff",
" ",
], ],
clear: [ clear: [
"clear", "Usage: clear",
" ", " ",
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up ", "Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up ",
"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command", "and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",
" ",
], ],
cls: [ cls: [
"cls", "Usage: cls",
" ", " ",
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up ", "Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up ",
"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command", "and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",
" ",
], ],
connect: [ connect: [
"connect [hostname]", "Usage: connect [hostname]",
" ", " ",
"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument ", "Connect to a remote server. The hostname or IP address of the remote server must be given as the argument ",
"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To ", "to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To ",
"see which servers can be connected to, use the 'scan' command.", "see which servers can be connected to, use the 'scan' command.",
" ",
], ],
cp: ["cp [src] [dst]", " ", "Copy a file on this server. To copy a file to another server use scp."], cp: ["Usage: cp [src] [dst]", " ", "Copy a file on this server. To copy a file to another server use scp.", " "],
download: [ download: [
"download [script/text file]", "Usage: download [script/text file]",
" ", " ",
"Downloads a script or text file to your computer (like your real life computer).", "Downloads a script or text file to your computer (like your real life computer).",
" ", " ",
@ -178,7 +187,7 @@ export const HelpTexts: IMap<string[]> = {
" ", " ",
], ],
expr: [ expr: [
"expr [mathematical expression]", "Usage: expr [mathematical expression]",
" ", " ",
"Evaluate a simple mathematical expression. Supports native JavaScript operators:", "Evaluate a simple mathematical expression. Supports native JavaScript operators:",
" ", " ",
@ -189,27 +198,30 @@ export const HelpTexts: IMap<string[]> = {
" expr 25 * 2 ** 10", " expr 25 * 2 ** 10",
" ", " ",
"Note that letters (non-digits) are not allowed and will be removed from the input.", "Note that letters (non-digits) are not allowed and will be removed from the input.",
" ",
], ],
free: [ free: [
"free", "Usage: free",
" ", " ",
"Displays the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as ", "Displays the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as ",
"how much of it is being used.", "how much of it is being used.",
" ",
], ],
grow: [ grow: [
"grow", "Usage: grow",
" ", " ",
"Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.", "Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.",
"See the wiki page for hacking mechanics.", "See the wiki page for hacking mechanics.",
" ",
], ],
hack: [ hack: [
"hack", "Usage: hack",
" ", " ",
"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics", "Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics",
" ", " ",
], ],
help: [ help: [
"help [command]", "Usage: help [command]",
" ", " ",
"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief ", "Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief ",
"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print ", "description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print ",
@ -218,15 +230,14 @@ export const HelpTexts: IMap<string[]> = {
" help alias", " help alias",
" ", " ",
" help scan-analyze", " help scan-analyze",
" ",
], ],
home: [ home: [
"home" + "Connect to your home computer. This will work no matter what server you are currently connected to.", "Usage: home", " ", "Connect to your home computer. This will work no matter what server you are currently connected to.", " ",
], ],
hostname: ["hostname", " ", "Prints the hostname of the current server"], hostname: ["Usage: hostname", " ", "Prints the hostname of the current server", " "],
kill: [ kill: [
"kill [script name] [args...]", "Usage: kill [script name] [args...] or kill [pid",
" ",
"kill [pid]",
" ", " ",
"Kill the script specified by the script name and arguments OR by its PID.", "Kill the script specified by the script name and arguments OR by its PID.",
" ", " ",
@ -242,17 +253,19 @@ export const HelpTexts: IMap<string[]> = {
" kill foo.script 1 sigma-cosmetics", " kill foo.script 1 sigma-cosmetics",
" ", " ",
"If you are killing the script using its PID, then the PID argument must be numeric", "If you are killing the script using its PID, then the PID argument must be numeric",
" ",
], ],
killall: [ killall: [
"killall", "Usage: killall",
" ", " ",
"Kills all scripts on the current server. ", "Kills all scripts on the current server. ",
"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. ", "Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. ",
"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. ", "This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. ",
"The script will not be stopped/killed until after that time has elapsed.", "The script will not be stopped/killed until after that time has elapsed.",
" ",
], ],
ls: [ ls: [
"ls [dir] [| grep pattern]", "Usage: ls [dir] [| grep pattern]",
" ", " ",
"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. ", "The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. ",
"The files will be displayed in alphabetical order. ", "The files will be displayed in alphabetical order. ",
@ -274,11 +287,12 @@ export const HelpTexts: IMap<string[]> = {
"List all files with the word 'purchase' in the filename, in the 'scripts' directory:", "List all files with the word 'purchase' in the filename, in the 'scripts' directory:",
" ", " ",
" ls scripts | grep purchase", " ls scripts | grep purchase",
" ",
], ],
lscpu: ["lscpu", " ", "Prints the number of CPU Cores the current server has"], lscpu: ["Usage: lscpu", " ", "Prints the number of CPU Cores the current server has", " "],
mem: [ mem: [
"mem [script name] [-t num_threads]", "Usage: mem [script name] [-t num_threads]",
" ", " ",
"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print ", "Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print ",
"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then ", "the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then ",
@ -290,9 +304,10 @@ export const HelpTexts: IMap<string[]> = {
" ", " ",
"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example ", "The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example ",
"above will print the amount of RAM needed to run 'foo.script' with 50 threads.", "above will print the amount of RAM needed to run 'foo.script' with 50 threads.",
" ",
], ],
mv: [ mv: [
"mv [src] [dest]", "Usage: mv [src] [dest]",
" ", " ",
"Move the source file to the specified destination. This can also be used to rename files. ", "Move the source file to the specified destination. This can also be used to rename files. ",
"This command only works for scripts and text files (.txt). This command CANNOT be used to ", "This command only works for scripts and text files (.txt). This command CANNOT be used to ",
@ -305,25 +320,28 @@ export const HelpTexts: IMap<string[]> = {
" mv hacking-controller.script scripts/hacking-controller.script", " mv hacking-controller.script scripts/hacking-controller.script",
" ", " ",
" mv myScript.js myOldScript.js", " mv myScript.js myOldScript.js",
" ",
], ],
nano: [ nano: [
"nano [file ...]", "Usage: nano [file ...]",
" ", " ",
"Opens up the specified file(s) in the Text Editor. Only scripts (.script) or text files (.txt) can be ", "Opens up the specified file(s) in the Text Editor. Only scripts (.script) or text files (.txt) can be ",
"edited using the Text Editor. If the file does not already exist, then a new, empty one ", "edited using the Text Editor. If the file does not already exist, then a new, empty one ",
"will be created", "will be created",
" ",
], ],
ps: ["ps", " ", "Prints all scripts that are running on the current server"], ps: ["Usage: ps", " ", "Prints all scripts that are running on the current server", " "],
rm: [ rm: [
"rm [file]", "Usage: rm [file]",
" ", " ",
"Removes the specified file from the current server. A file can be a script, a program, or a message file. ", "Removes the specified file from the current server. A file can be a script, a program, or a message file. ",
" ", " ",
"WARNING: This is permanent and cannot be undone", "WARNING: This is permanent and cannot be undone",
" ",
], ],
run: [ run: [
"run [file name] [-t] [num threads] [args...]", "Usage: run [file name] [-t] [num threads] [args...]",
" ", " ",
"Execute a program, script or coding contract.", "Execute a program, script or coding contract.",
" ", " ",
@ -338,13 +356,14 @@ export const HelpTexts: IMap<string[]> = {
" ", " ",
], ],
scan: [ scan: [
"scan", "Usage: scan",
" ", " ",
"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect ", "Prints all immediately-available network connection. This will print a list of all servers that you can currently connect ",
"to using the 'connect' Terminal command.", "to using the 'connect' Terminal command.",
" ",
], ],
"scan-analyze": [ "scan-analyze": [
"scan-analyze [depth] [-a]", "Usage: scan-analyze [depth] [-a]",
" ", " ",
"Prints detailed information about all servers up to [depth] nodes away on the network. Calling ", "Prints detailed information about all servers up to [depth] nodes away on the network. Calling ",
"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal ", "'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal ",
@ -360,9 +379,10 @@ export const HelpTexts: IMap<string[]> = {
" ", " ",
"By default, this command will not display servers that you have purchased. However, you can pass in the ", "By default, this command will not display servers that you have purchased. However, you can pass in the ",
"-a flag at the end of the command if you would like to enable that.", "-a flag at the end of the command if you would like to enable that.",
" ",
], ],
scp: [ scp: [
"scp [filename ...] [target server]", "Usage: scp [filename ...] [target server]",
" ", " ",
"Copies the specified file(s) from the current server to the target server. ", "Copies the specified file(s) from the current server to the target server. ",
"This command only works for script files (.script or .js extension), literature files (.lit extension), ", "This command only works for script files (.script or .js extension), literature files (.lit extension), ",
@ -374,10 +394,10 @@ export const HelpTexts: IMap<string[]> = {
" scp foo.script bar.script n00dles", " scp foo.script bar.script n00dles",
" ", " ",
], ],
sudov: ["sudov", " ", "Prints whether or not you have root access to the current machine"], sudov: ["Usage: sudov", " ", "Prints whether or not you have root access to the current machine", " "],
tail: [ tail: [
"tail [script name] [args...]", "Usage: tail [script name] [args...]",
" ", " ",
"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated ", "Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated ",
"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used ", "by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used ",
@ -388,15 +408,17 @@ export const HelpTexts: IMap<string[]> = {
"Then in order to check its logs with 'tail' the same arguments must be used: ", "Then in order to check its logs with 'tail' the same arguments must be used: ",
" ", " ",
" tail foo.script 10 50000", " tail foo.script 10 50000",
" ",
], ],
top: [ top: [
"top", "Usage: top",
" ", " ",
"Prints a list of all scripts running on the current server as well as their thread count and how much ", "Prints a list of all scripts running on the current server as well as their thread count and how much ",
"RAM they are using in total.", "RAM they are using in total.",
" ",
], ],
unalias: [ unalias: [
"unalias [alias name]", "Usage: unalias [alias name]",
" ", " ",
"Deletes the specified alias. Note that the double quotation marks are required. ", "Deletes the specified alias. Note that the double quotation marks are required. ",
" ", " ",
@ -409,22 +431,25 @@ export const HelpTexts: IMap<string[]> = {
" unalias r", " unalias r",
" ", " ",
"It is not necessary to differentiate between global and non-global aliases when using 'unalias'", "It is not necessary to differentiate between global and non-global aliases when using 'unalias'",
" ",
], ],
vim: [ vim: [
"vim [file ...]", "Usage: vim [file ...]",
" ", " ",
"Opens up the specified file(s) in the Text Editor in vim mode. Only scripts (.script) or text files (.txt) can be ", "Opens up the specified file(s) in the Text Editor in vim mode. Only scripts (.script) or text files (.txt) can be ",
"edited using the Text Editor. If the file does not already exist, then a new, empty one ", "edited using the Text Editor. If the file does not already exist, then a new, empty one ",
"will be created", "will be created",
" ",
], ],
weaken: [ weaken: [
"weaken", "Usage: weaken",
" ", " ",
"Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.", "Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.",
"Requires root access. See the wiki page for hacking mechanics.", "Requires root access. See the wiki page for hacking mechanics.",
" ",
], ],
wget: [ wget: [
"wget [url] [target file]", "Usage: wget [url] [target file]",
" ", " ",
"Retrieves data from a URL and downloads it to a file on the current server. The data can only ", "Retrieves data from a URL and downloads it to a file on the current server. The data can only ",
"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, ", "be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, ",
@ -434,5 +459,6 @@ export const HelpTexts: IMap<string[]> = {
"cross-origin resource sharing (CORS). Example:", "cross-origin resource sharing (CORS). Example:",
" ", " ",
" wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt", " wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt",
" ",
], ],
}; };