{"_id":"@alx-protocol/cli","name":"@alx-protocol/cli","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alx-protocol/cli","version":"1.0.0","description":"ALX Protocol CLI — create, validate, and trace blocks from the command line","type":"module","bin":{"alx":"bin/alx.js"},"scripts":{"test":"node --test src/__tests__/"},"dependencies":{"js-sha3":"0.9.3"},"engines":{"node":">=18"},"license":"MIT","gitHead":"dc393ae1020191dcd7e9fa78a42e7c618f82b0fd","_id":"@alx-protocol/cli@1.0.0","_nodeVersion":"20.19.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-5cXVpTFDNl6pU7MdZc5g99hHddwUrrc2vLTt/bk90ai4CiPQWUan4iRsBKL/kVEx20bHWLel2e9hU08KyID+yw==","shasum":"02d1690f08e108bd65136e0ef3fc04d0b7d63101","tarball":"https://registry.npmjs.org/@alx-protocol/cli/-/cli-1.0.0.tgz","fileCount":4,"unpackedSize":38700,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDMJ/hzhi1yVjWYpDiUBmHzFwRHC7QDhbkBmrx6iJJJPwIgJGmozxUk1C3EqA7k8STu34lxjQFVpPbi45/yZ/qUTdU="}]},"_npmUser":{"name":"xandrlabsdev","email":"team@xandrlabs.ai"},"directories":{},"maintainers":[{"name":"xandrlabsdev","email":"team@xandrlabs.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_1.0.0_1777871842846_0.04883236669085744"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-04T05:17:22.734Z","1.0.0":"2026-05-04T05:17:22.976Z","modified":"2026-05-04T05:17:23.238Z"},"maintainers":[{"name":"xandrlabsdev","email":"team@xandrlabs.ai"}],"description":"ALX Protocol CLI — create, validate, and trace blocks from the command line","license":"MIT","readme":"# ALX CLI\n\nCommand-line interface and HTTP API server for the ALX Protocol.\n\n## Commands\n\n```\nalx init [dir]                 Create a starter project with example blocks\nalx validate <file>            Validate a block or graph (JSON)\nalx inspect <file>             Explain a block field-by-field\nalx block create <options>     Create a new block\nalx trace <hash> --file <f>    Trace attribution through a graph\nalx test-vectors run           Run official conformance tests\nalx serve [--port 8080]        Start local reference API server\nalx version                    Show version info\n```\n\n## Quick start\n\n```bash\n# From the repo root\npnpm install && pnpm build\n\n# Run conformance tests\nnode cli/bin/alx.js test-vectors run\n\n# Create a demo project\nnode cli/bin/alx.js init demo\ncd demo\n\n# Validate blocks\nnode ../cli/bin/alx.js validate research.block.json\nnode ../cli/bin/alx.js validate graph.json\n\n# Inspect a block\nnode ../cli/bin/alx.js inspect decision.block.json\n```\n\n## HTTP API\n\nStart the server:\n\n```bash\nnode cli/bin/alx.js serve --port 8080\n```\n\nEndpoints:\n\n| Method | Path | Description |\n|---|---|---|\n| GET | `/health` | Health check |\n| GET | `/version` | CLI + protocol version |\n| POST | `/block/create` | Create a block from content + parents |\n| POST | `/block/validate` | Validate a block's integrity |\n| POST | `/validate` | Alias for `/block/validate` |\n| POST | `/trace` | Trace attribution through a graph |\n| POST | `/test-vectors/run` | Run conformance suite |\n\nExample:\n\n```bash\ncurl http://localhost:8080/health\n\ncurl -X POST http://localhost:8080/block/create \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"content\":{\"type\":\"test\"},\"parentHashes\":[]}'\n\ncurl -X POST http://localhost:8080/test-vectors/run\n```\n\n## Output modes\n\nCommands produce human-readable output by default. Add `--json` for machine-readable JSON:\n\n```bash\nnode cli/bin/alx.js block create --content '{\"x\":1}' --json\n```\n","readmeFilename":"README.md","_rev":"1-6d23c165563476ccc02b7bd8e930ae79"}