Skip to main content

arc function

Pause, resume, and show the game's function and what it answered, read what it logged, and set its secrets.

Each command works on the project's game, by its id, and only its owner may use them, so each needs you to be logged in (not_logged_in). A game that was never deployed, was deleted, or belongs to another account is game_not_found. Studio's Function tab does the same.

A command that changes something takes one channel, --production or --staging, and says so when it's given neither (Which channel?, argument_invalid), since which channel is a choice, never a guess. One that only shows takes either, or neither for both.

arc function pause​

arc function pause

Pause the game's function on a channel

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
--production On production [boolean]
--staging On staging [boolean]
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]

Stops the game's function on a channel: every build's, with no release, until you resume it. It stops answering within a minute, and the game's requests to it are refused as paused. A channel with no function yet is paused all the same, so a release with one stays stopped:

$ arc function pause --production
Paused the game's function on production.
It stops answering within a minute.

With --json, the pause: { "channel": "production", "function": true, "paused": "owner" }, with function false for a channel whose live build has none, or null when that couldn't be read.

arc function resume​

arc function resume

Resume the game's function on a channel

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
--production On production [boolean]
--staging On staging [boolean]
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]

Lifts your pause on a channel, and the function answers again within a minute. A channel that isn't paused stays as it is, and says so. A pause that isn't yours isn't yours to lift (function_pause_not_owned): one of Arcadible's, or one at a limit, which lifts itself as the day or the month turns (UTC).

$ arc function resume --production
Resumed the game's function on production.
It answers again within a minute.

arc function status​

arc function status

Show whether the game's function is running, on each channel

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
--production Only production's [boolean]
--staging Only staging's [boolean]
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]

Shows each channel's function: running, or why it's paused, and until when for a limit's pause, which lifts itself as the day or the month turns (UTC). Both channels, unless one is named.

$ arc function status
CHANNEL STATUS
production running
staging at a limit until 2026-12-01 (UTC)

A channel whose live build has no function says no function. With --json, { "channels": [ … ] }, each with channel, function (whether its live build has one, null when that couldn't be read), paused (owner, arcadible, or limit, or null), and resumes_at. What it answered is arc function usage's.

arc function usage​

arc function usage

Show what the game's function answered, today and this month, against its limits

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
--production Only production's [boolean]
--staging Only staging's [boolean]
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]

Shows what the game's function answered, each channel's requests and CPU time today and this month, then what holds it: the game's requests today, both channels together, against its limit for a day, its month, and its account's games together, against your plan's, and the CPU time of both, which no limit holds. Both channels, unless one is named; what holds it is the same either way. See Limits.

$ arc function usage
CHANNEL REQUESTS TODAY CPU TODAY REQUESTS THIS MONTH CPU THIS MONTH
production 0 0 ms 0 0 ms
staging 612 3.8 s 1,612 4.2 s

612 of 200,000 requests today, both channels together
1,612 requests this month
Your account's games together: 40,112 of 1,000,000
CPU time this month: 4.2 s
Your account's games together: 2.1 min

With --json, channels, each with channel, and its today and month, each with requests and cpu_ms; and today, month, and account, each with its counts, and its allowance, null for no limit.

arc function logs​

arc function logs

Show what the game's function logged, and its failures

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
--production Only production's [boolean]
--staging Only staging's [boolean]
-r, --release Only this release's, by its version [string]
--since From a time: 10m, 2h, 1d, or an ISO time [string]
--failed Only the requests that failed [boolean]
-f, --follow Keep printing each request as it comes [boolean]
-j, --json Format output as JSON [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]

Prints what the game's function logged, a request at a time, as Arcadible keeps it for 7 days: the newest 100, oldest first, in UTC to the millisecond, with the day when it isn't today's. Each request is a line, with its channel, build, method and path, its answer, and its CPU time; what it logged is under it, and its errors in yellow:

$ arc function logs
2026-11-27 14:02:11.381 staging 0.1.5-beta.1 GET /me 200 3 ms CPU
log hello
14:02:12.500 production 0.1.4 POST /move exception 7 ms CPU
error bad move
Error: boom
at move (index.js:3:9)
  • Both channels by default, each request marked with its own, or one with --production or --staging.
  • --release names a build by its version.
  • --since takes 10m, 2h, 1d, or an ISO time (a day alone is midnight, UTC); anything else is argument_invalid.
  • --failed keeps the requests that threw, or went past what a request may use.
  • --follow prints those, then each request as it comes, until you stop it with Ctrl+C, opening again by itself at a follow's hour. A game may have five at once; a sixth is function_logs_follows_full.

A request's outcome is ok, exception, cpu_exceeded, memory_exceeded, canceled (the player left, which isn't a failure), or unknown. With --json, each request is an object on a line of its own, so a follow reads the same way: at, channel, version, method, path, status, outcome, failed, cpu_ms, wall_ms, its lines and exceptions, and truncated when more was said than was kept. It takes no --quiet: what it's asked for is what it prints. Under arc serve, a function's lines are printed where it runs.

arc function secret​

A function's secrets, such as an API's key, which the manifest names in secrets. Each is a channel's, so staging's aren't production's, and a value is never shown again, to anyone: not by these commands, and not by Studio.

arc function secret set​

arc function secret set <name>

Set a secret, its value from standard input

Positionals:
name The secret's name, as the manifest declares it [string] [required]

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
--production On production [boolean]
--staging On staging [boolean]
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]

Sets a secret on a channel, its value from standard input, so it never appears in your shell's history; at a terminal, it's typed and not shown. The function has it within a minute, with no release.

$ printf %s "$EXAMPLE_KEY" | arc function secret set EXAMPLE_KEY --production
Set EXAMPLE_KEY for production.
The game's function has it within a minute.

Your function reads only the secrets its manifest declares in secrets, so a name it doesn't declare is set and warned of (secret_undeclared): the function reads it once a release declares it. With --json, { "channel": …, "name": …, "warnings": [ … ] }.

A secret's name is in capitals, such as EXAMPLE_KEY: letters, digits, and underscores, up to 64 characters, starting with a letter and not with ARCADIBLE_. Its value is up to 4 KB (secret_too_large), and a channel holds 16 (secret_quota_full).

arc function secret list​

arc function secret list

List the game's secrets, never their values

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
--production Only production's [boolean]
--staging Only staging's [boolean]
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]

Lists the game's secrets, each with its channel and the day it was set, never a value:

$ arc function secret list
NAME CHANNEL SET
EXAMPLE_KEY production 2026-11-11

With --json, { "secrets": [ … ] }, each with name, channel, and updated_at.

arc function secret remove​

arc function secret remove <name>

Remove a secret

Positionals:
name The secret's name, as the manifest declares it [string] [required]

Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
--production On production [boolean]
--staging On staging [boolean]
-j, --json Format output as JSON [boolean] [default: false]
-q, --quiet Output only errors [boolean] [default: false]
-C, --cwd Set the working directory [string] [default: "."]
--yes Don't ask first [boolean]

Removes a secret from a channel. At a terminal it asks first; anywhere else it needs --yes, as arc game delete does. One that isn't set is secret_not_found.

Output​

Each prints what it did, or what it was asked for. With --json, the same as one JSON document, and with --quiet, nothing but a failure, as every command does (Output).

CodeWhen
0It did what it was asked, or, for remove, you answered no and nothing changed
1It didn't: a channel was needed, you're not logged in, the game isn't yours, or it was refused
130You cancelled a question with Ctrl+C, or stopped --follow