@liusha-com/cli
v0.5.2
Published
Deploy serverless functions to Liusha from your terminal.
Maintainers
Readme
@liusha-com/cli
Deploy serverless functions that scale to zero — from your terminal.
npm install -g @liusha-com/cliQuickstart
liusha login # opens the web console, stores an API key in ~/.liusha
liusha init hello # scaffold a Node.js function
cd hello
liusha deploy --image registry.example.com/team/hello:latestFor a Vue, React, or Angular SPA, run liusha deploy from the project root.
The CLI runs npm run build, packages the build output, and deploys it through
Fission's Node environment. Use --spa to force SPA mode, --output-dir when
the framework uses a custom output directory, or --build-command for pnpm/yarn:
liusha deploy --spa
liusha deploy --spa --build-command "pnpm run build" --output-dir distFor a Node.js backend, liusha deploy --node builds projects with a build
script, includes dist/build output, and lets Fission's Node builder install
dependencies. A project with start or serve is wrapped as an HTTP server;
a Fission-style handler can use --entrypoint index.handler instead:
liusha deploy --node
liusha deploy --node --entrypoint src/handlerThe Node runtime expects JavaScript that is compatible with Fission's handler contract. Bun projects are not Node projects and must be converted to a Node-compatible entrypoint first.
Your function is a plain HTTP server listening on PORT — no SDK, no framework
required. Local examples use PORT=8080; in production, do not hard-code a port
or set PORT yourself. It scales to zero when idle and wakes on the first
request.
Language templates
liusha templates
liusha init hello-python --template python
liusha init hello-go --template goBuilt-in templates: node, python, go, java, ruby, php, rust.
Build and push the function image with your preferred tool, then deploy the
image reference to Fission:
liusha deploy --image registry.example.com/team/hello:latestCommands
| Command | What it does |
| --- | --- |
| liusha login [--no-open] [--api-key <key>] | Sign in through the web console, or store an existing API key |
| liusha logout | Remove the stored API key |
| liusha whoami | Show the signed-in account |
| liusha init <name> [--template node\|python\|go\|java\|ruby\|php\|rust] | Create a function from a language template |
| liusha templates | List available templates |
| liusha deploy [-e KEY=value] [-f function] [-i image] [--spa\|--ssr\|--node] | Deploy an image, SPA, SSR app, or Node.js source project through Fission |
| liusha status [function] | Show the function URL and recent deployments |
| liusha logs [function] [--follow] [--since 1h] [--tail 200] | Show recent function logs |
| liusha rollback <deploymentId> | Roll a function back to a ready deployment |
| liusha cancel <deploymentId> | Cancel a queued or releasing deployment |
| liusha diagnose | Check API readiness, login, function config, deployment, and function URL |
| liusha secrets list \| set KEY=value \| rm KEY | Manage encrypted user secrets |
| liusha domains list \| add <hostname> \| rm <hostname> | Manage custom domains for a function |
| liusha functions list \| delete <name> | Manage functions |
| liusha <resource> list\|get\|apply\|delete | Manage resources through the authenticated API |
The CLI supports function, environment, package,
httptrigger, mqtrigger, timetrigger, kubewatch, functionalias,
canaryconfig, and workflow. apply accepts a JSON manifest. The CLI sends
the signed-in user's API key to api.liusha.com; it never reads
~/.kube/config or talks to Kubernetes directly.
How deploys work
liusha deploy either applies a pre-built image, packages a local SPA build,
or uploads a Node.js/SSR source package for Fission's Node builder, then waits
for the HTTPTrigger to become ready. Next.js and Nuxt projects are detected
automatically; use --ssr for another SSR project with build and start
scripts.
Every deploy becomes a new immutable revision;
when it's ready the CLI prints your URL. A liusha.json file in the directory
remembers the function and image — commit it so your team deploys to the same
place.
Use user secrets for values that should persist across deploys. Redeploy after changing secrets so the function binds the new version:
liusha secrets set API_TOKEN=xxx
liusha deployFor one-off non-secret values, pass -e KEY=value to liusha deploy.
PORT is reserved by Liusha and cannot be set with --env or secrets.
Custom domains
Run custom domain commands inside a deployed function directory, or pass
--function <name>:
liusha domains add api.example.com
liusha domains list
liusha domains rm api.example.comAfter adding a domain, create the CNAME printed by the CLI, for example
api.example.com -> custom-origin.liusha.app. Liusha provisions the HTTPS certificate
after DNS points at the function.
Configuration
| Variable | Purpose |
| --- | --- |
| LIUSHA_API_KEY | Overrides the stored key — use this in CI |
| LIUSHA_API_URL | Point the CLI at a different API endpoint |
| LIUSHA_APP_URL | Point browser login at a different console URL |
Docs: https://liusha.com/docs/ · Console: https://app.liusha.com
helm install --namespace epinio --create-namespace epinio epinio/epinio
--set global.domain=epinio.liusha.dev
