Skip to content

AccessNode CLI Setup

The AccessNode CLI tool helps you quickly set up and configure your self-hosted AccessNode instance. It guides you through project creation, chain selection, contract configuration, and more.

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (version 18 or higher)
  • pnpm (package manager)
  • Git (for cloning the repository)

Running the CLI

To scaffold a new AccessNode project, run the following command:

pnpm create accessnode  

This command will:

  1. Clone the latest AccessNode repository.
  2. Prompt you to enter a project name.
  3. Allow you to select supported chains.
  4. Ask for contract addresses.
  5. Generate the node.config.ts configuration file.
  6. Initialize Git and install dependencies.

Customizing the CLI Configuration

After running the CLI, you can modify the generated configuration by editing the node.config.ts file. This file contains settings for:

  • Supported networks (chains)
  • Contract addresses
  • Start block for each network
  • AccessTime contract network configurations

You can add or remove networks and modify the contract addresses according to your needs.

Next Steps

After configuring the node.config.ts file, you can start the AccessNode project with the following commands:

pnpm dev:light  # Start light mode  
pnpm dev:full   # Start full mode  

For additional setup instructions, refer to AccessNode or AccessNode Overview.