# novel new

Provides scaffolding methods for easy feature development.&#x20;

## Use with Anthropic

It is possible to use Anthropic's Claude to create features for your instance. Novel scaffolding will make sure that the code generated will work within the Novel codebase.

You can get your Anthropic keys from the guide below

{% embed url="<https://docs.novel.dev/guides/knowledge-base/general-information/getting-anthropic-api-keys>" %}

{% hint style="warning" %}
**DISCLAIMER**

It is important that you review the code that is generated by your scaffold before you commit and push to production.

Do your due diligence!
{% endhint %}

## `novel new api`

This command will create an api endpoint for you and put it in `/app/api`. You can then modify and enrich this endpoint once its generated.

You can start by running

```bash
novel new api
```

You will be asked the following

1. The identifier of this new api, this will be used for the function name in the api spec
2. The path of this new api, it will be registered under the path you provide&#x20;
3. The HTTP method this api will respond with
4. If the endpoint require authorization from a cookie session or api key. See [Sessions](/novel-server/sessions.md)
5. <mark style="background-color:orange;">If Anthropic is enabled</mark>: a prompt that describes what the endpoint should do. This generates the following: Implementation, API Spec, Helper, Test File.
6. Your files are now available on the `/app/api/identifier-in-step-1`

<div align="left"><figure><img src="/files/KEyLv5dA7Zk7Y9W0hxHJ" alt="" width="563"><figcaption></figcaption></figure></div>

## `novel new model`

This command will create migrations for you that in turn, generate model files during development.

It will ask you multiple times until you tell it to stop.

You can start this by running

```bash
novel new model
```

You will be asked the following

1. The name of the table you are creating
2. The name of the column used as a primary key
3. <mark style="background-color:orange;">If Anthropic is enabled</mark>: a prompt that describes what the table should do.
4. It will ask you if you want to add more tables
5. Your files are now available on the `/app/migrations`&#x20;

<div align="left"><figure><img src="/files/OjIas9jVdNsWG2QQFgjL" alt="" width="563"><figcaption></figcaption></figure></div>

## `novel new task`

This command creates a background job or a cron job based on your intent.

You can start this by running

```bash
novel new task
```

You will be asked the following

1. The task identifier that is used to register this task
2. If it is a cron job or not
   1. If it is a cron job, it will ask the schedule
3. <mark style="background-color:orange;">If Anthropic is enabled</mark>: a prompt that describes what the task should do.
4. Your files are now available on the `/app/tasks/id-of-the-task-in-step1`&#x20;

<div align="left"><figure><img src="/files/Fxja3lzFtiYswLMy0eiR" alt="" width="563"><figcaption></figcaption></figure></div>

## Changelog

* 2024-12-20 - Initial Documentation


---

# 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.novel.dev/novel-server/novel-cli/novel-new.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.
