> ## 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.

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`, `--self-healing`, `--deletion-protected`, or `--shared`. Only the flags you pass are sent; omitted fields are left unchanged.

`--shared` enables a public code/fork link; `--shared`=false disables it. Code literals become public. Runs, results and runtime secrets stay private. This does not enable public execution.

`--deletion-protected` refuses deletes until it is turned off with `--deletion-protected`=false, which takes the key of a workspace admin or owner.

`--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 |
| `--deletion-protected` | Turn deletion protection on or off. While it is on, the function cannot be deleted. Any workspace member's key can turn it on; turning it off takes the key of a workspace admin or owner. Omit or send null to leave it unchanged. |
| `--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 |
| `--shared` | Enable or disable public code sharing and forking for this function. Source code, including embedded credentials, becomes public. Runs, results and stored runtime secrets remain private. This does not enable public execution. Omit or send null to leave sharing unchanged. |

## `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>`, `-n` | Number of items to show (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>`, `-n` | Number of items to show (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 schedules add`

Add a schedule to 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) |
| `--var <stringArray>` | Variable as key=value pair (can be used multiple times) |
| `--vars <string>` | Variables as JSON object string |

```bash theme={null}
# Every weekday at 9:00 UTC, for Paris
notte functions schedules add --cron "0 9 ? * MON-FRI *" --var city=paris

# Every day at 18:00 UTC, with JSON variables
notte functions schedules add --cron "0 18 ? * * *" --vars '{"city": "tokyo", "limit": 5}'
```

## `notte functions schedules list`

List the function's schedules

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

## `notte functions schedules remove <schedule-id>`

Remove one schedule from the function

Aliases: `rm`

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

## `notte functions schedules resume`

Resume the function's paused schedules without changing them

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

## `notte functions schedules update <schedule-id>`

Change a schedule's cron expression or variables. What is not given keeps its current value: `--cron` alone keeps the variables, and `--var` or `--vars` alone keeps the cron expression. Given variables replace all of the schedule's variables.

| 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. |
| `--function-id <string>` | Function ID (uses current function if not specified) |
| `--var <stringArray>` | Variable as key=value pair (can be used multiple times) |
| `--vars <string>` | Variables as JSON object string |

## `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.