filecoin-cli
v1.1.0
Published
Agent-first CLI for Filecoin storage and IPFS. JSON output by default.
Readme
filecoin-cli
Agent-first CLI for Filecoin storage, IPFS, and unsigned transaction building with JSON-first output.
Install
npm install -g filecoin-cliUsage
filecoin --help
filecoin chain head
filecoin balance <address>
filecoin miner info <minerId>
filecoin actor state <actorId>
filecoin ipfs cid <input>
filecoin address validate <address>
filecoin transfer --from f1... --to f1... --value 1000000000000000000
filecoin message build --from f1... --to f01234 --value 0 --method 2 --params <base64>Transaction building
filecoin transfer and filecoin message build output a stable JSON envelope for MoonPay handoff:
{
"chain": "filecoin",
"network": "mainnet",
"kind": "filecoin_unsigned_message",
"message": {
"Version": 0,
"To": "f01234",
"From": "f1sender...",
"Nonce": 12,
"Value": "1000000000000000000",
"GasLimit": 101325,
"GasFeeCap": "100",
"GasPremium": "3",
"Method": 0,
"Params": ""
},
"moonpay": {
"chain": "filecoin",
"payloadType": "filecoin_unsigned_message",
"transaction": { "...": "same as message" },
"signer": "moonpay-cli@>=1.12.1"
}
}Notes:
transferis just a method0message with empty params.- If nonce/gas fields are omitted, the CLI fetches/estimates them from the configured Filecoin RPC.
message buildis the bare-metal escape hatch for actor calls: you provide--methodand base64--paramsexactly as Filecoin expects.
Development
npm ci
npm run build
npm testMCP server
filecoin mcpStarts the MCP server over stdio for agent/tool integrations.
