> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Functions

> Manage functions

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

List, create, and operate on functions.

## `notte functions configure`

Update a function's metadata.

Pass any of `--name`, `--description`, `--domain`, `--run-instructions`, `--default-runtime`, `--response-format`, or `--self-healing`. Only the flags you pass are sent; omitted fields are left unchanged.

`--run-instructions` is documentation for whoever calls the function - how long a run takes, what each variable is for, which sites it trips over. It is not input to the self-healing agent.

`--default-runtime` is the runtime every run of this function uses unless that run passes `functions run --runtime`.

`--response-format` is the JSON Schema of what run() returns (inline JSON, @file, or - for stdin).

| Flag | Description |
| - | - |
| `--default-runtime <string>` | Runtime this function's runs use unless a run overrides it: standard or extended |
| `--description <string>` | description |
| `--domain <string>` | domain |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--name <string>` | name |
| `--response-format <string>` | JSON Schema of run()'s return value, computed by the caller from its pydantic model, as inline JSON, @file, or - for stdin |
| `--run-instructions <string>` | Notes for whoever calls this function: how long a run takes, what the variables mean, what it trips over |
| `--self-healing` | Let an agent repair the function when a run fails |

## `notte functions create`

Create a new function

| Flag | Description |
| - | - |
| `--description <string>` | Function description |
| `--file <string>` | Path to function file (required) |
| `--name <string>` | Function name |
| `--response-format <string>` | JSON Schema of run()'s return value, computed by the caller from its pydantic model, as inline JSON, @file, or - for stdin |
| `--shared` | Make function public (API default: false) |

## `notte functions delete`

Delete function

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |

## `notte functions download <file-path>`

Download function code to disk

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--version <string>` | Function version (defaults to latest) |

## `notte functions fork`

Fork/duplicate the function

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |

## `notte functions health`

Show the function runtime's health and available packages

## `notte functions list`

List functions

| Flag | Description |
| - | - |
| `--include-deleted` | Include deleted functions |
| `--page <int>` | Page number (1-indexed) |
| `--page-size <int>` | Number of items per page |

## `notte functions rollback`

Restore an earlier version of the function

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--version <versions>` | A version from the function's versions history to restore. Required. |

## `notte functions run`

Start the function, print its run ID, and poll until it finishes. Use `--no-wait` to return after startup, then run-metadata `--wait` to wait separately. `--timeout` limits each API request, not the total execution time. Interrupting the CLI does not stop the function; use run-stop to cancel it.

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--no-stream` | Suppress log output while waiting for the final run metadata |
| `--no-wait` | Return the run ID after startup without waiting for completion |
| `--runtime <string>` | Run on standard or extended for this run only, overriding the function's default-runtime |
| `--var <stringArray>` | Variable as key=value pair (can be used multiple times) |
| `--vars <string>` | Variables as JSON object string |
| `--wait-timeout <duration>` | Maximum time to wait for completion (e.g. 30m; 0 waits indefinitely) |

## `notte functions run-metadata`

Get function run metadata

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--no-stream` | Suppress log output while waiting for the final run metadata |
| `--run-id <string>` | Run ID (required) |
| `--wait` | Poll until the run finishes; `--timeout` applies to each request |
| `--wait-timeout <duration>` | Maximum time to wait for completion (e.g. 30m; 0 waits indefinitely) |

## `notte functions run-stop`

Stop a function run

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--run-id <string>` | Run ID (required) |

## `notte functions runs`

List function runs

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--page <int>` | Page number (1-indexed) |
| `--page-size <int>` | Number of items per page |
| `--running` | Only show runs that are still executing |

## `notte functions schedule`

Set a cron schedule for the function

| Flag | Description |
| - | - |
| `--cron <minutes hours day-of-month month day-of-week year>` | AWS EventBridge schedule expression. Six space-separated fields, minutes first: minutes hours day-of-month month day-of-week year. This is neither five-field Unix crontab nor the seconds-first six-field dialect used by Quartz and cron-parser. Exactly one of day-of-month and day-of-week must be `?`, the other must be a real value. Schedules fire in UTC. Example: `0 12 ? * * *` runs daily at noon UTC. `rate(...)` expressions such as `rate(1 hour)` are accepted too. Required. |
| `--function-id <string>` | Function ID (uses current function if not specified) |

## `notte functions secrets delete <secret-id>`

Delete a function environment secret

Aliases: `rm`

## `notte functions secrets get <name>`

Get a function environment secret value

## `notte functions secrets list`

List function environment secrets

## `notte functions secrets set <name> [value]`

Set a function environment secret

| Flag | Description |
| - | - |
| `--value <string>` | Secret value |

## `notte functions show`

Show function details

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |

## `notte functions unschedule`

Remove the schedule from the function

| Flag | Description |
| - | - |
| `--function-id <string>` | Function ID (uses current function if not specified) |

## `notte functions update`

Update function

| Flag | Description |
| - | - |
| `--file <string>` | Path to updated function file (required) |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--response-format <string>` | JSON Schema of run()'s return value, computed by the caller from its pydantic model, as inline JSON, @file, or - for stdin |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.