npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dappql

v2.1.2

Published

wagmi extension to easily query smart-contracts

Readme

dappql

Typed smart-contract codegen for dApps, built on wagmi + viem. Point it at your ABIs, get back a fully typed SDK, plus a project-level AGENTS.md so AI coding agents produce correct code on the first try.

Part of the DappQL toolchain. The CLI is what you run; the runtime libraries (@dappql/react, @dappql/async) are what your app imports.

Install

npm install -g dappql
# or run via npx, no global install required
npx dappql

Configure

Create dapp.config.js at the root of your project:

export default {
  // Where to emit the typed contract modules
  targetPath: './src/contracts',

  // Set to true for an ESM project
  isModule: true,

  // Set to true to emit `sdk.ts`, a `createSdk(publicClient, walletClient)` factory
  // for shipping a publishable protocol SDK
  isSdk: false,

  // Controls the per-project AGENTS.md file (default: true)
  // - true: write ./AGENTS.md
  // - false: skip
  // - '<path>': custom location
  agentsFile: true,

  // Optional, needed if any contract omits its abi and you want dappql to fetch it
  etherscanApiKey: process.env.ETHERSCAN_API_KEY,
  chainId: 1,

  contracts: {
    Token: {
      address: '0x...',
      abi: [/* ... */],
    },
    ToDo: {
      address: '0x...',
      abi: [/* ... */],
    },
    // For contracts deployed at many addresses (user wallets, vaults, ERC20s)
    ERC20: {
      isTemplate: true,
      abi: [/* ... */],
    },
  },
}

Then run:

dappql

What gets generated

For a config like the one above, dappql emits:

src/contracts/
├── Token.ts          # typed call / mutation / event helpers
├── ToDo.ts
├── ERC20.ts
├── index.ts          # re-exports each contract as a namespace
└── sdk.ts            # only if isSdk: true, createSdk() factory

Plus AGENTS.md at your project root, containing a table of every contract, its reads/writes/events, ABI-accurate argument placeholders, and the non-negotiable rules for using DappQL correctly, curated for AI coding agents.

Re-runs replace only the managed block in AGENTS.md (marked with <!-- dappql:start --> ... <!-- dappql:end -->), so hand-written content around it is preserved.

Usage in your app

Once generated, your application imports from the contracts folder:

import { Token, ToDo } from './src/contracts'
import { useContextQuery, useMutation } from '@dappql/react'

function Dashboard({ account }) {
  // Batched into a single multicall, typed end-to-end
  const { data } = useContextQuery({
    balance: Token.call.balanceOf(account),
    symbol: Token.call.symbol(),
    totalTasks: ToDo.call.totalTasks(),
  })

  const tx = useMutation(ToDo.mutation.addItem, 'Add task')

  return <button onClick={() => tx.send('Buy milk', 0n)}>Add</button>
}

See @dappql/react for the full React surface, or @dappql/async for non-React (scripts, servers, bots).

ABI sources

dappql resolves ABIs in this order per contract:

  1. abi field on the contract entry in dapp.config.js (most projects)
  2. Local JSON file at ${abiSourcePath}/${ContractName}.json (if configured)
  3. Etherscan (if etherscanApiKey is set and the contract has an address)

Missing ABIs are reported and skipped.

Related packages

| Package | Purpose | | --- | --- | | @dappql/react | React hooks, provider, query manager | | @dappql/async | Non-React runtime, query, mutate, iteratorQuery | | @dappql/codegen | The codegen engine, programmatic API, used by this CLI and by @dappql/mcp | | @dappql/mcp | MCP server exposing your DappQL project to AI coding agents |

Full documentation

github.com/dappql/core

License

MIT