CLI & Automation Guide

Eterna CLI Guide: Terminal TypeScript Strategies with `@eterna-hybrid-exchange/cli`

Interactive AI chats are great for research and discretionary execution, while deterministic terminal scripts are ideal for scheduled scans, portfolio snapshots, and automated alerts. Eterna CLI bridges both worlds using the exact same MCP backend.

Updated: By Eterna Engineering (Security & Agent Architecture Team)Read as Markdown
Direct Answer

Install or run `npx @eterna-hybrid-exchange/cli` to authenticate via OAuth 2.1 device flow and invoke Eterna MCP tools (`search_sdk`, `execute_code`) directly from bash, zsh, nushell, cron jobs, or CI pipelines with clean JSON output.

NPM Package@eterna-hybrid-exchange/cliMIT licensed, zero subscription fee
Login MethodOAuth Device FlowWorks on headless SSH / VPS machines
Output FormatStructured JSONPipe directly into jq, nushell, or webhooks
RuntimeNode.js >= 18Trading code runs on remote Deno sandbox
https://mcp.eterna.exchange/mcp

1. Authenticate & Run Your First CLI Query

  1. 01Run OAuth device login

    Start the CLI login flow once to store your scoped OAuth credentials locally.

    npx @eterna-hybrid-exchange/cli auth login
  2. 02Search SDK methods from the terminal

    Inspect method signatures without opening a browser.

    npx @eterna-hybrid-exchange/cli search-sdk "rsi macd order"
  3. 03Execute a live market scan file

    Run any local `.ts` strategy file inside Eterna's remote sandbox and inspect structured JSON output.

    npx @eterna-hybrid-exchange/cli exec --file ./scan-watchlist.ts

2. Best Automation Patterns for Eterna CLI

  • 15-minute cron watchlist scanner pushing RSI/MACD confluence alerts to Telegram or Slack.
  • Hourly portfolio and funding-rate snapshots archived to Postgres, SQLite, or CSV.
  • Shell skill backend for OpenClaw, Hermes, or custom coding agents that prefer CLI over HTTP MCP.
  • Scheduled spot DCA script buying fixed USDT amounts of BTC/ETH/SOL on weekly intervals.
FAQ

Frequently asked questions

Does `@eterna-hybrid-exchange/cli` require installing Bybit or CCXT dependencies?
No. The CLI sends your TypeScript snippet to Eterna's remote MCP gateway, where the `eterna.*` SDK and all technical indicators are already preloaded.
Is Eterna CLI free to use?
Yes. The CLI is MIT-licensed and free ($0/month). You pay only standard trading fees when orders fill.
Primary Sources

References & verification links

Start Trading via MCP

Connect your AI agent in 30 seconds

One remote MCP URL. 800+ USDT perpetuals, 380+ spot pairs, 0.014% maker / 0.035% taker, no KYC.

View on GitHub