From 860d56041ab763175f4e326107d416df7c30b136 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Thu, 29 Feb 2024 14:37:36 +0200 Subject: [PATCH] docs: fixes to CLI reference (#6530) --- www/apps/docs/content/cli/reference.mdx | 86 +++---------------------- 1 file changed, 10 insertions(+), 76 deletions(-) diff --git a/www/apps/docs/content/cli/reference.mdx b/www/apps/docs/content/cli/reference.mdx index c91131b9fb..67bb445580 100644 --- a/www/apps/docs/content/cli/reference.mdx +++ b/www/apps/docs/content/cli/reference.mdx @@ -18,23 +18,17 @@ To use Medusa, it is required to install the CLI tool as it is used to create a ## How to Install CLI Tool -To install the CLI tool, run the following command in your terminal: +In your Medusa backend's directory, you can use the Medusa CLI tool using NPX. For example: + +```bash +npx medusa --help +``` + +Alternatively, you can install the CLI tool globally: ```bash npm2yarn npm install @medusajs/medusa-cli -g -``` - -:::note - -If you run into any errors while installing the CLI tool, check out the [troubleshooting section](#troubleshooting-installation). - -::: - -The CLI tool is then available under the `medusa` command. You can see all commands and options with the following command: - -```bash medusa --help -``` --- @@ -44,65 +38,7 @@ medusa --help --- -## Common Options - -The following options can be used with all available commands. - -### --help - -Learn more about what you can do with the CLI tool or with a specific command. - -**Alias:** `-h` - -```bash -medusa new --help -``` - -### --verbose - -Turn on verbose output for detailed logs. - -**Default:** `false` - -```bash -medusa new my-backend --verbose -``` - -### --no-color - -Turn off colors in the output. - -**Alias:** `--no-colors` - -**Default:** `false` - -```bash -medusa new my-backend --no-color -``` - -### --json - -Turn on JSON logger. - -**Default:** `false` - -```bash -medusa new my-backend --json -``` - -### --version - -If used inside a Medusa project, the version of the Medusa CLI and Medusa project is shown. Otherwise, the version of the Medusa CLI is shown. - -**Alias:** `-v` - -```bash -medusa --version -``` - ---- - -## Available Commands +## Commands ### new @@ -150,7 +86,7 @@ medusa develop ### start -Start development backend. This command does not watch for file changes or restart the backend. +Start backend in production. ```bash medusa start @@ -165,7 +101,7 @@ medusa start ### migrations -Migrate the database to the most recent version. +Perform migration actions to reflect changes on the database, such as running or reverting migrations. ```bash medusa migrations @@ -221,8 +157,6 @@ medusa start-cluster | Name | Description | | --- | --- | -| `--cpus ` | The number of CPUs that Medusa can consume. By default, Medusa will try to consume all CPUs in cluster mode if this option isn't specified. | -| `--cpus ` | The number of CPUs that Medusa can consume. By default, Medusa will try to consume all CPUs in cluster mode if this option isn't specified. | | `-c `, `--cpus ` | The number of CPUs that Medusa can consume. By default, Medusa will try to consume all CPUs in cluster mode if this option isn't specified. | | `-H `, `--host ` | Set host. Defaults to `localhost`. | | `-p `, `--port ` | Set port. Defaults to `9000`. |