Overview
The Fairmint CLI lets you pull your company's cap table data straight from your computer's terminal, with no need to open the web app. In a few commands you can log in, pick your company, and export a ready-to-share file of your equity grants, stock, warrants, or SAFEs.
The CLI is the command-line version of Cap Table AI. It installs two commands that do the same thing: captable-ai and the shorter cai. You can use either one throughout this guide.
Common uses:
Export a register of every equity grant (options, RSUs, and other awards) as CSV, JSON, or Excel
Export registers of stock issuances, warrants, or SAFEs and convertible notes
Download your full cap table as an Excel workbook, or a shareholder register PDF
Model a financing, conversion, or option pool scenario without changing your records
Let an AI assistant like Claude or Cursor work with your cap table on your behalf
Before you start
You need three things:
A terminal. On a Mac, open the Terminal app (press Cmd + Space and type "Terminal"). On Windows, open PowerShell.
Node.js 20 or newer. Check by running
node -vin your terminal. If you see a version below 20, or "command not found", install the latest LTS version from nodejs.org first. This also installs npm, which you'll use in the next step.Owner or admin access to your company on Fairmint. Exports only work for owners and admins of the company you select.
Step 1: Install the CLI
Copy this command into your terminal and press Enter:
npm install -g @fairmint/captable-ai@latest
Wait for the install to finish before moving on. Run each command in this guide one at a time, rather than pasting several at once.
To update later, run the same command again. Adding @latest makes sure you always get the newest version.
Step 2: Log in
Run:
captable-ai login
A browser window opens. Sign in with the email you use for Fairmint, accept the terms, and click Finish in browser. Then return to your terminal.
To confirm you're logged in, run:
captable-ai auth status
This shows the email you're signed in with, when your session expires, and your active company. Sessions refresh on their own, so you usually only log in once.
To sign out or switch to a different account, run captable-ai logout, then log in again.
Step 3: Choose your company
Every command runs against one active company. First, list the companies you can access:
captable-ai company list
Then set the one you want, using its name (in quotes) or its ID from the list:
captable-ai company use "Acme Inc"
To check which company is active at any time, run captable-ai company current.
Step 4: Export your equity grants
The grants export gives you one row per grant, ready to open in Excel or Google Sheets. Exports are read-only, so running them never changes your cap table.
Move to the folder where you want the file saved. Files save to whichever folder your terminal is in. To save to your Downloads folder, run:
cd Downloads
Run the export. For a CSV of all grants, including ones not yet committed to your cap table:
cai export grants --include-pending --csv --output grants.csv
Open the file. Look in your Downloads folder for
grants.csv.
Each row includes the holder's name and contact details, quantity, dollar amount, status, accepted on date, cliff and vesting length (in months), effective date, award type (ISO, NSO, or RSU), series, and plan.
Other ways to export grants
What you want | Command |
Excel file via a download link (valid 1 hour) |
|
Committed grants only, as of a date |
|
JSON, for scripts or other tools |
|
Quick preview of the first rows |
|
Export options
Option | What it does |
(no option) | One Excel sheet, returned as a download link that expires after 1 hour |
| CSV format |
| JSON format |
| Saves the CSV or JSON to a file in your current folder |
| Adds grants that aren't committed to your cap table yet |
| Only includes grants issued on or before that date |
Use either --csv or --json, not both. Without --include-pending, the export lists your committed cap table only.
The same options work for your other registers: cai export stock, cai export warrants, and cai export convertibles. For convertibles, add --type SAFE or --type NOTE to filter by type.
Command reference
These are the commands most useful day to day. For the complete list, run captable-ai commands. Every command works with captable-ai or cai.
Account and company
Command | What it does |
| Log in through your browser |
| Sign out and clear your saved session |
| Show your email, session expiry, and active company |
| List the companies you can access |
| Set your active company |
| Show your active company |
Exports and reports
Command | What it does |
| Register of options, RSUs, and other equity awards |
| Register of stock issuances: holder, class, quantity, issue date, price, amount |
| Register of warrants: holder, quantity, exercise price, expiration date, underlying class, issue date |
| Register of SAFEs, notes, and other convertibles: holder, type, date, round, amount, valuation cap, discount |
| Your full cap table as an Excel workbook (summary, holder view, ledgers, transaction history). Add |
| Shareholder register PDF. Add |
Viewing your cap table
Command | What it does |
| Snapshot of capitalization, stakeholders, convertibles, and key metrics. Supports |
| List the records on your cap table, with filters for type, stakeholder, date, and draft or committed status |
| Details for one record, including its source document |
Documents
Command | What it does |
| Upload a PDF, DOCX, XLSX, DOC, or image (up to 50 MB each) |
| See your uploaded documents and their status |
| Check where each document is in processing |
Scenario modeling
Command | What it does |
| Model a new financing round |
| Model SAFEs or notes converting at a set valuation |
| Model warrants being exercised |
| Model an option pool expansion |
Pro forma scenarios never change your actual cap table.
Tip: add --json to most commands to get structured output, which is handy if you're using the CLI with an AI assistant or a script.
Troubleshooting and FAQ
I get "command not found: captable-ai". The CLI isn't installed yet, or the install didn't finish. Run the install command from Step 1, wait for it to complete, then try again. If it still fails, close and reopen your terminal.
I'm told I'm not logged in, or my session expired. Run captable-ai login again.
My company doesn't show up in company list. Run captable-ai auth status to check which email you're signed in with. If it's the wrong one, run captable-ai logout, then log in with the email you use for Fairmint. You also need owner or admin access to the company.
I can't find my exported file. Files save to the folder your terminal was in when you ran the command. Run cd Downloads before exporting to save files there.
My Excel download link stopped working. Links expire after 1 hour. Run the export again for a fresh link, or use --csv --output to save a file directly.
Some grants are missing from my export. Add --include-pending to include grants not yet committed to your cap table. Grants sent through Fairmint that are still waiting on a signature won't appear until they're signed.
Can I choose which columns are included, or schedule exports? Not yet. Each register has a fixed set of columns, and each export is a one-time run.
Need help?
We're happy to walk you through it. Message us through the chat bubble in the Fairmint app, or email contact@fairmint.co.
