Skip to content


One command to rule them all!

The Abstract CLI is a command-line tool for generating JavaScript bindings to contracts that use Abstract.


npm i @abstract-money/cli


abstract <command> [options]


Once you have installed the CLI, you have to define CLI config at abstract.config.ts. You can generate a default one, using the command:

abstract init

This will generate an abstract.config.ts in your project root. You can configure accordingly.

import { defineConfig } from '@abstract-money/cli'
import { react, registry } from '@abstract-money/cli/plugins'
export default defineConfig({
  // Target directory for generated files.
  out: './src/generated',
  // List of plugins to use.
  plugins: [
    // Generate React hooks.
    // Pull contract schemas from the registry at
      contracts: [
          name: 'app-name', // Your App Name.
          namespace: 'abstract', // To claim a namespace on mainnet, please get in touch with Abstract Team.
          version: '0.1.0',


Once done, you're ready to generate the code:

abstract generate

You can use additional options as mentioned above. You should get an output like:

 abstract generate
 Validating plugins
 Resolving contracts
 Validating contracts
 Running plugins
 Writing to src/generated/index.ts

And you should be all set to use the types generated directly into your codebase.