> For the complete documentation index, see [llms.txt](https://api.frontity.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.frontity.org/frontity-cli.md).

# CLI Commands

The Frontity command-line tool (CLI) is the main entry point for getting up and running with a Frontity application. It provides functionality like running a development server or building your Frontity application for deployment.

## How to use Frontity CLI

The Frontity CLI (Frontity commands) is available via [npm](https://www.npmjs.com/package/frontity). You can run any Frontity command by doing `npx frontity <frontity-command>`

Run `npx frontity --help` for full help.

## Commands

The `frontity` commands you have available are:

### [Create commands](/frontity-cli/create-commands.md)

These commands allow you to either create a Frontity project or a Frontity package:

* [`create`](/frontity-cli/create-commands/create.md)
* [`create-package`](/frontity-cli/create-commands/create-package.md)

### [Run commands](/frontity-cli/run-commands.md)

These commands allow you to run a Frontity project in development or production mode:

* [`dev`](/frontity-cli/run-commands/dev.md)
* [`serve`](/frontity-cli/run-commands/serve.md)

### [Build commands](/frontity-cli/build-commands.md)

These commands allow you to generate the code that can be used to run or analyze a Frontity project:

* [`build`](/frontity-cli/build-commands/build.md)

### [Extra commands](/frontity-cli/extra-commands.md)

* [`subscribe`](/frontity-cli/extra-commands.md#subscribe)
* [`info`](/frontity-cli/extra-commands.md#info)

{% hint style="info" %}
You can also use `--help` with each of these commands to get more information about them: `npx frontity dev --help`
{% endhint %}

{% hint style="info" %}
Have a look at [this video](https://www.youtube.com/watch?v=3d7b-cy5cFY) to learn more about what Frontity does internally when these commands are executed.
{% endhint %}

## Arguments & Environment Variables

The Frontity CLI allows parametrization via arguments or environment variables to customize their execution.

If some of these arguments or environment variables are detected the proper values will be set and applied in the execution of the command.

![](https://frontity.org/wp-content/uploads/2021/04/cli-environment-variables.png)

### `--no-prompt`

There's a **`--no-prompt`** option that can be used along with environment variables to avoid any questions from the CLI.

**Example**

If you pass the `--no-prompt` flag to the [`create`](/frontity-cli/create-commands/create.md) or [`create-package`](/frontity-cli/create-commands/create-package.md), the CLI will use the name from either [`FRONTITY_CREATE_NAME`](/frontity-cli/create-commands/create.md#frontity_create_name) or [`FRONTITY_CREATE_PACKAGE_NAME`](/frontity-cli/create-commands/create-package.md#frontity_create_package_name) environment variables.

If the CLI cannot find any of these environmental variables, it will prompt for the name of the package.

This is the scheme followed by the CLI to get the name of the package:

![](https://frontity.org/wp-content/uploads/2021/04/no-prompt.png)

## A typical workflow with Frontity commands

### In development

1. Create a Frontity project: `npx frontity create my-cool-project`
2. Add a custom theme (package): `npx frontity create-package my-custom-theme`
3. Launch a development server: `npx frontity dev`

### In production

1. Generate a build of the project: `npx frontity build`
2. Launch the project in production using the build generated before: `npx frontity serve`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://api.frontity.org/frontity-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
