@blockmind/cli
v0.4.6
Published
Typed CLI and API client for BlockMind
Downloads
874
Readme
@blockmind/cli
Typed CLI and API client for BlockMind.
Install
npm i -g @blockmind/cliSetup
- Get an API key from your BlockMind account settings
- Set the environment variable:
export BLOCKMIND_API_KEY=your_api_key_hereOptionally set a custom API base URL (defaults to http://blockmind.localhost:1355):
export BLOCKMIND_API_BASE_URL=https://www.blockmind.appCLI Usage
# Check API connectivity
blockmind health
# Auto-discovered commands from agent OpenAPI operation IDs
blockmind portfolio list
blockmind positions list --portfolio-id <uuid>
blockmind market prices --limit 25 --format table
blockmind market stock quote --symbol AAPL
# Generic fallback by operationId
blockmind call portfolio_snapshot '{"portfolioId":"<uuid>"}'
blockmind call market_stock_quote '{"symbol":"AAPL"}'Programmatic Usage
import { BlockMindClient } from '@blockmind/cli'
const client = new BlockMindClient({
apiKey: process.env.BLOCKMIND_API_KEY,
baseUrl: 'https://www.blockmind.app',
})
// Methods are auto-discovered from the OpenAPI spec.
// Input/output types will be fully typed once the Agent API
// routes add .describe() schemas (tracked separately).
const portfolios = await client.portfolioList()
const snapshot = await client.portfolioSnapshot({
portfolioId: '<uuid>',
})Publishing
Normal releases use Changesets through the repo-level GitHub Actions workflow.
- Add a changeset from the repo root with
bun run changeset. - Merge the feature PR containing the changeset.
- Changesets opens or updates the
Version PackagesPR. - Merge that PR to publish updated packages to npm and create informational tags.
Use a patch changeset when publishing generated Agent API or CLI command updates.
The legacy cli-v* tag workflow remains available as a manual fallback for
publishing outside the Changesets flow.
License
MIT
