# CLI Toolbelt

Adding your own features is as simple as spinning up a new model, view and controller. Gravity comes with a CLI toolbelt that you can use to generate the files needed for this automatically.

## Create a New View

```javascript
gravity create yourModelName -db -ui
```

This will create:

1. a new model template in `/model` directory&#x20;
2. a new controller template in the `/controller` directory that handles the server request and calls the appropriate model method
3. a new set of endpoints in `/api` to route the request to your controller methods
4. a React view in `/client/src/views` that makes the API request

If you don't want to create a database table or a React view then you can omit the `-db` and `-ui` parameters.

## Create a New React Component

You can automatically create a new React component and import it into the component library using the following command in the terminal:

```javascript
gravity create component yourComponentName
```

## Running Unit Tests

The toolbelt can also execute a series of [unit tests](/gravity-server/testing.md) to test your application rigorously.

```javascript
gravity test
```

## Create a New Master Account

If you want to create a new master account for [Mission Control](/mission-control/introduction.md), you run the following command:

```
gravity create master yourname@domain.com:YOUR_PASSWORD
```


---

# Agent Instructions: 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:

```
GET https://docs.usegravity.app/gravity-server/cli-toolbelt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
