Back to .md Directory

Cursor Development Environment

Documents a Docker-based dev container setup with test commands and OpenClaw agent configuration for the ClawDrive project.

May 2, 2026
0 downloads
4 views
ai agent rag cursor
View source

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

DockerPythonpytestblackmypyHardhat

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

PathDescription
/workspaceProject code (mounted from local)
/root/.openclawOpenClaw config (mounted from local, avoids reinstall)
/workspace/testsTest code
/workspace/scriptsInstall scripts
/workspace/agentAI 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 / boundaries
  • IDENTITY.md — Name and emoji
  • MEMORY.md — Long-term memory
  • skills/ — 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-dev with your own image name
  • Replace clawdrive in -t clawdrive-dev with your project name
  • Replace ~/.openclaw with 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