|
| 1 | +# create-onchain-agent |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +`create-onchain-agent` is a CLI tool powered by [AgentKit](https://github.com/coinbase/agentkit) that allows developers to quickly scaffold an **onchain agent** project. This tool simplifies the setup process by generating a project with predefined configurations, including blockchain network selection, wallet providers, and framework setup. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +Before using `create-onchain-agent`, ensure you have the following installed: |
| 10 | + |
| 11 | +- **Node.js** (v18 or later) – [Download here](https://nodejs.org/) |
| 12 | +- **npm** (v9 or later) – Comes bundled with Node.js |
| 13 | + |
| 14 | +## Usage |
| 15 | + |
| 16 | +To use `create-onchain-agent`, simply run: |
| 17 | + |
| 18 | +```sh |
| 19 | +npm create onchain-agent@latest |
| 20 | +``` |
| 21 | + |
| 22 | +This command will guide you through setting up an onchain agent project by prompting for necessary configuration options. |
| 23 | + |
| 24 | +## Features |
| 25 | + |
| 26 | +- **Guided setup**: Interactive prompts help configure the project. |
| 27 | +- **Supports multiple blockchain networks**. |
| 28 | +- **Select your preferred wallet provider**. |
| 29 | +- **Preconfigured with Next.js, React, Tailwind CSS, and ESLint**. |
| 30 | +- **Automates environment setup**. |
| 31 | + |
| 32 | +### **Setup Process** |
| 33 | +The CLI will prompt you for the following details: |
| 34 | + |
| 35 | +1. **Project Name**: The name of your new onchain agent project. |
| 36 | +2. **Package Name**: The npm package name (auto-formatted if needed). |
| 37 | +3. **Network**: Choose from available blockchain networks. |
| 38 | +4. **Chain ID**: Specify if using a custom network. |
| 39 | +5. **Wallet Provider**: Select a preferred method for wallet management. |
| 40 | + |
| 41 | +After answering the prompts, the CLI will: |
| 42 | + |
| 43 | +- Generate the project structure. |
| 44 | +- Copy necessary template files. |
| 45 | +- Configure the selected settings. |
| 46 | +- Display next steps to get started. |
| 47 | + |
| 48 | +## Getting Started |
| 49 | + |
| 50 | +Once your project is created, navigate into the directory and install dependencies: |
| 51 | + |
| 52 | +```sh |
| 53 | +cd my-project |
| 54 | +npm install |
| 55 | +``` |
| 56 | + |
| 57 | +Then, configure your environment variables: |
| 58 | + |
| 59 | +```sh |
| 60 | +mv .env.local .env |
| 61 | +``` |
| 62 | + |
| 63 | +Run the development server: |
| 64 | + |
| 65 | +```sh |
| 66 | +npm run dev |
| 67 | +``` |
| 68 | + |
| 69 | +## Documentation & Support |
| 70 | + |
| 71 | +- **Docs:** [https://docs.cdp.coinbase.com/agentkit/docs/welcome](https://docs.cdp.coinbase.com/agentkit/docs/welcome) |
| 72 | +- **GitHub Repo:** [http://github.com/coinbase/agentkit](http://github.com/coinbase/agentkit) |
| 73 | +- **Community & Support:** [https://discord.gg/CDP](https://discord.gg/CDP) |
0 commit comments