@faable/faable

中文文档
4.41.0发布于 2026/11/13MITTypeScriptES Module构建来源已验证近 30 天下载 7907
原始使用文档
文档目录13 节
  1. Install
  2. Quick start
  3. Commands
  4. MCP server
  5. Scripting and agents
  6. Deploy
  7. Faable Auth
  8. Documentation
  9. CLI
  10. Faable Deploy
  11. Faable Auth
  12. Support
  13. License

Faable CLI: deploy and run your apps from the terminal

npm version MIT license Documentation

Faable CLI

@faable/faable is the command-line interface for the Faable platform. It covers Faable Deploy (ship and operate apps) and Faable Auth (manage an identity tenant: users, login-flow actions, OAuth clients and the audit log) from one binary.

Full reference: faable.com/docs/cli.

Install

Requires Node.js 22.8 or later.

npm i -g @faable/faable

Quick start

faable login    # sign in from your browser
faable deploy   # deploy the current directory
faable deploy status

Commands

GroupWhat it doesDocs
faable login / whoami / logoutSession management (device flow; CI uses OIDC, no login needed)Authentication
faable projectThe project commands act on: list, use, current, clear (or --project on any command)Projects
faable organizationGroup projects under a company: list, get, create, projects add/rm, admins add/rm (org for short)Organizations
faable deploylaunch (the default: a bare faable deploy deploys the current directory), then status, logs, deployments, inspect, trigger, redeploy, cancel, traffic, usage, quota, openDeployment
faable deploy appslist, get, create (from a GitHub repository, first deploy included), set (branch, root directory, deploy mode)Apps
faable deploy secretsEnvironment variables: list, set (KEY=VALUE, --env-file, or -f - from stdin), rmSecrets
faable deploy domainsCustom domains: add (prints the CNAME), list, check, rmDomains
faable deploy wafEdge rules: block (403), sink (404 without waking the app), list, rmEdge rules
faable auth userslist (FaableQL filters), get (federated identities included), suspend, reinstateUsers
faable auth actionsLogin-flow hooks: list, get --code, create, update, rmActions
faable auth clientsOAuth clients: list, get --secret, create, rmOAuth clients
faable auth logsAudit log (read-only): list with filters, getAudit logs

Every command has --help and --json. --app takes an app id, name or slug. The complete table is in the command reference.

MCP server

faable mcp runs the CLI as an MCP server over stdio, so Claude Code, Cursor or any MCP client can read your apps, deployments and logs — "why did my last deploy fail?" — and deploy, with your faable login session:

claude mcp add faable -- npx -y @faable/faable mcp

By default it exposes reads plus deploy_app (build the latest commit server-side). faable mcp --writes adds the reversible writes: create an app from a repository, set environment variables, add a domain, retry or cancel a build, change deploy settings. Nothing destructive is exposed. Secret values are never returned, and logs come back marked as data, not instructions.

Scripting and agents

Data goes to stdout, messages to stderr. With --json:

  • every listing is {"object":"list","data":[…],"has_more","next_cursor"} (--limit, --starting-after, --all);
  • every write returns what it changed, and a write with nothing to do returns {"result":"noop","reason"};
  • a failure exits 1 with {"error":{"message","code","status","action"}} on stderr. Codes: not_logged_in, session_expired, account_suspended, apikey_session, forbidden, not_found, confirmation_required, app_required, usage, or the API's own code.

A program driving the CLI should set FAABLE_NONINTERACTIVE=1 (or pass --non-interactive): nothing prompts — a confirmation without --yes fails with confirmation_required —, the app is never inferred from the working directory, and faable deploy launch needs --app, --workdir and --yes. Pass secret values on stdin (faable deploy secrets set -f -), never as arguments.

Deploy

faable login
faable deploy                       # deploy the current directory (= deploy launch)
faable deploy launch --app app_x    # deploy another app, from anywhere
faable deploy apps create --repo acme/web   # create, link, first deploy
faable deploy --create site --workdir ./public --yes   # a new app from a folder (git or not)
faable deploy link --app web --repo acme/web      # link a repository to an existing app
faable deploy apps rm --app app_x   # delete an app (asks first; --yes to skip)
faable deploy status                # phase, URL and detected stack
faable deploy logs --build -n 100   # end of the build output (--follow to tail)
faable deploy traffic --since 7d    # status codes, top and failing paths
faable deploy secrets set KEY=value
faable deploy domains add app.example.com

Faable Auth

faable auth manages a Faable Auth tenant and reuses your faable login session. Point it at your tenant with --auth-url https://<account>.auth.faable.link (or FAABLE_AUTH_URL).

faable auth users list --query email_verified:false --limit 50
faable auth users get user_abc123                   # includes GitHub/… identities
faable auth users suspend user_abc123 -r "abuse: crypto miner"

# Bulk: pipe ids from a filtered listing
faable auth users list --suspended --json | jq -r '.data[].id' | faable auth users reinstate -y

faable auth actions create -n add-claims -t post-login -f ./claims.js
faable auth clients create -n my-app --callback https://app.example.com/callback
faable auth logs list --origin oauth --status failed --since 2026-08-01

See faable auth in the docs for every flag. The concepts behind each group are documented in Faable Auth: users & suspension, actions, login flows, OAuth clients and audit logs.

Documentation

The CLI is a thin client: what it deploys and what it manages is documented in the public docs, not here.

CLI

Faable Deploy

Faable Auth

Support

License

MIT © Faable Cloud SLU

版本与发布记录

@faable/faable 共发布 216 个版本,首次发布于 2022/12/21;过去 12 个月发布了 172 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
4.41.0latest2026/11/13今天
4.40.02026/11/121 天前
4.39.12026/11/112 天前
4.39.02026/11/112 天前
4.38.12026/11/113 天前
4.38.02026/11/113 天前

其他发布通道:next → 1.5.17-next.27。

关于 @faable/faable 的常见问题

如何安装 @faable/faable?

在项目目录运行 npm install @faable/faable,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 faable,可以用 npx faable 直接运行。

@faable/faable 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@faable/faable 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@faable/faable 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.8。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@faable/faable 可以商用吗?

@faable/faable 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@faable/faable 的下载量有多少?

根据 npm 官方下载统计,@faable/faable 在 2026/10/14 – 2026/11/12 这 30 天内被下载 7,907 次,日均约 264 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@faable/faable 还在维护吗?

最新版本 4.41.0 发布于 2026/11/13(今天);至今共发布 216 个版本,其中过去 12 个月发布了 172 个;首次发布于 2022/12/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。