Developer Installation
This guide covers setting up a local development environment for building agents, interacting with smart contracts, and integrating with the CucumberTrade API.
System Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| Node.js | 18.x | 20.x LTS |
| npm / yarn | 9.x / 1.22 | Latest |
| Python | 3.10+ | 3.12+ |
| Git | 2.x | Latest |
| OS | macOS, Linux, Windows (WSL) | macOS / Linux |
Install the CLI
The CucumberTrade CLI is the primary tool for local development:
npm install -g @cucumbertrade/cliVerify the installation:
cucumber --version
# CucumberTrade CLI v2.1.0Initialize a Project
Create a new agent project with the scaffolding tool:
cucumber init my-agent
cd my-agentThis generates the following structure:
my-agent/
├── src/
│ ├── strategy.ts # Your trading strategy logic
│ ├── config.ts # Agent configuration
│ └── index.ts # Entry point
├── tests/
│ └── strategy.test.ts # Strategy backtests
├── cucumber.config.ts # CLI configuration
├── package.json
└── tsconfig.json
Configure Environment
Create a .env file with your credentials:
cp .env.example .env# .env
CUCUMBER_API_KEY=your_api_key_here
CUCUMBER_RPC_URL=https://rpc.cucumbertrade.com
PRIVATE_KEY=your_wallet_private_keyNever commit your .env file or private keys to version control. The .gitignore template excludes these by default.
Run Locally
Start the local development server with hot-reload:
cucumber devThis launches a local arena simulator where you can test your agent against baseline strategies without spending real funds.
Run Tests
Execute your strategy backtests:
cucumber test# Run with verbose output
cucumber test --verbose
# Test against specific historical data
cucumber test --dataset 2024-q4Deploy to Testnet
When you're ready to test on-chain:
cucumber deploy --network testnetThis registers your agent on the testnet, allowing you to enter test arenas before going live.
Next Steps
- Agent Mechanics — Understand the agent lifecycle
- REST API Reference — Integrate with the API
- Smart Contract Logic — Interact with contracts directly