vestberry-cli
v0.1.0
Published
Production-grade GraphQL CLI for Vestberry
Downloads
96
Maintainers
Readme
vestberry-cli
Production-grade GraphQL CLI for Vestberry with two layers:
- Layer A: primitive read/write commands
- Layer B: intent/orchestration commands for agent workflows
Install from npm
Requirements:
- Node.js
>=18(Node20recommended)
npm install -g vestberry-cli
vestberry --helpFrom source
npm install
npm run build
npm link
vestberry --helpAuth
Create .env:
VESTBERRY_API_KEY=...
VESTBERRY_API_BASE_URL=https://api.vestberry.com/graphqlGlobal Flags
--api-key <key>--format json|table|csv(defaultjson)--compact/--no-compact(default compact)--verbose--dry-run
Command Layers
Layer A: Primitive Wrappers
Thin wrappers around single API operations. Use these when you want direct control over query inputs and raw response shapes.
auth testraw gql,raw httpfund list|get|get-portco-list|searchportfolio-company get|searchfund get-summaryportco dashboardinvestment list|searchround list|get|searchcaptable-event liststakeholder list|searchkpi overview|definitions|reports|valuesnote list|create|updatemeta countries|currencies|fx-rates
Examples:
vestberry auth test
vestberry schema pull
vestberry fund list
vestberry fund search --query "Sample Growth Fund"
vestberry fund get <fund-id>
vestberry fund get <fund-id> --full
vestberry fund get-portco-list <fund-id>
vestberry fund get-summary <fund-id>
vestberry fund get-summary <fund-id> --full
vestberry fund get-summary <fund-id> --select id,investmentName,irr,multiple
vestberry fund get-summary <fund-id> --select portfolioCompanies.id,portfolioCompanies.irr,summary.irr
vestberry fund get-summary <fund-id> --export-json
vestberry portfolio-company search --fund-id <fund-id> --query "Sample Co"
vestberry portco dashboard <fund-id> <portco-id>
vestberry kpi overview --fund-id <fund-id>
vestberry round list --company-id <company-id>
vestberry captable-event list --company-id <company-id>Layer B: Advanced Intent Commands
Composed workflows that orchestrate multiple primitives and return opinionated output for common tasks.
portfolio overviewportfolio companiescompany dossierrounds last-quarterinvested totalingest legal-docs
Examples:
vestberry portfolio overview --fund-id <fund-id> --cut-off-date 2025-12-31 --export-json
vestberry portfolio companies --fund-id <fund-id>
vestberry company dossier --company-id <company-id> --fund-id <fund-id> --full
vestberry rounds last-quarter --fund-id <fund-id>
vestberry invested total --company "Company" --fund "Fund"Output Formats
json: default, list envelope includes paginationtable: flattened rowscsv: flattened rows
Compact Formatting
Compact mode strips non-essential metadata and simplifies nested fields.
Disable with --no-compact.
Portfolio Overview Export
Use --export-json [path] on portfolio overview to write the payload to disk instead of printing full JSON to terminal.
vestberry portfolio overview --fund-id <fund-id> --export-jsonvestberry portfolio overview --fund-id <fund-id> --cut-off-date 2025-12-31 --export-jsonvestberry portfolio overview --fund-id <fund-id> --export-json ./tmp/overview.json
When no path is provided, files are saved in output/ with naming:
<timestamp>-portfolio-overview-fund-id-<fund-id>.json
Export payload structure:
cutOffDate(replacesuntil)fund(id,name)performance(numberOfCashFlows,numberOfNAVs,balance,tvpi,dpi,rvpi,netIrr)portfolioCompanies(flattened dashboard metrics preferringfund, thengp, thenlocal; single latestlatestInvestmentRoundDate)
For fund get-summary, JSON output/export uses:
portfolioCompanies(instead ofdata)- flattened company rows:
portfolioCompany.*anddashboardDetails.*moved one level up - company rows exclude redundant
portfolioCompanyCompanyIdand excludeportfolioFund - flattened
summary:dashboardDetails.*moved one level up summary.idis set to the queried fund id- optional
--select <fields>projection for prosumer/agent use:- unscoped fields (e.g.
id,irr) are applied where available - scoped fields:
portfolioCompanies.<field>andsummary.<field>
- unscoped fields (e.g.
Rows are filtered to non-empty id and non-empty portfolioCompany.id; aggregate TOTAL is exposed as top-level summary when present.
Write Safety
Mutations are dry-run by default.
For write commands, pass --apply --no-dry-run to execute.
Run logs are written to .cache/runs/.
Development
npm run dev -- --help
npm run type-check
npm run lint
npm run test
npm run buildPublishing (maintainers)
npm run verify
npm pack --dry-run
npm publishIntegration tests (live API):
npm run test:integrationTroubleshooting
- 401/403: verify API key and base URL
- GraphQL field errors: run
vestberry schema pulland useraw gqlfor discovery - Empty arrays can be valid (for sparse KPI/report datasets)
License
MIT
