wagmi-cli
Use this skill when working with @wagmi/cli: managing and generating code from Ethereum ABIs (config, commands, plugins, programmatic API).
Source: wevm/wagmi — scope: packages/cli only.
Core
| Topic | Description | Reference |
|---|---|---|
| CLI commands | wagmi generate / wagmi init and options | core-commands |
| Config | defineConfig, Config, ContractConfig, default config | core-config |
| Plugin API | Plugin and Watch types; contracts, run, validate, watch | core-plugin-api |
| Logger | success, info, log, warn, error, spinner | core-logger |
| Validation errors | fromZodError, ValidationError (internal) | core-errors |
| Internal types | Compute, MaybeArray, MaybePromise, RequiredBy | core-types |
Features
| Topic | Description | Reference |
|---|---|---|
| Config resolution | How findConfig and --config / --root work | features-config-resolution |
| Built-in plugins | fetch, foundry, hardhat, react, etherscan, sourcify, routescan, blockExplorer, actions | features-plugins |
| Foundry / Hardhat | foundry(), hardhat() options — artifacts, deployments, watch, commands | features-foundry-hardhat |
| Etherscan & env | API keys, loadEnv, .env files | features-etherscan-env |
| Fetch plugin | request, parse, getCacheKey, cache, timeout, getCacheDir | features-fetch |
| blockExplorer | baseUrl, apiKey, chainId, getAddress, getabi API | features-block-explorer |
| Sourcify / Routescan | sourcify(), routescan() — chainId, contracts, API key | features-sourcify-routescan |
| React / Actions options | getHookName, abiItemHooks, getActionName, overridePackageName | features-react-actions |
Advanced
| Topic | Description | Reference |
|---|---|---|
| Programmatic usage | Exports from @wagmi/cli, @wagmi/cli/config, @wagmi/cli/plugins | advanced-programmatic |
| Config resolution & bundling | resolveConfig, bundle-require, async config export | advanced-resolve-config |
| Internal utils | format, getAddressDocString, getIsUsingTypeScript, packages | advanced-utils |
| Generate flow | getContract, writeContracts, watch, contract uniqueness | advanced-generate-flow |
Quick reference
- •Binary:
wagmi(afterpnpm add @wagmi/cli). - •Config file:
wagmi.config.tsorwagmi.config.js(or path via-c). - •Default out:
src/generated.ts. - •Docs: wagmi.sh.