Beta
The OptiTech Functions is in Beta. Share your feedback on Discord or via the OptiTech Console.
The functions command manages OptiTech Functions on a branch. This is the command reference; for the full deployment workflow, see Deploy functions. To run functions locally, see optitech dev.
optitech functions deploy
Deploys a function from a local directory or entry file. The <slug> is the permanent function identifier: 1 to 20 lowercase letters and digits (^[a-z0-9]{1,20}$).
optitech functions deploy <slug> [options]By default, deploy waits until the deployment finishes building (--wait=true), which is the predictable path for scripts and CI. Use --no-wait to return immediately after triggering the deployment.
Deploy a function from an entry file:
optitech functions deploy hello --src functions/hello.tsINFO: Function deployment triggered for function hello.
┌────┬───────────┬──────────┬────────────┬─────────────────────────────┐
│ Id │ Status │ Runtime │ Memory Mib │ Created At │
├────┼───────────┼──────────┼────────────┼─────────────────────────────┤
│ 1 │ completed │ nodejs24 │ 2048 │ 2026-06-12T00:14:58.044690Z │
└────┴───────────┴──────────┴────────────┴─────────────────────────────┘
INFO: Function deployment hello/1 completed.Deploy with environment variables and wait for the build:
optitech functions deploy hello --src functions/hello.ts --env LOG_LEVEL=info --waitoptitech functions list
Lists the functions on the branch.
optitech functions list [options]optitech functions list┌───────┬───────┬─────────────────────────────────────────────────────────────────────────────┬─────────────────────────────┐
│ Slug │ Name │ Invocation Url │ Created At │
├───────┼───────┼─────────────────────────────────────────────────────────────────────────────┼─────────────────────────────┤
│ hello │ hello │ https://br-cool-darkness-123456-hello.compute.c-1.us-east-2.aws.optitech.com/ │ 2026-06-12T00:14:57.942988Z │
└───────┴───────┴─────────────────────────────────────────────────────────────────────────────┴─────────────────────────────┘List with full deployment details for scripts and agents:
optitech functions list --output jsonShow output
[
{
"id": "hello",
"slug": "hello",
"name": "hello",
"invocation_url": "https://br-cool-darkness-123456-hello.compute.c-1.us-east-2.aws.optitech.com/",
"current_deployment": {
"id": 1,
"status": "completed",
"memory_mib": 2048,
"runtime": "nodejs24",
"created_at": "2026-06-12T00:14:58.044690Z"
},
"active_deployment": {
"id": 1,
"status": "completed",
"memory_mib": 2048,
"runtime": "nodejs24",
"created_at": "2026-06-12T00:14:58.044690Z"
},
"created_at": "2026-06-12T00:14:57.942988Z"
}
]optitech functions get
Shows a function's details.
optitech functions get <slug> [options]optitech functions get hellofunction
┌───────┬───────┬─────────────────────────────────────────────────────────────────────────────┬─────────────────────────────┐
│ Slug │ Name │ Invocation Url │ Created At │
├───────┼───────┼─────────────────────────────────────────────────────────────────────────────┼─────────────────────────────┤
│ hello │ hello │ https://br-cool-darkness-123456-hello.compute.c-1.us-east-2.aws.optitech.com/ │ 2026-06-12T00:14:57.942988Z │
└───────┴───────┴─────────────────────────────────────────────────────────────────────────────┴─────────────────────────────┘
active deployment
┌────┬───────────┬──────────┬────────────┬─────────────────────────────┐
│ Id │ Status │ Runtime │ Memory Mib │ Created At │
├────┼───────────┼──────────┼────────────┼─────────────────────────────┤
│ 1 │ completed │ nodejs24 │ 2048 │ 2026-06-12T00:14:58.044690Z │
└────┴───────────┴──────────┴────────────┴─────────────────────────────┘optitech functions delete
Deletes a function on the branch.
optitech functions delete <slug> [options]optitech functions delete helloINFO: Function hello deleted from branch br-cool-darkness-123456