hypecli

Crates.iohypecli
lib.rshypecli
version0.1.3
created_at2026-01-08 09:31:41.130236+00
updated_at2026-01-10 20:48:09.200359+00
descriptionCLI tool for interacting with Hyperliquid via hypersdk
homepagehttps://github.com/infinitefield/hypersdk
repositoryhttps://github.com/infinitefield/hypersdk
max_upload_size
id2029802
size226,908
Dario (ifdario)

documentation

https://docs.rs/hypersdk

README

hypecli

A command-line interface for interacting with the Hyperliquid protocol.

Crates.io License: MPL 2.0

Overview

hypecli is a lightweight CLI tool built on top of hypersdk for quick queries and operations on Hyperliquid. It provides fast access to market data, user balances, and DeFi protocol information without writing custom code.

Installation

From crates.io

cargo install hypecli

From source

git clone https://github.com/infinitefield/hypersdk.git
cd hypersdk/hypecli
cargo install --path .

Usage

hypecli --help

Features

Multi-Signature Transactions (P2P)

Coordinate multi-signature transactions using decentralized peer-to-peer gossip, without relying on a centralized server.

Initiating an Asset Transfer

The initiator creates a transaction proposal and waits for authorized signers to connect and sign:

hypecli multisig send-asset \
  --multi-sig-addr 0xYourMultiSigWallet... \
  --chain Mainnet \
  --to 0xRecipient... \
  --token USDC \
  --amount 100 \
  --keystore my-wallet

If no wallet is detected, hypecli defaults to a connected Ledger, if any.

Output:

Using signer 0xSigner1...
Authorized users: [0xSigner1..., 0xSigner2..., 0xSigner3...]

hypecli multisig sign --multi-sig-addr 0xYourMultiSigWallet... --chain Mainnet --connect endpoint...

Authorized 1/2

The command displays a connection ticket that other signers can use to connect. It waits until the signature threshold is met, then submits the transaction.

Signing a Transaction

Other authorized signers connect to the initiator using the endpoint ticket:

hypecli multisig sign \
  --multi-sig-addr 0xYourMultiSigWallet... \
  --chain Mainnet \
  --connect endpoint... \
  --keystore another-wallet

Output:

Signer found using 0xSigner2...
Neighbor up: abc123...
SendAsset {
    destination: 0xRecipient...,
    token: "USDC",
    amount: 100,
    ...
}
Accept (y/n)?

The signer reviews the transaction details and types y to approve or n to reject.

Signer Options:

You can provide signing credentials via:

  • --private-key 0x... - Direct private key (hex format)
  • --keystore filename - Foundry keystore file (prompts for password)
  • No flag - Automatically searches connected Ledger devices

For keystores:

# With password prompt
hypecli multisig sign --keystore my-wallet --connect endpoint...

# With password flag (less secure, visible in history)
hypecli multisig sign --keystore my-wallet --password mypass --connect endpoint...

How P2P Multi-Sig Works:

  1. Decentralized: Uses Iroh's gossip protocol for peer-to-peer communication
  2. No Server: No centralized coordinator required
  3. NAT Traversal: Supports mDNS and DNS discovery with relay fallback
  4. Secure: Each signer reviews and cryptographically signs the exact transaction
  5. Threshold: Collects signatures until the on-chain threshold is met
  6. Privacy: Ephemeral keys used for P2P connections

Network Discovery:

The CLI uses multiple discovery mechanisms:

  • mDNS: Discovers peers on the local network
  • DNS: Uses the n0 relay network for discovery
  • Direct Connect: Uses endpoint tickets for direct peer connections

This allows signers to coordinate from anywhere, even behind NATs or firewalls.

Documentation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Ideas for contributions:

  • New commands for trading operations
  • JSON output format support
  • Configuration file support
  • Interactive mode
  • Performance optimizations

License

This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.

Support


Note: This CLI is not officially affiliated with Hyperliquid. It is a community-maintained project built on hypersdk.

Commit count: 132

cargo fmt