Skip to content

Commit ab2cd76

Browse files
taimoorzaeemsteve-chavez
authored andcommitted
docs: document config file parameter on CLI page
The CLI page had the config file parameter missing. This commit adds that. Also adds the CLI usage output which shows all available options. Closes #4300. Signed-off-by: Taimoor Zaeem <[email protected]>
1 parent 0478e6b commit ab2cd76

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

docs/references/cli.rst

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,45 @@
33
CLI
44
===
55

6-
PostgREST provides a CLI with the commands listed below:
6+
PostgREST provides a CLI with the options listed below:
7+
8+
.. code:: text
9+
10+
Usage: postgrest [-v|--version] [-e|--example] [--dump-config | --dump-schema]
11+
[FILENAME]
12+
13+
PostgREST / create a REST API to an existing Postgres
14+
database
15+
16+
Available options:
17+
-h,--help Show this help text
18+
-v,--version Show the version information
19+
-e,--example Show an example configuration file
20+
--dump-config Dump loaded configuration and exit
21+
--dump-schema Dump loaded schema as JSON and exit (for debugging,
22+
output structure is unstable)
23+
FILENAME Path to configuration file
24+
25+
FILENAME
26+
--------
27+
28+
Runs PostgREST with the given :ref:`file_config`.
729

830
Help
931
----
1032

1133
.. code:: bash
1234
13-
$ postgrest [-h|--help]
35+
$ postgrest --help
1436
15-
Shows all the commands available.
37+
Shows all the options available.
1638

1739
Version
1840
-------
1941

2042
.. code:: bash
2143
22-
$ postgrest [-v|--version]
44+
$ postgrest --version
2345
2446
Prints the PostgREST version.
2547

@@ -28,16 +50,16 @@ Example
2850

2951
.. code:: bash
3052
31-
$ postgrest [-e|--example]
53+
$ postgrest --example
3254
33-
Shows example configuration options.
55+
Shows example configuration settings.
3456

3557
Dump Config
3658
-----------
3759

3860
.. code:: bash
3961
40-
$ postgrest [--dump-config]
62+
$ postgrest --dump-config
4163
4264
Dumps the loaded :ref:`configuration` values, considering the configuration file, environment variables and :ref:`in_db_config`.
4365

@@ -46,6 +68,6 @@ Dump Schema
4668

4769
.. code:: bash
4870
49-
$ postgrest [--dump-schema]
71+
$ postgrest --dump-schema
5072
5173
Dumps the schema cache in JSON format.

0 commit comments

Comments
 (0)