Skip to main content
raccoon-cli

raccoon-cli

The dev toolchain for RaccoonOS — scaffold, configure, sync, and run Botball robots.

Build & Release Latest Release License: GPL v3 Python PyPI Platform

📖 Full documentation at raccoon-docs.pages.dev


raccoon is the command-line companion to RaccoonLib. It handles everything outside the robot code itself: creating projects, generating hardware boilerplate from a YAML config, syncing files to the Pi, and running your missions remotely.


Installation

pip install raccoon-cli

Quick Start

# 1. Create a project with the project helper script, then open it
cd MyRobot

# 2. Connect to your Pi
raccoon connect 192.168.4.1

# 3. Sync + run
raccoon run

That's it. raccoon run regenerates any stale code, syncs changed files to the Pi, and streams output back to your terminal.


How it works

raccoon uses a client-server architecture. Your laptop runs the CLI; the Pi runs a small FastAPI daemon (raccoon-server) that receives commands, manages execution, and streams logs back.

Pi setup (one time)

# On the Pi -- install raccoon-server as a systemd service
sudo raccoon-server install

After that, the server starts automatically on boot and raccoon connect can reach it.


Commands

Missions

Projects are git repos created with the project helper script; run raccoon from inside the project.

Command Description
raccoon missions create <Mxxx><name> Add a mission; the number is required, e.g. M030Wave (M000/M999 are reserved)
raccoon missions list List the project's missions
raccoon missions rename <name|Mxxx> <new-name> Rename a mission (file, class and references; the M-number is kept)
raccoon missions remove <name|Mxxx> [--keep-file] Remove a mission
raccoon missions reorder [order...] Reorder missions (interactive without arguments) and renumber them

Hardware & code generation

Command Description
raccoon codegen Regenerate src/hardware/defs.py and src/hardware/robot.py from config
raccoon calibrate ticks Measure encoder ticks per revolution
raccoon calibrate autotune Run motor autotune
raccoon calibrate servos Interactively calibrate servo offsets

Remote development

Command Description
raccoon connect <address> Connect to a Pi server
raccoon disconnect Disconnect from the current Pi
raccoon status Show connection status
raccoon sync Sync changed files to the Pi (uses content hashing)
raccoon sync --force Re-upload all files
raccoon run Regenerate code, sync, and run on the Pi

Debugging

Command Description
raccoon lcm spy Live-inspect LCM messages on the bus
raccoon lcm record <file> Record LCM traffic to a file
raccoon checkpoint list List saved checkpoints
raccoon checkpoint restore <id> Restore project to a checkpoint

Tooling

Command Description
raccoon update Update raccoon-cli to the latest version
raccoon completion Install shell tab-completion
raccoon web Launch the web IDE

Project structure

A new project contains:

MyRobot/
├── raccoon.project.yml    # Hardware config -- motors, sensors, drivetrain, connection
├── src/
│   ├── main.py
│   ├── hardware/
│   │   ├── defs.py        # Generated -- do not edit by hand
│   │   └── robot.py       # Generated -- do not edit by hand
│   ├── missions/
│   │   ├── setup_mission.py
│   │   └── shutdown_mission.py
│   └── steps/
└── .raccoonignore         # match patterns excluded from sync

defs.py and robot.py are regenerated by raccoon codegen (and automatically on every raccoon run). Edit raccoon.project.yml to change the hardware config - never edit the generated files directly.


Configuration

A project uses a split config layout. The root file just glues things together:

raccoon.project.yml

name: MyRobot
uuid: <auto-generated>

robot:       !include 'config/robot.yml'
missions:    !include 'config/missions.yml'
definitions: !include 'config/hardware.yml'
connection:  !include 'config/connection.yml'

config/hardware.yml -- sensors, motors, servos

button:
  type: DigitalSensor
  port: 10
imu:
  type: IMU
front_left_ir_sensor:
  type: IRSensor
  port: 1
front_right_ir_sensor:
  type: IRSensor
  port: 2

_motors: !include-merge 'motors.yml'
_servos: !include-merge 'servos.yml'

config/motors.yml

left_motor:
  type: Motor
  port: 0
  inverted: false
  calibration:
    ticks_to_rad: 0.00002   # set by raccoon calibrate
    vel_lpf_alpha: 1.0
    # Optional: omit pid to use STM32 firmware defaults
    # pid: {kp: 1.22, ki: 0.045, kd: 0.0}
right_motor:
  type: Motor
  port: 1
  inverted: true
  calibration:
    ticks_to_rad: 0.00002
    vel_lpf_alpha: 1.0

config/connection.yml

pi_address: 192.168.4.1
pi_port: 8421
pi_user: pi
auto_connect: true

~/.raccoon/config.yml (global)

known_pis:
  - hostname: raccoon-pi
    address: 192.168.4.1
default_pi_user: pi

Part of RaccoonOS

Repository What it is
raccoon-lib Core robotics library
raccoon-example Reference robot -- start here if you're new
raccoon-transport LCM messaging layer
documentation Full platform docs

Contributing

See CONTRIBUTING.md for how to get started contributing

License

Copyright (C) 2026 Tobias Madlberger
Licensed under the GNU General Public License v3.0 -- see COPYING for details.

Metadata

Release files for raccoon-cli 177

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for raccoon-cli 177
File Interpreter ABI Platform Actions
raccoon_cli-177-py3-none-any.whl Python 3 none any Details for raccoon_cli-177-py3-none-any.whl

Release files / raccoon_cli-177-py3-none-any.whl

Download URL raccoon_cli-177-py3-none-any.whl
Size 2.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e469c5fefd55f09ad8c95d22498a4cc11b8e3a18215fbd63dfc553f1074646af
BLAKE2b-256 checksum
How to use checksums
367b007f0a207e1f4d5b654ce1969bafc4ea8a2827ac79cfa362e7a66e76a4c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for raccoon-cli 177

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for raccoon_cli-177-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

177 This release

1 release file Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page