# `npx @sanity/cli functions list`

List Functions deployed in a project or organization scope. This command is hidden from generated help. Results cover the whole scope rather than one Stack; use `blueprints info` for the resources of a single Stack.

## Run

Use the locally configured scope:

```sh
npx @sanity/cli functions list --json
```

Select a scope explicitly when working outside a local Blueprint:

```sh
npx @sanity/cli functions list --project-id PROJECT_ID --json
npx @sanity/cli functions list --organization-id ORGANIZATION_ID --json
```

The two flags are mutually exclusive. No Blueprint manifest is required: the scope resolves from those flags, from `SANITY_PROJECT_ID` or `SANITY_ORGANIZATION_ID`, or from `.sanity/blueprint.config.json`, and the command fails with `Missing scope` when none of them do. The scope is sent with the request, so a project and its organization return different sets: scheduled Functions are organization-scoped, every other type is project-scoped.

## Read the result

The JSON result contains `functions`, `scopeType`, and `scopeId`. Each entry carries `id`, `name`, `displayName`, `type`, `runtime`, `status`, `memory`, `storage`, `timeout`, `resourceType`, `resourceId`, `url`, `createdAt`, and `updatedAt`. An empty scope still emits `{"functions": []}` and exits `0`, so check the array length rather than the exit code.

Default output is one line per Function with its name, ID, type, and last update time. `--verbose` (`-v`) instead prints the type, update time, memory, timeout, and event rule of each.

Treat this as an inspection command. `functions logs`, `functions env add`, and `functions env remove` address a Function by its Blueprint resource name resolved through the deployed Stack, not by the `id` shown here.
