> 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/create-commands/create-package.md).

# create-package

The `create-package` command creates a new Frontity package in a project. Launch this command from the root of the Frontity project

```
npx frontity create-package [package-name] [options]
```

## Arguments

### **`[package-name]`**

This argument sets the *name* of your Frontity package. The `create-package` command will create a folder named `[package-name]` under `packages`. It will also add the proper dependency in the `package.json` of your Frontity project

### **`[options]`**

|         Option        | Description                                                                                                                                                                         |
| :-------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--namespace <value>` | Sets the [namespace](https://docs.frontity.org/learning-frontity/namespaces) for this package                                                                                       |
|     `--no-prompt`     | Skips prompting the user for options. Related environment variable: [`FRONTITY_CREATE_PACKAGE_NAME`](/frontity-cli/create-commands/create-package.md#frontity_create_package_name). |
|        `--open`       | Output usage information                                                                                                                                                            |

## Examples

* Create a custom theme package named `my-custom-project`

```
>  npx frontity create-package my-custom-theme
? Enter the namespace of the package: theme
✔ Adding package.json.
✔ Adding src/index.js.
✔ Installing package my-custom-theme.

New package "my-custom-theme" created.
```

## Environment Variables

### `FRONTITY_CREATE_PACKAGE_NAME`

If you pass the [`--no-prompt`](/frontity-cli.md#no-prompt) flag to the [`create-package`](/frontity-cli/create-commands/create-package.md), the CLI will use the name from this `FRONTITY_CREATE_PACKAGE_NAME` environment variable.

If the CLI cannot find a `FRONTITY_CREATE_PACKAGE_NAME` environmental variable, it will prompt for the name of the package

*Example:*

```
FRONTITY_CREATE_NAME=test-project
```

{% hint style="info" %}
You can see a scheme of the whole workflow of using this `FRONTITY_CREATE_PACKAGE_NAME` environment variable in the [`--no-prompt`](/frontity-cli.md#no-prompt) section
{% endhint %}


---

# 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/create-commands/create-package.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.
