| Crates.io | circuitpython-deploy |
| lib.rs | circuitpython-deploy |
| version | 0.1.2 |
| created_at | 2025-06-29 15:15:51.635291+00 |
| updated_at | 2025-06-29 15:46:41.650408+00 |
| description | Fast, reliable CircuitPython project deployment tool |
| homepage | https://github.com/shantanugoel/circuitpython-deploy |
| repository | https://github.com/shantanugoel/circuitpython-deploy |
| max_upload_size | |
| id | 1730821 |
| size | 142,035 |
A fast, reliable command-line tool for deploying CircuitPython projects from your development environment to CircuitPython boards.
.cpdignore files with gitignore-style patterns# List detected CircuitPython boards
cpd --list-boards
# Deploy current directory to auto-detected board
cpd
# Deploy with backup
cpd --backup ./backup
# Preview deployment (dry-run)
cpd --dry-run
# Deploy to specific board
cpd --board /media/CIRCUITPY
Download the latest release for your platform from the releases page.
# Install Rust if you haven't already
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build
git clone https://github.com/yourusername/circuitpython-deploy.git
cd circuitpython-deploy
cargo build --release
# The binary will be at target/release/cpd
cargo install circuitpython-deploy
Coming soon: Homebrew, Chocolatey, and AUR packages.
Deploy your current directory to an automatically detected CircuitPython board:
cpd
# List all detected CircuitPython boards
cpd --list-boards
# Deploy to a specific board
cpd --board E:\ # Windows
cpd --board /media/CIRCUITPY # Linux
cpd --board /Volumes/CIRCUITPY # macOS
# Create backup before deployment
cpd --backup ./my-backup
# Preview what would be deployed (safe)
cpd --dry-run
# Verbose output for debugging
cpd --verbose
# Force deployment without confirmation
cpd --yes
Create a .cpdignore file in your project root to exclude files:
# Ignore development files
*.test.py
test_*
docs/
.vscode/
__pycache__/
# Ignore backup directories
backups/*
*.bak
# Ignore temporary files
*.tmp
*.log
A typical CircuitPython project structure that works well with cpd:
my-circuitpython-project/
├── code.py # Main entry point
├── boot.py # Boot configuration
├── settings.toml # Configuration settings
├── lib/ # Libraries
│ ├── sensors.py
│ └── display_utils.py
├── assets/ # Images, sounds, etc.
│ └── icon.bmp
├── .cpdignore # Files to exclude
└── README.md # Project documentation
When multiple CircuitPython boards are connected:
# List boards and select interactively
cpd
# Or specify the board directly
cpd --board /dev/sdb1
# Quick deploy during development
cpd --dry-run && cpd --yes
# Deploy with backup for important updates
cpd --backup "./backups/$(date +%Y%m%d_%H%M%S)"
# Check what would be deployed
cpd --verbose --dry-run
No configuration file needed! cpd works out of the box with sensible defaults:
.git/, __pycache__/, node_modules/, etc..cpdignore and .gitignore patternsIf your CircuitPython board isn't detected:
--board <path> to specify manuallyPermission Denied
# Linux/macOS: You might need to be in the dialout group
sudo usermod -a -G dialout $USER
# Then log out and back in
No Files Deployed
# Check what files would be included
cpd --verbose --dry-run
# Common causes:
# - All files excluded by .cpdignore
# - Empty project directory
# - All files already up to date
Slow Performance
# For very large projects, consider:
# - Adding more patterns to .cpdignore
# - Using --yes to skip confirmation
# - Excluding documentation/test directories
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
git clone https://github.com/yourusername/circuitpython-deploy.git
cd circuitpython-deploy
# Run tests
cargo test
# Run integration tests
cargo test --test integration_test
# Build release
cargo build --release
# Validate GitHub workflows
./scripts/validate-workflows.sh
This project uses GitHub Actions for:
To trigger a release:
git tag v0.1.0
git push origin v0.1.0
cpd works with any CircuitPython-compatible board including:
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the CircuitPython community