CLI v5

The CLI connects to the Hedge Layer public beta. Use it for testing and evaluation; features and availability may change.

The Hedge Layer CLI calls the HTTP API directly. It discovers the server catalog, so MCP and CLI users get the same operations without maintaining a second set of business logic.

Install and connect

npm install -g @hedge-layer/cli@5
hl auth login
hl tools
hl call search_markets --args '{"query":"bitcoin"}'

These commands require CLI v5. For a development build, follow the CLI repository instructions.

Use a personal token from API tokens. For scripts, configure HL_TOKEN and optionally HL_API_URL. Use hl --help for command options.

Structured inputs and results

Results are JSON. Inspect tool schemas with hl tools, then pass arguments inline, from a JSON file, or through standard input.

hl call search_markets --file search.json
cat search.json | hl call search_markets --stdin

The CLI exits unsuccessfully for transport failures and tool errors. Calls are never retried automatically.