hivepaas function
Functions: code HivePaaS runs on one of its runtimes - node24, bun1, python313, go127 - a handler that answers one request. The code is a directory's here: init writes a runtime's starter code, create makes a function of it, deploy sends it again, run calls it once before it is deployed. A function's logs and domains are its app's: hivepaas logs, hivepaas domain.
hivepaas function [command]
Aliases: function, fn, functions
hivepaas function create
Make a function in an environment, of DIR's code - . by default - or with --repo of a repository's, and deploy it: the command waits for the deployment while following its logs, as deploy does. The directory is linked to the function, so that function deploy there needs no flags, unless --no-link or it is linked to another app already.
What is sent of a directory leaves out .git, node_modules, pycache, .venv, venv, .hivepaas and what its .gitignore ignores; --list shows it.
hivepaas function create NAME [DIR] [flags]
Examples:
hivepaas function create hello ./hello -p shop -e staging --runtime node24
hivepaas function create resize -p shop -e staging --runtime python313 \
--repo https://github.com/acme/functions.git --ref main --path resize --call-timeout 2m
Flags:
| Flag | Description |
|---|---|
--auto-deploy | deploy each push to the ref |
--call-timeout string | how long one call may take: 30s, 2m; 1s to 15m |
--commit string | build this commit, its full SHA, and stay at it; none to follow the ref |
--domain string | serve it at this domain, over HTTPS |
--entrypoint string | the file the handler is in; for Go, its package's directory |
--git-credential string | clone with this git credential; none for none |
--handler string | the handler's name: default, handler, Handle |
--list | show the files that would be sent, and send nothing |
--max-body string | the largest request body: 6MB |
--max-concurrency int | the calls one replica takes at once |
--no-auto-deploy | do not deploy on push |
--no-link | do not link the directory to the function |
--no-wait | do not wait for the deployment |
--packages string | Debian packages the runtime image gets: curl,jq; "" for none |
--path string | the function's directory in the repository |
--push-to string | push the built image to the registry of this credential; none keeps it on the node |
--ref string | the branch to build, or tags/NAME for a tag |
--repo string | build the function from this git repository |
--runtime string | node24, bun1, python313 or go127 |
--timeout duration | how long to wait for the deployment (default: 30m0s) |
hivepaas function deploy
Send a function's code - DIR's, . by default, in place of the function's, whole - and the settings its flags change, which deploys it; the command waits as deploy does. A function built from a repository takes no directory: --ref, --commit and --path change what is built, and --use inline sends a directory's code instead. The same code and settings deploy it again.
hivepaas function deploy [DIR] [flags]
Examples:
hivepaas function deploy # in a directory linked to the function
hivepaas function deploy ./hello --call-timeout 1m -a hello
hivepaas function deploy --commit $GITHUB_SHA -a resize
Flags:
| Flag | Description |
|---|---|
--auto-deploy | deploy each push to the ref |
--call-timeout string | how long one call may take: 30s, 2m; 1s to 15m |
--commit string | build this commit, its full SHA, and stay at it; none to follow the ref |
--entrypoint string | the file the handler is in; for Go, its package's directory |
--git-credential string | clone with this git credential; none for none |
--handler string | the handler's name: default, handler, Handle |
--list | show the files that would be sent, and send nothing |
--max-body string | the largest request body: 6MB |
--max-concurrency int | the calls one replica takes at once |
--no-auto-deploy | do not deploy on push |
--no-wait | start the deployment and return |
--packages string | Debian packages the runtime image gets: curl,jq; "" for none |
--path string | the function's directory in the repository |
--push-to string | push the built image to the registry of this credential; none keeps it on the node |
--ref string | the branch to build, or tags/NAME for a tag |
--repo string | build the function from this git repository |
--timeout duration | how long to wait for the deployment (default: 30m0s) |
--use string | switch where the code is: inline, or repo |
hivepaas function get
Show a function: its runtime, code and limits
hivepaas function get [FUNCTION]
hivepaas function init
Write a runtime's starter code into DIR, . by default, made if missing: a handler answering ?name=Ada with {"hello":"Ada"}, as the dashboard starts a function. A file there already is not overwritten unless --force.
hivepaas function init [DIR] [flags]
Examples:
hivepaas function init hello --runtime node24
hivepaas function create hello hello -p shop -e staging --runtime node24
Flags:
| Flag | Description |
|---|---|
--force | overwrite the files there |
--runtime string | node24, bun1, python313 or go127 |
--typescript | Node.js's starter code in TypeScript |
hivepaas function ls
List an environment's functions
hivepaas function ls
hivepaas function metrics
Show a function's calls: how many, how they ended, how long they took
hivepaas function metrics [FUNCTION] [flags]
Flags:
| Flag | Description |
|---|---|
--range string | 1h, 6h, 24h or 7d (default: 24h) |
hivepaas function pull
Write a function's code as the server keeps it - code written in the dashboard - into DIR, . by default, made if missing. A file there with other content stops it, unless --force.
hivepaas function pull [DIR] [flags]
Flags:
| Flag | Description |
|---|---|
--force | overwrite the files there |
hivepaas function run
Call a function once with DIR's code - . by default - not saved nor deployed, in a throwaway container on a build node, with the function's variables and secrets: the dashboard's Test run. The body it answered goes to stdout, as it is; its status, how long it took and what it logged go to stderr. It exits 0 when the function answered, whatever its status - as curl does, and with --fail, 8 for a status of 400 or more - and 8 when it did not answer.
hivepaas function run [DIR] [flags]
Examples:
hivepaas function run --query name=Ada
hivepaas function run ./hello --method POST --data @order.json --header 'Content-Type: application/json' | jq .
Flags:
| Flag | Description |
|---|---|
--data string | the request's body: text, @FILE, or @- for stdin |
--fail | exit 8 for a status of 400 or more |
--header stringArray | a header, 'K: V'; repeat for more |
--list | show the files that would be sent, and send nothing |
--method string | the request's method (default: GET) |
--path string | the request's path (default: /) |
--query stringArray | a query parameter, K=V; repeat for more |
--save-lock | write the lock files the run made into the directory |
The global flags apply to every command.