Cursor Development Environment
Documents a Docker-based dev container setup with test commands and OpenClaw agent configuration for the ClawDrive project.
What this file does
Documents a Docker-based dev container setup with test commands and OpenClaw agent configuration for the ClawDrive project.
When to use it
- Setting up a reproducible dev environment with Docker
- Running Python tests with pytest and coverage
- Configuring an AI agent workspace with OpenClaw
- Starting a local Hardhat testnet for Ethereum development
Assumes this stack
Cursor Development Environment
Start Dev Container
docker build -f Dockerfile.dev -t clawdrive-dev .
docker run -it --rm \
-v $(pwd):/workspace \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openclaw:/root/.openclaw \
-e OPENCLAW_CONFIG=/root/.openclaw \
clawdrive-dev
Directory Layout
| Path | Description |
|---|---|
/workspace | Project code (mounted from local) |
/root/.openclaw | OpenClaw config (mounted from local, avoids reinstall) |
/workspace/tests | Test code |
/workspace/scripts | Install scripts |
/workspace/agent | AI core code |
Common Commands
# Run all tests
pytest tests/ -v
# Test a specific module
pytest tests/test_heartbeat.py -v
# With coverage
pytest --cov=agent tests/
# Code formatting
black agent/ tests/
# Type checking
mypy agent/
# Linting
flake8 agent/
Local Testnet (optional)
# Hardhat local testnet
docker run -d --name hardhat -p 8545:8545 ethereumoptimism/hardhat:latest
# Connect from Python
# from web3 import Web3
# w3 = Web3(Web3.HTTPProvider("http://localhost:8545"))
OpenClaw Workspace
OpenClaw workspace defaults to ~/.openclaw/workspace/, key files:
AGENTS.md— Operating instructions (survival constitution)SOUL.md— Personality / tone / boundariesIDENTITY.md— Name and emojiMEMORY.md— Long-term memoryskills/— Custom skills
What's inside
1 Docker build/run command, 1 directory table, 6 CLI commands, 1 optional testnet section, 1 OpenClaw workspace overview
Change this for your project
- Replace
clawdrive-devwith your own image name - Replace
clawdrivein-t clawdrive-devwith your project name - Replace
~/.openclawwith your own config path - Replace
agent/with your own source directory
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Related Documents
dbt Core
Defines a complete dbt project setup with layered architecture, SQL style, Jinja best practices, and CI/CD workflow guidance.
HarmonyOS 主题与样式 - Cursor Rules
Defines HarmonyOS theming rules for dark/light mode, page brightness, and screen-on control with code examples.
Journey from Concept to Code: Transforming Cursor into a Devin-like AI Assistant
Documents the creation of aicode.cursorrules, a set of rules that turns Cursor/Windsurf into a Devin-like AI assistant with automated planning and self-evolution.