Compare
glnc vs ethers.js
This is not really a head-to-head; it is a build-versus-buy choice. ethers.js (and its modern sibling viem) is a library: you import it, write code, and assemble exactly the read or write you need. It is the foundation under most EVM apps and scripts.
glnc is the finished tool for the common case. When the task is "what is in this wallet," "what did this transaction do," or "what is gas right now," glnc answers in one command across nine chains, with no project to set up and no code to maintain. Write ethers when you need custom logic; run glnc when you just need the answer.
Quick recommendation
Use ethers.js (or viem) when you are building software: a dapp, a bot, a backend job, anything that needs custom logic, signing, or to run unattended as part of a larger system. Use glnc when you want a wallet balance, a decoded transaction, or live gas right now, without opening an editor. One is the toolkit; the other is the tool.
Side by side
The honest framing: glnc is itself written in JavaScript and stands on the same RPC layer a library would. The difference is whether you assemble the pieces yourself or run something that already did.
| Feature | ethers.js | glnc |
|---|---|---|
| What it is | A JavaScript/TypeScript library you import into your own code. | A command-line program you install and run. |
| To check a balance | Set up a project, create a Provider, call the contract, decode decimals, format the output. | glnc balance vitalik.eth. Token discovery and USD totals included. |
| Multi-chain | Configure a Provider per chain and orchestrate the calls yourself. | Nine chains built in. Auto-detects the chain from the address. |
| Decode a transaction | Fetch the receipt, match logs against ABIs you supply, decode by hand. | English summary out of the box: token movements, routers, Governor, Timelock, MultiSend. |
| Signing and writes | Yes. Full transaction construction, signing, and broadcasting. | No. Read-only by design; glnc never touches a private key. |
| Output | JavaScript objects you serialize however you like. | Human tables in the terminal; stable, versioned JSON envelopes under --json. |
| Maintenance | Your code and its dependencies, kept current as the library evolves. | A single binary; upgrades via your package manager. |
| Best at | Building applications and custom on-chain logic. | Ad-hoc inspection, shell pipelines, and monitoring without writing code. |
When ethers.js is the right tool
- You are building an app. A frontend, a bot, an indexer, a backend job: anything that needs to live inside your own program.
- You need to sign or send transactions. Writes, contract deployments, and key management are squarely library territory.
- You need custom logic. Bespoke decoding, simulation, or business rules that no general-purpose CLI can anticipate.
When glnc is the right tool
- One-off answers. A balance, a decoded transaction, or a gas snapshot, without standing up a project.
- Shell-native workflows. Pipe versioned JSON into
jq,cron, or Slack instead of writing and hosting a script. - Multi-chain by default. Nine chains in one command, no per-chain Provider wiring.
Use both
They are layers, not rivals. Build with ethers or viem when you are writing software, and keep glnc in your PATH for the moments between coding sessions when you just need to look at the chain. A glnc query piped through jq is often the fastest way to grab an address or a value that your ethers script then acts on.
Sources
- ethers.js documentation (opens in new tab): the JavaScript library
- viem documentation (opens in new tab): the modern TypeScript alternative