@fairmint/captable-ai

中文文档
0.1.42发布于 2026/11/11MITES Module零依赖近 30 天下载 2426

Agent-native CLI for Captable AI — manage companies, upload documents, run OCF extraction, and commit cap tables from the terminal.

原始使用文档
文档目录10 节
  1. Installation
  2. Authentication
  3. Quickstart
  4. Uploading documents — the optimal flow
  5. Commands
  6. Signed agreements
  7. Instrument registers
  8. Structured output
  9. Environment variables
  10. License

@fairmint/captable-ai

Agent-native command-line interface for Captable AI. Manage companies, upload documents, run OCF (Open Cap Format) extraction, review and edit extracted objects, and commit cap tables — all from your terminal or an AI agent.

Built for both humans and AI agents: every command supports --json for structured, parseable output, uses a stable exit-code taxonomy, and rejects unknown flags with helpful errors.

Installation

npm install -g @fairmint/captable-ai

This exposes two binaries: captable-ai and the short alias cai. Requires Node.js >= 20.

Authentication

captable-ai login

Opens your browser to authenticate. After approving, click "Finish in browser" or paste the login code back into the terminal. Credentials are stored in ~/.captable-ai/. Use captable-ai logout to clear them and captable-ai auth status to inspect the session.

Quickstart

captable-ai login
captable-ai onboarding status
captable-ai onboarding setup ...            # only when you have no workspace
captable-ai company use "Acme Inc"           # if you have more than one
captable-ai import start
captable-ai documents upload ./docs/*.pdf
captable-ai import status <session-id>
captable-ai documents trigger-extraction    # once all docs are CLASSIFIED
captable-ai documents list                  # poll until PROCESSED
captable-ai commit --dry-run                 # preview
captable-ai commit --all                     # commit all drafts (or --objects id1,id2)
captable-ai summary

Uploading documents — the optimal flow

CaptableAI builds your cap table by reading your legal documents. The pipeline is automated, but a few habits make extraction faster and more accurate:

  1. Upload everything first. Add all of your cap table documents up front, in one batch where possible — incorporation docs, SAFEs, stock and option agreements, board consents. Supported: PDF, DOCX, XLSX, DOC, and images, up to 50 MB per file via the CLI. captable-ai documents upload ./docs/*.pdf
  2. Wait for classification. Each document is OCR'd and classified (type + effective date). Don't trigger extraction until every document shows CLASSIFIED. captable-ai documents list
  3. Check the classification dates. The effective date set during classification determines processing order. Fix a wrong date before triggering extraction: captable-ai documents classification-update
  4. Trigger extraction once. Extraction does not start automatically for CLI uploads — run it a single time after all documents are classified. captable-ai documents trigger-extraction
  5. Let the FIFO queue run. Documents are extracted one at a time, in ascending order of their classification date (earliest first), so later events build on earlier ones. Expect a few minutes per document.
  6. Validation runs automatically. Once the last document finishes extraction, a company-wide validator runs across all objects to repair cross-document issues — no action needed.
  7. Review, then commit. When all documents reach PROCESSED, review and commit. captable-ai objects list --status draft → captable-ai commit --dry-run → captable-ai commit --all (commit requires --all or --objects id1,id2,...).

Be patient — and when to retry:

  • Extraction and validation are asynchronous. Poll captable-ai documents list (or captable-ai documents processing-status) rather than re-triggering — duplicate triggers just slow things down.
  • Per-document extraction and the validator are only considered stuck after roughly 15 minutes of no progress. Wait out that window before assuming a problem.
  • Retry commands are a last resort, used only after the wait window: documents reprocess (a FAILED doc), documents cancel-extraction / documents restart-extraction (a genuinely stuck doc), or retrigger-validation (a stalled validator).

Commands

CommandDescription
login / logoutAuthenticate / clear stored credentials
auth statusShow the current session
onboarding status|setupInspect onboarding or create the first workspace
import start|statusStart an import session and poll existing document processing
company list|use|current|create|deleteManage and select the active company
documents upload|list|download|deleteManage source documents
documents trigger-extraction|cancel-extraction|restart-extraction|reprocessControl the OCF extraction pipeline
documents processing-status|classification-types|classification-updateInspect document status / classification
agreements list|downloadSigned investment and grant agreements, one-hour download links
objects list|get|dump|update|patch|revert|versions|deleteWork with extracted OCF objects (list supports --document, --stakeholder, --all, --max-confidence; dump writes engine-shaped ocf.json)
schemas list|getBrowse the OCF object-type registry
commitCommit drafts to the cap table — --all or --objects id1,id2 (--dry-run to preview)
summaryFull cap table snapshot
export / registerExport the cap table (Excel) / shareholder register (--include-equity-awards adds option grants)
export stock|grants|warrants|convertiblesOne instrument register, one row per security (Excel link by default; --csv / --json for rows)
pro-forma runModel financing, convertible, warrant, and option-pool scenarios
retrigger-validationRe-queue a stalled validator
jobs list|get|pruneTrack async operations
profile save|use|list|get|deleteNamed configuration profiles
logsView agent/extraction logs
feedbackReport CLI friction to the maintainers
commandsMachine-readable list of all commands and flags

Run captable-ai <command> --help for full usage, or captable-ai commands --json for the authoritative machine-readable list.

Signed agreements

documents list holds what the extraction pipeline ingested. Signed agreements are listed separately, whether or not they were ingested:

captable-ai agreements list                      # investments and grants, newest signed first
captable-ai agreements list --type grant --json
captable-ai agreements download grant:<awardId>  # one-hour download link
  • Investments — the signed file of a SAFE (Send One SAFE, Community SAFE), custom document, or legacy investment, once signed, whether or not payment is marked.
  • Grants — Send One Grants both parties signed. The download is the agreement, supporting documents, and both signature certificates. The grantee's tax form and 83(b) election are never included; download those from Studio.

Legacy grant agreements imported through the extraction pipeline stay under documents list / documents download.

Instrument registers

captable-ai export with no register is the full legal cap table: a multi-sheet Excel workbook returned as a one-hour download link. Four registers export one instrument family, one row per security:

captable-ai export stock                                   # Excel download link
captable-ai export grants --include-pending                # options, RSUs, other awards
captable-ai export warrants --json                         # rows as a JSON array
captable-ai export convertibles --type SAFE --csv          # SAFEs only, CSV on stdout
captable-ai export convertibles --type NOTE --json --output notes.json

Every register carries the holder fields (name, email, address, country, state) and the economics of that family. Grants lead with the grant date; convertibles put the signature date, execution date, and status right after the holder. Without a format flag the result is one Excel sheet returned as a download link. --csv prints RFC-4180 CSV whose header row is the JSON keys; --json prints the rows as a JSON array. Pass one or neither. --output <path> writes the CSV or JSON body to a file and, for these commands only, does not imply --json.

By default a register lists the committed cap table only. --include-pending adds what is not committed yet: draft OCF objects, plus investment, equity_grant, and equity_award (Send One Grant) rows that have no OCF transaction. A row that already has an OCF object appears once. Registers are read-only and never commit drafts. You must be an owner or admin of the active company.

Structured output

Pass --json to any command for machine-readable output. Data goes to stdout, errors go to stderr, and the process exits with a typed code:

CodeMeaning
0Success
2Usage error (bad/unknown flag, missing argument)
3Auth required / session expired
4Not found
5Conflict (version conflict, nothing to commit)
6Validation error
7Server error (5xx)
8Network error

Environment variables

VariablePurpose
CAPTABLE_AI_STAGE / STAGETarget environment: production (default), staging, dev, local
CAPTABLE_AI_API_URLOverride the API base URL
CAPTABLE_AI_AUTH_URLOverride the login page URL
CAPTABLE_AI_PORTAL_IDOverride the active company for a single invocation
CAPTABLE_AI_FEEDBACK_URLEndpoint for feedback send

License

MIT © Fairmint, Inc.

版本与发布记录

@fairmint/captable-ai 共发布 44 个版本,首次发布于 2026/06/25;过去 12 个月发布了 44 个版本。

版本发布日期距今
0.1.42latest2026/11/113 天前
0.1.412026/11/113 天前
0.1.402026/11/059 天前
0.1.392026/10/2916 天前
0.1.382026/10/2321 天前
0.1.372026/10/2322 天前

关于 @fairmint/captable-ai 的常见问题

@fairmint/captable-ai 是什么?

Agent-native CLI for Captable AI — manage companies, upload documents, run OCF extraction, and commit cap tables from the terminal.

如何安装 @fairmint/captable-ai?

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

@fairmint/captable-ai 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/fairmint__captable-ai 是否存在。

@fairmint/captable-ai 支持 ESM 还是 CommonJS?

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

@fairmint/captable-ai 需要什么版本的 Node.js?

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

@fairmint/captable-ai 可以商用吗?

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

@fairmint/captable-ai 的下载量有多少?

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

@fairmint/captable-ai 还在维护吗?

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