← Back to Skills Marketplace
ggg223399

Byreal Perps CLI

by James333 · GitHub ↗ · v0.2.2 · MIT-0
cross-platform ✓ Security Clean
128
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install byreal-perps-cli
Description
Byreal Hyperliquid perpetual futures trading CLI: account setup, market/limit orders with TP/SL, position close-market/close-limit/close-all, leverage contro...
README (SKILL.md)

Hyperliquid Perps Trading

Installation

# Check if already installed
which byreal-perps-cli && byreal-perps-cli --version

# Install
npm install -g @byreal-io/byreal-perps-cli

Credentials & Permissions

  • All trading commands require account initialization via byreal-perps-cli account init before any trading operations
  • Read-only commands (account info, position list, order list, account history): Require initialized perps account
  • Write commands (order market, order limit, order cancel, position close-market/close-limit/close-all, position leverage): Require initialized perps account with valid agent wallet
  • Signal commands (signal scan, signal detail): No account required — uses public market data only
  • Perps agent keys are stored locally in the byreal data directory with strict file permissions (mode 0600)
  • The CLI never transmits private keys over the network — keys are only used locally for transaction signing
  • AI agents should never ask users to paste private keys in chat; always direct them to run byreal-perps-cli account init interactively

WebSocket / API Fallback

Some commands (account info, position list, position close-market, position close-limit, position close-all) use WebSocket subscriptions to fetch real-time data. If the WebSocket connection fails or times out, the CLI automatically falls back to HTTP API calls. No user action is needed.

If a command returns a connection error:

  1. The CLI will retry via HTTP API automatically; if it still fails, the issue is likely network connectivity or Hyperliquid API downtime.
  2. Check network connectivity: curl -s https://api.hyperliquid.xyz/info -X POST -H 'Content-Type: application/json' -d '{"type":"meta"}'
  3. For testnet, check: curl -s https://api.hyperliquid-testnet.xyz/info -X POST -H 'Content-Type: application/json' -d '{"type":"meta"}'
  4. If HTTP API also fails, the Hyperliquid service may be temporarily unavailable — retry after a short wait.

Hard Constraints

  1. -o json only for parsing — when showing results to the user, omit it and let the CLI's built-in tables render directly. Never fetch JSON then re-draw tables yourself.
  2. Never display private keys — use keypair paths only
  3. Never call the SDK directly — do NOT write node -e / tsx -e scripts that import or require packages like @nktkas/hyperliquid or viem. Always use byreal-perps-cli commands to interact with Hyperliquid. The SDK is bundled inside the CLI; calling it externally causes CJS/ESM compatibility errors.

Commands Reference

Account Management

# Initialize perps account (interactive wizard)
byreal-perps-cli account init

# Show account info & balance
byreal-perps-cli account info

# Show recent trade history
byreal-perps-cli account history

Orders

# Market order (side: buy/sell/long/short, size in coin units)
byreal-perps-cli order market \x3Cside> \x3Csize> \x3Ccoin>
byreal-perps-cli order market buy 0.01 BTC --tp 110000 --sl 90000

# Limit order
byreal-perps-cli order limit \x3Cside> \x3Csize> \x3Ccoin> \x3Cprice>
byreal-perps-cli order limit sell 1 ETH 4000

# List open orders
byreal-perps-cli order list

# Cancel an order
byreal-perps-cli order cancel \x3Ccoin> \x3Coid>

# Cancel all orders
byreal-perps-cli order cancel-all -y

Positions

# List open positions
byreal-perps-cli position list

# Set leverage (1-50x)
byreal-perps-cli position leverage \x3Ccoin> \x3Cleverage>

# Close at market price (full or partial)
byreal-perps-cli position close-market \x3Ccoin>

# Close with limit order
byreal-perps-cli position close-limit \x3Ccoin> \x3Cprice>

# Close all positions
byreal-perps-cli position close-all -y

Market Signals

# Scan markets for trading signals
byreal-perps-cli signal scan

# Detailed technical analysis
byreal-perps-cli signal detail \x3Ccoin>

Update

# Check for available CLI updates
byreal-perps-cli update check

# Install the latest CLI version
byreal-perps-cli update install

Testnet

All commands support --testnet:

byreal-perps-cli --testnet account info
Usage Guidance
This skill is internally consistent for a trading CLI, but take standard precautions before installing and using it with real funds: 1) Inspect the npm package and GitHub repo (maintainer, recent commits, issues) to confirm authenticity and that the package name isn't a typo-squat. 2) Review the package code (or request a third-party audit) to confirm key storage and networking behavior — SKILL.md's claim that private keys are never transmitted is not independently verified. 3) Prefer installing in an isolated environment/container and test on testnet (--testnet) with small amounts first. 4) Never paste private keys into chat; use the provided interactive account init. 5) Keep npm package versions pinned and verify package integrity (checksums/signatures) when possible.
Capability Analysis
Type: OpenClaw Skill Name: byreal-perps-cli Version: 0.2.2 The skill bundle provides instructions for an AI agent to interact with the `byreal-perps-cli` tool for Hyperliquid trading. The documentation in SKILL.md includes strong security practices, explicitly instructing the agent never to ask for private keys and highlighting that keys are stored locally with restricted permissions (0600). The commands and metadata (including URLs like api.hyperliquid.xyz) are consistent with the stated purpose of a trading CLI, and no evidence of malicious intent, data exfiltration, or harmful prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description, required binary (byreal-perps-cli), and npm install (@byreal-io/byreal-perps-cli) are coherent for a trading CLI. No unrelated credentials or unrelated binaries are requested.
Instruction Scope
SKILL.md instructs only to install/use the CLI, run trading and signal commands, and provides network fallbacks and curl checks. It explicitly warns agents not to ask users to paste private keys and not to call bundled SDKs directly. It does not instruct reading unrelated system files or exfiltrating data.
Install Mechanism
Install spec uses a public npm package (@byreal-io/byreal-perps-cli) with global install. This is a normal delivery for a JS CLI but carries standard supply-chain risk (npm package integrity, typosquatting). The package homepage is a GitHub repo, which is a positive signal but should be verified.
Credentials
No environment variables or external credentials are declared; account initialization is done interactively and keys are stored locally per the docs. That is proportionate for a CLI that signs transactions locally. However, the claim that private keys 'never' leave the machine is asserted by the docs and not independently verified here.
Persistence & Privilege
Skill is not always-enabled and does not request elevated platform privileges or modify other skills. Autonomous invocation is allowed (platform default) but not combined with other concerning privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install byreal-perps-cli
  3. After installation, invoke the skill by name or use /byreal-perps-cli
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.2.2
- Improved documentation and command reference in SKILL.md, detailing installation, credential management, command usage, and API/WebSocket fallback. - Added clear guidance on permissions, data privacy, and security practices for running trading and signal commands. - Explicitly listed hard constraints: only use the CLI interface, do not expose private keys, and avoid raw SDK calls. - Provided updated examples for key commands: account management, order/position handling, market signals, updates, and testnet usage. - Enhanced troubleshooting information for API connectivity issues.
Metadata
Slug byreal-perps-cli
Version 0.2.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Byreal Perps CLI?

Byreal Hyperliquid perpetual futures trading CLI: account setup, market/limit orders with TP/SL, position close-market/close-limit/close-all, leverage contro... It is an AI Agent Skill for Claude Code / OpenClaw, with 128 downloads so far.

How do I install Byreal Perps CLI?

Run "/install byreal-perps-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Byreal Perps CLI free?

Yes, Byreal Perps CLI is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Byreal Perps CLI support?

Byreal Perps CLI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Byreal Perps CLI?

It is built and maintained by James333 (@ggg223399); the current version is v0.2.2.

💬 Comments