Manpages: Auto-generate many through ArgsParser

This set was hand-curated, guided by the questions:
- Does it have at least three options, i.e. is the help page
  non-trivial?
- Is the program unusual, i.e. does listing it in Help or on
  man.serenityos.org spread awareness?
- Is the program common, but we only implement a subset of 'common'
  flags?
This commit is contained in:
Ben Wiederhake 2021-10-26 22:12:12 +02:00 committed by Linus Groh
parent a4e805756d
commit 50a65f02a8
Notes: sideshowbarker 2024-07-18 01:38:19 +09:00
29 changed files with 726 additions and 0 deletions

View file

@ -0,0 +1,20 @@
## Name
Eyes
## Synopsis
```sh
$ Eyes [--num-eyes number] [--max-in-row number] [--grid-rows number] [--grid-cols number]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-n number`, `--num-eyes number`: Number of eyes
* `-m number`, `--max-in-row number`: Maximum number of eyes in a row
* `-r number`, `--grid-rows number`: Number of rows in grid (incompatible with --number)
* `-c number`, `--grid-cols number`: Number of columns in grid (incompatible with --number)
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,18 @@
## Name
TelnetServer
## Synopsis
```sh
$ TelnetServer [-p port] [-c command]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-p port`: Port to listen on
* `-c command`: Program to run on connection
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,26 @@
## Name
UserspaceEmulator
## Synopsis
```sh
$ UserspaceEmulator [--report-to-debug] [--pause] [--profile] [--profile-interval num_instructions] [--profile-file path] [--roi] <command...>
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `--report-to-debug`: Write reports to the debug log
* `-p`, `--pause`: Pause on startup
* `--profile`: Generate a ProfileViewer-compatible profile
* `-i num_instructions`, `--profile-interval num_instructions`: Set the profile instruction capture interval, 128 by default
* `--profile-file path`: File path for profile dump
* `--roi`: Enable Region-of-Interest mode for profiling
## Arguments:
* `command`: Command to emulate
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,24 @@
## Name
WebServer
## Synopsis
```sh
$ WebServer [--listen-address listen_address] [--port port] [--user username] [--pass password] [path]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-l listen_address`, `--listen-address listen_address`: IP address to listen on
* `-p port`, `--port port`: Port to listen on
* `-U username`, `--user username`: HTTP basic authentication username
* `-P password`, `--pass password`: HTTP basic authentication password
## Arguments:
* `path`: Path to serve the contents of
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,27 @@
## Name
config
## Synopsis
```sh
$ config <domain> <group> <key> [value]
```
## Description
Show or modify values in the configuration files through ConfigServer.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
## Arguments:
* `domain`: Config domain
* `group`: Group name
* `key`: Key name
* `value`: Value to write
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,24 @@
## Name
fortune
## Synopsis
```sh
$ fortune [path]
```
## Description
Open a fortune cookie, receive a free quote for the day!
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
## Arguments:
* `path`: Path to JSON file with quotes (/res/fortunes.json by default)
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,31 @@
## Name
grep
## Synopsis
```sh
$ grep [--recursive] [--extended-regexp] [--regexp Pattern] [-i] [--invert-match] [--quiet] [--no-messages] [--binary-mode ] [--text] [-I] [--color WHEN] [file...]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-r`, `--recursive`: Recursively scan files
* `-E`, `--extended-regexp`: Extended regular expressions
* `-e Pattern`, `--regexp Pattern`: Pattern
* `-i`: Make matches case-insensitive
* `-v`, `--invert-match`: Select non-matching lines
* `-q`, `--quiet`: Do not write anything to standard output
* `-s`, `--no-messages`: Suppress error messages for nonexistent or unreadable files
* `--binary-mode`: Action to take for binary files ([binary], text, skip)
* `-a`, `--text`: Treat binary files as text (same as --binary-mode text)
* `-I`: Ignore binary files (same as --binary-mode skip)
* `--color WHEN`: When to use colored output for the matching text ([auto], never, always)
## Arguments:
* `file`: File(s) to process
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,22 @@
## Name
gunzip
## Synopsis
```sh
$ gunzip [--keep] [--stdout] <FILE...>
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-k`, `--keep`: Keep (don't delete) input files
* `-c`, `--stdout`: Write to stdout, keep original files unchanged
## Arguments:
* `FILE`: File to decompress
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,23 @@
## Name
gzip
## Synopsis
```sh
$ gzip [--keep] [--stdout] [--decompress] <FILES...>
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-k`, `--keep`: Keep (don't delete) input files
* `-c`, `--stdout`: Write to stdout, keep original files unchanged
* `-d`, `--decompress`: Decompress
## Arguments:
* `FILES`: Files
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,24 @@
## Name
ifconfig
## Synopsis
```sh
$ ifconfig [--ipv4 ip] [--adapter adapter] [--gateway gateway] [--mask mask]
```
## Description
Display or modify the configuration of each network interface.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-i ip`, `--ipv4 ip`: Set the IP address of the selected network
* `-a adapter`, `--adapter adapter`: Select a specific network adapter to configure
* `-g gateway`, `--gateway gateway`: Set the default gateway of the selected network
* `-m mask`, `--mask mask`: Set the network mask of the selected network
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,28 @@
## Name
lsof
## Synopsis
```sh
$ lsof [-p pid] [-d fd] [-u login/UID] [-g PGID] [filename]
```
## Description
List open files of a processes. This can mean actual files in the file system, sockets, pipes, etc.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-p pid`: Select by PID
* `-d fd`: Select by file descriptor
* `-u login/UID`: Select by login/UID
* `-g PGID`: Select by process group ID
## Arguments:
* `filename`: Filename
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,29 @@
## Name
nc
## Synopsis
```sh
$ nc [--listen] [--verbose] [--udp] [-N] <target> <port>
```
## Description
Network cat: Connect to network sockets as if it were a file.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-l`, `--listen`: Listen instead of connecting
* `-v`, `--verbose`: Log everything that's happening
* `-u`, `--udp`: UDP mode
* `-N`: Close connection after reading stdin to the end
## Arguments:
* `target`: Address to listen on, or the address or hostname to connect to
* `port`: Port to connect to or listen on
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,25 @@
## Name
netstat
## Synopsis
```sh
$ netstat [--all] [--list] [--tcp] [--udp] [--program]
```
## Description
Display network connections
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-a`, `--all`: Display both listening and non-listening sockets
* `-l`, `--list`: Display only listening sockets
* `-t`, `--tcp`: Display only TCP network connections
* `-u`, `--udp`: Display only UDP network connections
* `-p`, `--program`: Show the PID and name of the program to which each socket belongs
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,25 @@
## Name
nl
## Synopsis
```sh
$ nl [--body-numbering style] [--increment number] [--separator string] [--startnum number] [--width number] [file...]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-b style`, `--body-numbering style`: Line numbering style: 't' for non-empty lines, 'a' for all lines, 'n' for no lines
* `-i number`, `--increment number`: Line count increment
* `-s string`, `--separator string`: Separator between line numbers and lines
* `-v number`, `--startnum number`: Initial line number
* `-w number`, `--width number`: Number width
## Arguments:
* `file`: Files to process
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,23 @@
## Name
ntpquery
## Synopsis
```sh
$ ntpquery [--adjust] [--set] [--verbose] [host]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-a`, `--adjust`: Gradually adjust system time (requires root)
* `-s`, `--set`: Immediately set system time (requires root)
* `-v`, `--verbose`: Verbose output
## Arguments:
* `host`: NTP server
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,27 @@
## Name
passwd
## Synopsis
```sh
$ passwd [--delete] [--lock] [--unlock] [username]
```
## Description
Modify an account password.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-d`, `--delete`: Delete password
* `-l`, `--lock`: Lock password
* `-u`, `--unlock`: Unlock password
## Arguments:
* `username`: Username
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,26 @@
## Name
profile
## Synopsis
```sh
$ profile [-p PID] [-a] [-e] [-d] [-f] [-w] [-c command] [-t event_type]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-p PID`: Target PID
* `-a`: Profile all processes (super-user only)
* `-e`: Enable
* `-d`: Disable
* `-f`: Free the profiling buffer for the associated process(es).
* `-w`: Enable profiling and wait for user input to disable.
* `-c command`: Command
* `-t event_type`: Enable tracking specific event type
Event type can be one of: sample, context_switch, page_fault, syscall, kmalloc and kfree.
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,32 @@
## Name
readelf
## Synopsis
```sh
$ readelf [--all] [--file-header] [--program-headers] [--section-headers] [--headers] [--syms] [--dyn-syms] [--dynamic] [--notes] [--relocs] [--unwind] [--checksec] <path>
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-a`, `--all`: Display all
* `-h`, `--file-header`: Display ELF header
* `-l`, `--program-headers`: Display program headers
* `-S`, `--section-headers`: Display section headers
* `-e`, `--headers`: Equivalent to: -h -l -S -s -r -d -n -u -c
* `-s`, `--syms`: Display the symbol table
* `--dyn-syms`: Display the dynamic symbol table
* `-d`, `--dynamic`: Display the dynamic section
* `-n`, `--notes`: Display core notes
* `-r`, `--relocs`: Display relocations
* `-u`, `--unwind`: Display unwind info
* `-c`, `--checksec`: Display security hardening info
## Arguments:
* `path`: ELF path
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,24 @@
## Name
shot
## Synopsis
```sh
$ shot [--clipboard] [--delay seconds] [--screen index] [--region] [output]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-c`, `--clipboard`: Output to clipboard
* `-d seconds`, `--delay seconds`: Seconds to wait before taking a screenshot
* `-s index`, `--screen index`: The index of the screen (default: -1 for all screens)
* `-r`, `--region`: Select a region to capture
## Arguments:
* `output`: Output filename
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,24 @@
## Name
sql
## Synopsis
```sh
$ sql [--database database] [--read file] [--source file] [--no-sqlrc]
```
## Description
This is a client for the SerenitySQL database server.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-d database`, `--database database`: Database to connect to
* `-r file`, `--read file`: File to read
* `-s file`, `--source file`: File to source
* `-n`, `--no-sqlrc`: Don't read ~/.sqlrc
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,28 @@
## Name
strace
## Synopsis
```sh
$ strace [--pid pid] [--output output] [--exclude exclude] [--include include] [argument...]
```
## Description
Trace all syscalls and their result.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-p pid`, `--pid pid`: Trace the given PID
* `-o output`, `--output output`: Filename to write output to
* `-e exclude`, `--exclude exclude`: Comma-delimited syscalls to exclude
* `-i include`, `--include include`: Comma-delimited syscalls to include
## Arguments:
* `argument`: Arguments to exec
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,26 @@
## Name
tail
## Synopsis
```sh
$ tail [--follow] [--lines number] <file>
```
## Description
Print the end ('tail') of a file.
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-f`, `--follow`: Output data as it is written to the file
* `-n number`, `--lines number`: Fetch the specified number of lines
## Arguments:
* `file`: File path
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,23 @@
## Name
tr
## Synopsis
```sh
$ tr [--complement] [--delete] <from> [to]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-c`, `--complement`: Take the complement of the first set
* `-d`, `--delete`: Delete characters instead of replacing
## Arguments:
* `from`: Set of characters to translate from
* `to`: Set of characters to translate to
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,23 @@
## Name
traceroute
## Synopsis
```sh
$ traceroute [--max-hops hops] [--max-retries tries] [--timeout seconds] <destination>
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-h hops`, `--max-hops hops`: use at most <hops> to the destination
* `-r tries`, `--max-retries tries`: retry TTL at most <tries> times
* `-t seconds`, `--timeout seconds`: wait at most <seconds> for a response
## Arguments:
* `destination`: destination
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,23 @@
## Name
tree
## Synopsis
```sh
$ tree [--all] [--only-directories] [--maximum-depth level] [directories...]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-a`, `--all`: Show hidden files
* `-d`, `--only-directories`: Show only directories
* `-L level`, `--maximum-depth level`: Maximum depth of the tree
## Arguments:
* `directories`: Directories to print
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,22 @@
## Name
truncate
## Synopsis
```sh
$ truncate [--size size] [--reference file] <file>
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-s size`, `--size size`: Resize the target file to (or by) this size. Prefix with + or - to expand or shrink the file, or a bare number to set the size exactly
* `-r file`, `--reference file`: Resize the target file to match the size of this one
## Arguments:
* `file`: File path
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,24 @@
## Name
utmpupdate
## Synopsis
```sh
$ utmpupdate [--create] [--delete] [--PID PID] [--from From] <tty>
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-c`, `--create`: Create entry
* `-d`, `--delete`: Delete entry
* `-p PID`, `--PID PID`: PID
* `-f From`, `--from From`: From
## Arguments:
* `tty`: TTY name
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,23 @@
## Name
wc
## Synopsis
```sh
$ wc [--lines] [--bytes] [--words] [file...]
```
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-l`, `--lines`: Output line count
* `-c`, `--bytes`: Output byte count
* `-w`, `--words`: Output word count
## Arguments:
* `file`: File to process
<!-- Auto-generated through ArgsParser -->

View file

@ -0,0 +1,32 @@
## Name
usermod
## Synopsis
```sh
$ usermod [--uid uid] [--gid gid] [--lock] [--unlock] [--home new-home] [--move] [--shell path-to-shell] [--gecos general-info] <username>
```
## Description
Modify a user account
## Options:
* `--help`: Display help message and exit
* `--version`: Print version
* `-u uid`, `--uid uid`: The new numerical value of the user's ID
* `-g gid`, `--gid gid`: The group number of the user's new initial login group
* `-L`, `--lock`: Lock password
* `-U`, `--unlock`: Unlock password
* `-d new-home`, `--home new-home`: The user's new login directory
* `-m`, `--move`: Move the content of the user's home directory to the new location
* `-s path-to-shell`, `--shell path-to-shell`: The name of the user's new login shell
* `-n general-info`, `--gecos general-info`: Change the GECOS field of the user
## Arguments:
* `username`: Username of the account to modify
<!-- Auto-generated through ArgsParser -->