vefaas: Volcengine FaaS CLI
vefaas is the command-line tool for Volcengine Function Service (veFaaS). It enables serverless application deployment, function management, and configuration through a streamlined workflow.
Installation
CODEBLOCK0
Verify installation:
CODEBLOCK1
Core Workflow
The typical deployment pattern:
- 1. Check Node.js:
node --version (requires >= 18, recommended 20+)
- If version is too low, switch using nvm (
nvm use 20) or fnm (
fnm use 20), or manually install a newer version
- 2. Check CLI:
vefaas --version to verify installation - Check Auth:
vefaas login --check to verify login status
- If not logged in, run
vefaas login --sso (opens browser, auto-completes when user authorizes - no manual input needed)
- 4. Deploy: INLINECODE6
- Access:
vefaas domains to view URLs
Quick Commands
| Purpose | Command |
|---|
| Check auth | INLINECODE8 |
| Login (SSO) |
vefaas login --sso (non-interactive: opens browser, auto-completes when authorized,
recommended) |
| Login (AK/SK) |
vefaas login --accessKey <AK> --secretKey <SK> |
| Init from template |
vefaas init --template <name> |
| Deploy new app |
vefaas deploy --newApp <name> --gatewayName $(vefaas run listgateways --first) --yes |
| Deploy existing |
vefaas deploy --app <name> --yes |
| List gateways |
vefaas run listgateways --first |
| View URLs |
vefaas domains |
| Set env var |
vefaas env set KEY VALUE |
| View config |
vefaas config list |
| Pull code |
vefaas pull --func <name> |
| Inspect project |
vefaas inspect |
Global Options
| Option | Description |
|---|
| INLINECODE20 | Enable debug mode for troubleshooting |
| INLINECODE21 |
Non-interactive mode (required for CI/AI coding) |
|
--region | Region override (e.g., cn-beijing) |
Cookbooks
Step-by-step guides for common scenarios:
References
Detailed documentation on specific topics:
Important Notes
- - Always use
--yes for non-interactive mode in CI/CD and AI coding scenarios - Use
$(vefaas run listgateways --first) to get an available gateway - Config is stored in
.vefaas/config.json after linking - Use
--debug or -d to troubleshoot issues
vefaas:火山引擎函数服务CLI
vefaas 是火山引擎函数服务(veFaaS)的命令行工具。它通过简化的工作流程实现无服务器应用部署、函数管理和配置。
安装
bash
npm i -g https://vefaas-cli.tos-cn-beijing.volces.com/volcengine-vefaas-latest.tgz
验证安装:
bash
vefaas --version
核心工作流程
典型的部署模式:
- 1. 检查Node.js:node --version(需要>=18,推荐20+)
- 如果版本过低,使用nvm(nvm use 20)或fnm(fnm use 20)切换,或手动安装更新版本
- 2. 检查CLI:vefaas --version验证安装
- 检查认证:vefaas login --check验证登录状态
- 如果未登录,运行vefaas login --sso(打开浏览器,用户授权后自动完成 - 无需手动输入)
- 4. 部署:vefaas deploy --newApp <名称> --gatewayName $(vefaas run listgateways --first) --yes
- 访问:vefaas domains查看URL
快速命令
| 用途 | 命令 |
|---|
| 检查认证 | vefaas login --check |
| 登录(SSO) |
vefaas login --sso(非交互式:打开浏览器,授权后自动完成,
推荐) |
| 登录(AK/SK) | vefaas login --accessKey
--secretKey |
| 从模板初始化 | vefaas init --template <名称> |
| 部署新应用 | vefaas deploy --newApp <名称> --gatewayName $(vefaas run listgateways --first) --yes |
| 部署已有应用 | vefaas deploy --app <名称> --yes |
| 列出网关 | vefaas run listgateways --first |
| 查看URL | vefaas domains |
| 设置环境变量 | vefaas env set KEY VALUE |
| 查看配置 | vefaas config list |
| 拉取代码 | vefaas pull --func <名称> |
| 检查项目 | vefaas inspect |
全局选项
| 选项 | 描述 |
|---|
| -d, --debug | 启用调试模式以排查问题 |
| --yes |
非交互模式(CI/AI编码必需) |
| --region | 区域覆盖(例如cn-beijing) |
操作指南
常见场景的分步指南:
参考文档
特定主题的详细文档:
重要说明
- - 在CI/CD和AI编码场景中始终使用--yes启用非交互模式
- 使用$(vefaas run listgateways --first)获取可用网关
- 关联后配置存储在.vefaas/config.json中
- 使用--debug或-d排查问题