
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@morpho-dev/router-cli
Advanced tools
CLI to run a router that listens to offers added to a remote mempool.
Status: Alpha – this CLI is under active development and interfaces/behavior are subject to change.
CLI to run a router that serves offers and performs validations.
pnpm add -g @morpho-dev/router-cli
pnpx @morpho-dev/router-cli --help
# or
pnpm dlx @morpho-dev/router-cli --help
Use router-cli
to run a local Router server:
Examples:
# Router with seeded random offers and UI
router-cli start --seed 100 --ui
# Router with validation enabled
router-cli start --validation
# Router with offers loaded from file
router-cli start --file offers.json
# Router with custom port
router-cli start --router-port 8080
You can also run the UI without starting a local Router server, pointing it to any Router endpoint.
--router-url
.# UI against default remote Router (https://router.morpho.dev)
router-cli ui
# UI against a custom Router endpoint (e.g., local)
router-cli ui --router-url http://localhost:7891
The Router API is available at http://localhost:7891
(or your custom port) and supports the same endpoints as the production Router.
Usage: router-cli [options] [command]
CLI to run Router and ingest offers from a remote Mempool
Options:
--store <type> (choices: "memory", "pglite", default: "memory",
env: ROUTER_STORE)
--router-port <n> (default: 7891, env: ROUTER_PORT)
--chain-id <id> (default: 1, env: CHAIN_ID)
--mainnet-rpc-url <url> (default: "https://mainnet.gateway.tenderly.co",
env: MAINNET_RPC_URL)
--base-rpc-url <url> (default: "https://base.gateway.tenderly.co", env:
BASE_RPC_URL)
-V, --version output the version number
-h, --help display help for command
Commands:
start [options]
export [options] Export offers from a Router endpoint to stdout or
file
validate [options] Validate offers from a JSON file and print statuses
tunnel [options] Expose the local Router via ngrok
healthcheck [options] Check environment & connectivity: RPCs, Router
match [options] Match offers via Router API
sync [options] Sync offers from a remote Router into the local
store, then serve locally
ui [options] Start UI against a Router endpoint
mempool [options] Start a local chain with the mempool contract
help [command] display help for command
Usage: router-cli start [options]
Options:
--seed <n> Seed random offers to router
--file <path> Seed offers from a JSON file
--validation Perform offer validation (default: false)
--ui Start minimal UI (default: false)
-h, --help display help for command
Usage: router-cli export [options]
Export offers from a Router endpoint to stdout or file
Options:
--router-url <url> (default: "https://router.morpho.dev", env: ROUTER_URL)
--out <path> (default: "router-export.jsonl", env: EXPORT_OUT)
--format <fmt> (choices: "json", "jsonl", default: "jsonl")
--status <statuses> (env: EXPORT_STATUS)
--pretty (default: false)
-h, --help display help for command
Usage: router-cli validate [options]
Validate offers from a JSON file and print statuses
Options:
--file <path>
--out <path>
-h, --help display help for command
Usage: router-cli tunnel [options]
Expose the local Router via ngrok
Options:
--router-port <n> (default: 7891, env: ROUTER_PORT)
--ngrok-authtoken <token> (env: NGROK_AUTHTOKEN)
-h, --help display help for command
Usage: router-cli healthcheck [options]
Check environment & connectivity: RPCs, Router
Options:
--router-url <url> (default: "https://router.morpho.dev", env: ROUTER_URL)
--json (default: false)
-h, --help display help for command
Usage: router-cli match [options]
Match offers via Router API
Options:
--router-url <url> (default: "https://router.morpho.dev", env: ROUTER_URL)
--side <side> (choices: "buy", "sell")
--status <statuses> (env: MATCH_STATUS)
--limit <n> (default: 20)
--cursor <cursor> (env: MATCH_CURSOR)
--out <path> (env: MATCH_OUT)
--format <fmt> (choices: "json", "jsonl", default: "json")
--pretty (default: false)
-h, --help display help for command
Usage: router-cli sync [options]
Sync offers from a remote Router into the local store, then serve locally
Options:
--router-url <url> (default: "https://router.morpho.dev", env:
REMOTE_ROUTER_URL)
-h, --help display help for command
Usage: router-cli ui [options]
Start UI against a Router endpoint
Options:
--router-url <url> (default: "https://router.morpho.dev", env: ROUTER_URL)
-h, --help display help for command
Usage: router-cli mempool [options]
Start a local chain with the mempool contract
Options:
--port <port> (default: 8545, env: MEMPOOL_PORT)
--fork-url <url> (default: "https://ethereum-rpc.publicnode.com", env:
MEMPOOL_FORK_URL)
-h, --help display help for command
FAQs
CLI to run a router that listens to offers added to a remote mempool.
The npm package @morpho-dev/router-cli receives a total of 722 weekly downloads. As such, @morpho-dev/router-cli popularity was classified as not popular.
We found that @morpho-dev/router-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.