@nxcc/cli
v0.1.3
Published
CLI for interacting with nXCC nodes
Readme
@nxcc/cli
CLI for interacting with nXCC nodes
Installation
npm install -g @nxcc/cliCommands
Project Management
nxcc init [directory]
Create a new nXCC TypeScript project
nxcc init my-projectnxcc bundle <manifest-template>
Create a worker bundle from a manifest template
nxcc bundle manifest.json --out bundle.json --signer <private-key>Options:
--out <path>: Output path for the bundle--signer <private-key>: Private key to sign the bundle
Worker Management
nxcc worker deploy <manifest-path>
Deploy a worker to an nXCC node
nxcc worker deploy manifest.json --rpc-url http://localhost:6922Options:
--rpc-url <url>: nXCC node HTTP RPC URL (default: http://localhost:6922)--bundle: Bundle the worker code into a data URL--signer <private-key>: Private key to sign the work order
nxcc worker logs <worker-id>
Stream logs from a worker
nxcc worker logs my-worker-id --rpc-url http://localhost:6922 --followOptions:
--rpc-url <url>: nXCC node HTTP RPC URL (default: http://localhost:6922)-f, --follow: Follow log output (stream new logs)-t, --tail <lines>: Number of lines to tail (default: 10)
Node Management
nxcc node get-report
Get the node's environment report (attestation + operator signature)
nxcc node get-report --rpc-url http://localhost:6922Options:
--rpc-url <url>: nXCC node HTTP RPC URL (default: http://localhost:6922)-o, --output <path>: Output file to save the env report JSON
Example:
# Print env report to console
nxcc node get-report --rpc-url http://localhost:6922
# Save env report to file
nxcc node get-report --rpc-url http://localhost:6922 -o env-report.jsonIdentity Management
nxcc identity <command>
Manage identities on various blockchains
Examples
Getting Started
- Create a new project:
nxcc init my-nxcc-project
cd my-nxcc-project- Deploy a worker:
nxcc worker deploy manifest.json --rpc-url http://localhost:6922- View worker logs:
nxcc worker logs <worker-id> --follow --rpc-url http://localhost:6922- Get node environment report:
nxcc node get-report --rpc-url http://localhost:6922 -o node-report.jsonConfiguration
The CLI uses the following default configuration:
- Default RPC URL:
http://localhost:6922 - Default log tail lines: 10
You can override these defaults using command-line options.
License
MIT
