@hostfunc/cli
v0.3.1
Published
Hostfunc CLI for deploying and running tiny composable TypeScript functions.
Maintainers
Readme
📦 Installation
Get started instantly by installing the CLI globally via npm:
npm install -g @hostfunc/cliNote: Requires Node.js ≥ 22.
⚡️ Quickstart
Connect to your workspace and push your first function in seconds:
# 1. Authenticate your CLI with your token and URL
hostfunc login --token <api-token> --url https://your-hostfunc-url
# 2. Initialize a function context
hostfunc init --fnId <fn_id>
# 3. View your available functions
hostfunc list
# 4. Deploy your function seamlessly
hostfunc deploy
# 5. Run your function with a JSON payload
hostfunc run --payload ./payload.json🛠️ Complete Command Reference
| Command | Description | Options |
| :--- | :--- | :--- |
| login | Authenticate the CLI with Hostfunc. | --token <token>, --url <baseUrl> |
| init | Initialize a local workspace for a function. | --url <baseUrl>, --fnId <id> |
| list | List available functions in your workspace. | --query <text> |
| deploy | Deploy the current function bundle to the edge. | --fnId <id> |
| run | Execute a function immediately with data. | --fnId <id>, --payload <jsonFile> |
| logs | View and stream execution logs. | --executionId <id> |
| secrets set | Securely set secret environment variables. | <KEY> <VALUE>, --fnId <id> |
| help | Display the help menu and command usage. | |
🛡️ Privacy First
Zero Telemetry. @hostfunc/cli does not collect, store, or transmit any telemetry data. Your code and execution patterns stay yours.
