quarto
"
+ contents: docs/cli/*.qmd
- id: prerelease
title: "Quarto 1.3"
contents:
diff --git a/docs/cli/_metadata.yml b/docs/cli/_metadata.yml
new file mode 100644
index 0000000000..0ede0e08a6
--- /dev/null
+++ b/docs/cli/_metadata.yml
@@ -0,0 +1 @@
+tbl-colwidths: [35,20,45]
\ No newline at end of file
diff --git a/docs/cli/add.qmd b/docs/cli/add.qmd
new file mode 100644
index 0000000000..eb2a629dc3
--- /dev/null
+++ b/docs/cli/add.qmd
@@ -0,0 +1,6 @@
+---
+title: 'add'
+---
+
+{{< include includes/_add.md >}}
+
diff --git a/docs/cli/call.qmd b/docs/cli/call.qmd
new file mode 100644
index 0000000000..41fe4e9f8e
--- /dev/null
+++ b/docs/cli/call.qmd
@@ -0,0 +1,35 @@
+---
+title: 'call'
+shift-heading-level-by: 1
+---
+
+{{< include includes/_call.md >}}
+
+# call engine
+
+{{< include includes/_call-engine.md >}}
+
+# call engine julia
+
+{{< include includes/_call-engine-julia.md >}}
+
+
+# call engine julia status
+
+{{< include includes/_call-engine-julia-status.md >}}
+
+# call engine julia kill
+
+{{< include includes/_call-engine-julia-kill.md >}}
+
+# call engine julia log
+
+{{< include includes/_call-engine-julia-log.md >}}
+
+# call engine julia close
+
+{{< include includes/_call-engine-julia-close.md >}}
+
+# call engine julia stop
+
+{{< include includes/_call-engine-julia-stop.md >}}
\ No newline at end of file
diff --git a/docs/cli/capabilities.qmd b/docs/cli/capabilities.qmd
new file mode 100644
index 0000000000..16d18d8c2a
--- /dev/null
+++ b/docs/cli/capabilities.qmd
@@ -0,0 +1,6 @@
+---
+title: 'capabilities'
+---
+
+{{< include includes/_capabilities.md >}}
+
diff --git a/docs/cli/check.qmd b/docs/cli/check.qmd
new file mode 100644
index 0000000000..5c5869fd89
--- /dev/null
+++ b/docs/cli/check.qmd
@@ -0,0 +1,6 @@
+---
+title: 'check'
+---
+
+{{< include includes/_check.md >}}
+
diff --git a/docs/cli/cli-info.json b/docs/cli/cli-info.json
new file mode 100644
index 0000000000..47fc29483a
--- /dev/null
+++ b/docs/cli/cli-info.json
@@ -0,0 +1,5449 @@
+{
+ "version": "99.9.9",
+ "commands": [
+ {
+ "name": "render",
+ "hidden": false,
+ "description": "Render files or projects to various document types.",
+ "options": [
+ {
+ "standalone": true,
+ "global": true,
+ "prepend": true,
+ "name": "help",
+ "description": "Show this help.",
+ "args": [],
+ "flags": [
+ "-h",
+ "--help"
+ ],
+ "equalsSign": false,
+ "typeDefinition": "",
+ "aliases": [
+ "h"
+ ]
+ },
+ {
+ "name": "to",
+ "description": "Specify output format(s).",
+ "args": [],
+ "flags": [
+ "-t",
+ "--to"
+ ],
+ "equalsSign": false,
+ "typeDefinition": "",
+ "aliases": [
+ "t"
+ ]
+ },
+ {
+ "name": "output",
+ "description": "Write output to FILE (use '--output -' for stdout).",
+ "args": [],
+ "flags": [
+ "-o",
+ "--output"
+ ],
+ "equalsSign": false,
+ "typeDefinition": "",
+ "aliases": [
+ "o"
+ ]
+ },
+ {
+ "name": "output-dir",
+ "description": "Write output to DIR (path is input/project relative)",
+ "args": [],
+ "flags": [
+ "--output-dir"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "metadata",
+ "description": "Metadata value (KEY:VALUE).",
+ "args": [],
+ "flags": [
+ "-M",
+ "--metadata"
+ ],
+ "equalsSign": false,
+ "typeDefinition": "",
+ "aliases": [
+ "M"
+ ]
+ },
+ {
+ "name": "site-url",
+ "description": "Override site-url for website or book output",
+ "args": [],
+ "flags": [
+ "--site-url"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "execute",
+ "description": "Execute code (--no-execute to skip execution).",
+ "args": [],
+ "flags": [
+ "--execute"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "execute-param",
+ "description": "Execution parameter (KEY:VALUE).",
+ "args": [],
+ "flags": [
+ "-P",
+ "--execute-param"
+ ],
+ "equalsSign": false,
+ "typeDefinition": "",
+ "aliases": [
+ "P"
+ ]
+ },
+ {
+ "name": "execute-params",
+ "description": "YAML file with execution parameters.",
+ "args": [],
+ "flags": [
+ "--execute-params"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "execute-dir",
+ "description": "Working directory for code execution.",
+ "args": [],
+ "flags": [
+ "--execute-dir"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "execute-daemon",
+ "description": "Keep Jupyter kernel alive (defaults to 300 seconds).",
+ "args": [],
+ "flags": [
+ "--execute-daemon"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "execute-daemon-restart",
+ "description": "Restart keepalive Jupyter kernel before render.",
+ "args": [],
+ "flags": [
+ "--execute-daemon-restart"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "execute-debug",
+ "description": "Show debug output when executing computations.",
+ "args": [],
+ "flags": [
+ "--execute-debug"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "use-freezer",
+ "description": "Force use of frozen computations for an incremental file render.",
+ "args": [],
+ "flags": [
+ "--use-freezer"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "cache",
+ "description": "Cache execution output (--no-cache to prevent cache).",
+ "args": [],
+ "flags": [
+ "--cache"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "cache-refresh",
+ "description": "Force refresh of execution cache.",
+ "args": [],
+ "flags": [
+ "--cache-refresh"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "no-clean",
+ "description": "Do not clean project output-dir prior to render",
+ "args": [],
+ "flags": [
+ "--no-clean"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "debug",
+ "description": "Leave intermediate files in place after render.",
+ "args": [],
+ "flags": [
+ "--debug"
+ ],
+ "equalsSign": false,
+ "typeDefinition": ""
+ },
+ {
+ "name": "",
+ "description": "Additional pandoc command line arguments.",
+ "args": [],
+ "flags": [
+ "pandoc-args..."
+ ],
+ "equalsSign": false,
+ "typeDefinition": "",
+ "aliases": [
+ "andoc-args..."
+ ]
+ },
+ {
+ "global": true,
+ "name": "log",
+ "description": "Path to log file",
+ "args": [
+ {
+ "optional": false,
+ "name": "file",
+ "action": "string",
+ "variadic": false,
+ "list": false,
+ "type": "string"
+ }
+ ],
+ "flags": [
+ "--log"
+ ],
+ "equalsSign": false,
+ "typeDefinition": "Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--no-prompt |
+ + | Do not prompt to confirm actions | +
--embed |
+ |
+ Embed this extension within another extension (used when authoring extensions). | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
-h , --help |
+ + | Show this help. | +
-f , --force |
+ + | Force closing. This will terminate the worker if it is running. | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
-h , --help |
+ + | Show this help. | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
-h , --help |
+ + | Show this help. | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
-h , --help |
+ + | Show this help. | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
-h , --help |
+ + | Show this help. | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
-h , --help |
+ + | Show this help. | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
status |
+ Get status information on the currently running Julia server process. | +
kill |
+ Kill the control server if it is currently running. This will also kill all notebook worker processes. | +
log |
+ Print the content of the julia server log file if it exists which can be used to diagnose problems. | +
close |
+ Close the worker for a given notebook. If it is currently running, it will not be interrupted. | +
stop |
+ Send a message to the server that it should close all notebooks and exit. This will fail if any notebooks are not idle. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
julia |
+ Access functionality specific to the julia rendering engine. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
engine |
+ Access functionality specific to quarto's different rendering engines. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--output |
+ |
+ Output as JSON to a file | +
--no-strict |
+ + | When set, will not fail if dependency versions don't match precisely | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
-o , --output |
+ [path:string] |
+ Write output to PATH. | +
--with-ids |
+ + | Include ids in conversion | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--open |
+ [editor:string] |
+ Open new artifact in this editor (positron, vscode, rstudio) | +
--no-open |
+ + | Do not open in an editor | +
--no-prompt |
+ + | Do not prompt to confirm actions | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--no-prompt |
+ + | Do not prompt to confirm actions | +
--update-path |
+ + | Update system path when a tool is installed | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--port |
+ [port:number] |
+ Suggested port to listen on (defaults to random value between 3000 and 8000). +If the port is not available then a random port between 3000 and 8000 will be selected. | +
--host |
+ [host:string] |
+ Hostname to bind to (defaults to 127.0.0.1) | +
--render |
+ [format:string] |
+ Render to the specified format(s) before previewing | +
--no-serve |
+ + | Don't run a local preview web server (just monitor and re-render input files) | +
--no-navigate |
+ + | Don't navigate the browser automatically when outputs are updated. | +
--no-browser |
+ + | Don't open a browser to preview the site. | +
--no-watch-inputs |
+ + | Do not re-render input files when they change. | +
--timeout |
+ + | Time (in seconds) after which to exit if there are no active clients. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--id |
+ |
+ Identifier of content to publish | +
--server |
+ |
+ Server to publish to | +
--token |
+ |
+ Access token for publising provider | +
--no-render |
+ + | Do not render before publishing. | +
--no-prompt |
+ + | Do not prompt to confirm publishing destination | +
--no-browser |
+ + | Do not open a browser to the site after publishing | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--no-prompt |
+ + | Do not prompt to confirm actions | +
--embed |
+ |
+ Remove this extension from within another extension (used when authoring extensions). | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
-t , --to |
+ + | Specify output format(s). | +
-o , --output |
+ + | Write output to FILE (use '--output -' for stdout). | +
--output-dir |
+ + | Write output to DIR (path is input/project relative) | +
-M , --metadata |
+ + | Metadata value (KEY:VALUE). | +
--site-url |
+ + | Override site-url for website or book output | +
--execute |
+ + | Execute code (--no-execute to skip execution). | +
-P , --execute-param |
+ + | Execution parameter (KEY:VALUE). | +
--execute-params |
+ + | YAML file with execution parameters. | +
--execute-dir |
+ + | Working directory for code execution. | +
--execute-daemon |
+ + | Keep Jupyter kernel alive (defaults to 300 seconds). | +
--execute-daemon-restart |
+ + | Restart keepalive Jupyter kernel before render. | +
--execute-debug |
+ + | Show debug output when executing computations. | +
--use-freezer |
+ + | Force use of frozen computations for an incremental file render. | +
--cache |
+ + | Cache execution output (--no-cache to prevent cache). | +
--cache-refresh |
+ + | Force refresh of execution cache. | +
--no-clean |
+ + | Do not clean project output-dir prior to render | +
--debug |
+ + | Leave intermediate files in place after render. | +
pandoc-args... |
+ + | Additional pandoc command line arguments. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--no-render |
+ + | Do not render the document before serving. | +
-p , --port |
+ [port:number] |
+ The TCP port that the application should listen on. | +
--host |
+ [host:string] |
+ Hostname to bind to (defaults to 127.0.0.1) | +
--browser |
+ + | Open a browser to preview the site. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--no-prompt |
+ + | Do not prompt to confirm actions | +
--update-path |
+ + | Update system path when a tool is installed | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
-h , --help |
+ + | Show this help. | +
--no-prompt |
+ + | Do not prompt to confirm actions | +
--embed |
+ |
+ Embed this extension within another extension (used when authoring extensions). | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Command | +Description | +
---|---|
help |
+ Show this help or the help of a sub-command. | +
Flags | +Arguments | +Description | +
---|---|---|
--no-prompt |
+ + | Do not prompt to confirm actions | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
--profile |
+ + | Active project profile(s) | +
Flags | +Arguments | +Description | +
---|---|---|
--no-prompt |
+ + | Do not prompt to confirm actions | +
--log |
+ |
+ Path to log file | +
--log-level |
+ |
+ Log level (info, warning, error, critical) | +
--log-format |
+ |
+ Log format (plain, json-stream) | +
--quiet |
+ + | Suppress console output. | +
Flags | +Arguments | +Description | +
---|---|---|
--no-prompt |
+ + | Do not prompt to confirm actions | +
Command | +Description | +
---|---|
template |
+ Use a Quarto template for this directory or project. | +
binder |
+ Configure the current project with Binder support. | +
", x, "
")
+}
+
+process_options <- function(options) {
+ options_table <- tibble(options = options) |>
+ unnest_wider(options) |>
+ select(flags, typeDefinition, description) |>
+ rowwise() |>
+ mutate(
+ flags = paste0(make_code(flags), collapse = ", "),
+ typeDefinition = ifelse(
+ typeDefinition == "",
+ "",
+ paste0(make_code(typeDefinition))
+ )
+ ) |>
+ knitr::kable(
+ col.names = c("Flags", "Arguments", "Description"),
+ escape = FALSE
+ ) |>
+ paste(collapse = "\n")
+
+ options_table |> raw_html()
+}
+
+process_commands <- function(commands) {
+ if (length(commands) == 0) {
+ return("")
+ }
+ commands_table <- tibble(commands = commands) |>
+ unnest_wider(commands) |>
+ mutate(name = make_code(name)) |>
+ select(name, description) |>
+ knitr::kable(
+ col.names = c("Command", "Description"),
+ escape = FALSE
+ ) |>
+ paste(collapse = "\n")
+ paste(heading("Commands", 2), raw_html(commands_table), sep = "\n")
+}
+
+process_examples <- function(examples) {
+ if (length(examples) == 0) {
+ return("")
+ }
+ example_text <- examples |>
+ tibble() |>
+ unnest_wider(examples) |>
+ rowwise() |>
+ mutate(
+ description = xfun::fenced_block(
+ description,
+ attrs = c(".bash", "filename='Terminal'")
+ ) |>
+ paste(collapse = "\n") |>
+ paste0("\n"),
+ name = heading(name, 3),
+ text = paste0(name, description)
+ ) |>
+ pull(text) |>
+ paste(collapse = "\n")
+ paste0(heading("Examples", 2), example_text, collapse = "")
+}
+
+md_content <- function(name, description, usage, options, commands, examples) {
+ usage_text <- process_usage(name, usage)
+ options_table <- process_options(options)
+ commands_table <- process_commands(commands)
+ examples_text <- process_examples(examples)
+
+ paste(
+ strip_ctl(description, ctl = "sgr"),
+ usage_text,
+ "\n",
+ heading("Options"),
+ options_table,
+ "\n",
+ commands_table,
+ "\n",
+ examples_text,
+ sep = "\n",
+ collapse = "\n"
+ )
+}
+
+
+# Read and process JSON --------------------------------------------------
+
+cli_json <- read_json(here("docs", "cli", "cli-info.json"))
+cat("cli-info.json version: ", cli_json$version, "\n")
+commands <- cli_json$commands
+
+# Recursively extract commands and subcommands
+extract_commands <- function(commands, prefix = NULL) {
+ result <- list()
+
+ for (cmd in commands) {
+ # Create full command name
+ full_name <- str_c(prefix, cmd$name, sep = " ")
+
+ # Add current command to results
+ cmd$name <- full_name
+ result[[length(result) + 1]] <- cmd
+
+ # Recursively process nested commands if they exist
+ if (!is.null(cmd$commands) && length(cmd$commands) > 0) {
+ nested_commands <- extract_commands(cmd$commands, prefix = full_name)
+ result <- c(result, nested_commands)
+ }
+ }
+
+ return(result)
+}
+
+# Table for landing ------------------------------------------------------
+
+tibble(commands = commands) |>
+ unnest_wider(commands) |>
+ filter(!hidden) |>
+ select(name, description) |>
+ mutate(
+ name = paste("[", name, "](", name, ".qmd)", sep = ""),
+ description = stringr::str_extract(description, "^[^\\n]+")
+ ) |>
+ knitr::kable(col.names = c("Command", "Description"), format = "pipe") |>
+ writeLines(here("docs", "cli", "includes", "_cli-commands.md"))
+
+
+# Individual commands ----------------------------------------------------
+
+hidden <- commands |>
+ map_lgl("hidden")
+
+all_commands <- extract_commands(commands[!hidden])
+
+commands_tbl <-
+ tibble(commands = all_commands) |>
+ unnest_wider(commands) |>
+ filter(!hidden) |>
+ filter(str_detect(name, "help", negate = TRUE)) |>
+ rowwise()
+
+commands_content <- commands_tbl |>
+ mutate(
+ filename = here(
+ "docs",
+ "cli",
+ "includes",
+ paste0("_", gsub(" ", "-", name), ".md")
+ ),
+ content = md_content(
+ name,
+ description,
+ usage,
+ options,
+ commands,
+ examples
+ )
+ )
+
+commands_content |>
+ group_walk(~ with(.x, writeLines(content, filename)))