summaryrefslogtreecommitdiff
path: root/docs/reference/cli-reference.md
diff options
context:
space:
mode:
authorGravatar Fred K. Schott <fkschott@gmail.com> 2021-06-29 13:12:27 -0700
committerGravatar Fred K. Schott <fkschott@gmail.com> 2021-06-29 13:12:27 -0700
commit9c7921300c5aae35ee947be5fc515e5b3fdaf1a2 (patch)
tree94dc4d802341e827466f641de97acf74905c706c /docs/reference/cli-reference.md
parent4df98a79f8d5f14e9e049322a6eef2db4f985ae4 (diff)
parent279a25246260ef95459d29c8029b18bd89adc206 (diff)
downloadastro-9c7921300c5aae35ee947be5fc515e5b3fdaf1a2.tar.gz
astro-9c7921300c5aae35ee947be5fc515e5b3fdaf1a2.tar.zst
astro-9c7921300c5aae35ee947be5fc515e5b3fdaf1a2.zip
Merge branch 'docs-sync-1'
Diffstat (limited to 'docs/reference/cli-reference.md')
-rw-r--r--docs/reference/cli-reference.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/docs/reference/cli-reference.md b/docs/reference/cli-reference.md
new file mode 100644
index 000000000..ebd51a3c2
--- /dev/null
+++ b/docs/reference/cli-reference.md
@@ -0,0 +1,59 @@
+---
+layout: ~/layouts/Main.astro
+title: CLI Reference
+---
+
+## Commands
+
+### `astro dev`
+
+Runs the Astro development server. This starts an HTTP server that responds to requests for pages stored in `src/pages` (or which folder is specified in your [configuration](../README.md##%EF%B8%8F-configuration)).
+
+See the [dev server](./dev.md) docs for more information on how the dev server works.
+
+**Flags**
+
+#### `--port`
+
+Specifies should port to run on. Defaults to `3000`.
+
+### `astro build`
+
+Builds your site for production.
+
+
+## Global Flags
+
+### `--config path`
+
+Specify the path to the config file. Defaults to `astro.config.mjs`. Use this if you use a different name for your configuration file or have your config file in another folder.
+
+```shell
+astro --config config/astro.config.mjs dev
+```
+
+### `--project-root path`
+
+Specify the path to the project root. If not specified the current working directory is assumed to be the root.
+
+The root is used for finding the Astro configuration file.
+
+```shell
+astro --project-root examples/snowpack dev
+```
+
+### `--reload`
+
+Clears the cache (dependencies are built within Astro apps).
+
+### `--verbose`
+
+Enables verbose logging, which is helpful when debugging an issue.
+
+### `--version`
+
+Print the Astro version number and exit.
+
+### `--help`
+
+Print the help message and exit.