Skip to main content
The cambc CLI is your main tool for local development, testing, and interacting with the platform. Install it with pip install cambc.

Project setup

cambc starter

Scaffold a new Cambridge Battlecode project. Run this first after installing.
Creates the following project structure:
The starter bot demonstrates core gameplay: the core spawns builder bots, builders explore by laying roads, and when they find ore they build harvesters on it.

cambc.toml

The config file created by cambc starter. All fields have defaults and all CLI options override config values.
Bot paths in cambc run are resolved by first checking the raw path, then checking inside bots_dir. So cambc run starter opponent resolves to bots/starter and bots/opponent.

Local development

cambc run

Run a local match between two bots. No time limits are enforced locally.
Arguments: Options:
After the match completes, cambc run prints a summary showing the winner, win condition, turn count, and a resource breakdown (titanium, axionite, units, and buildings) for each team.

cambc watch

View a replay in the browser-based visualiser.
Local replay: Serves the visualiser on localhost and opens your browser. Press Ctrl+C to stop the server.
Platform match: Opens the platform visualiser in your browser for a specific match.

cambc map-editor

Open the map editor to create custom .map26 files.

Platform commands

These commands interact with the online platform at game.battlecode.cam. Most require authentication via cambc login.

cambc login

Authenticate with the platform. Opens a browser window for OAuth login and stores your session locally.
The session persists across CLI invocations until it expires or you run cambc logout.

cambc logout

Clear stored credentials.

cambc submit

Upload a bot to compete on the ladder.
The path can be a directory containing main.py, a single .py file, or a .zip. Directories are auto-zipped before upload. See submission requirements for constraints.

cambc status

Show your current team, rating, rank, and member list.
Displays your username, team name, category, Elo rating, matches played, and team members with roles.

cambc match

The cambc match group provides all match-related commands. When called with just a match ID, it defaults to showing match details.

cambc match info

View details of a specific match including per-game results.
Shows match status, teams, score, rating delta, timestamps, and a table of individual games with map, winner, win condition, and turns played.

cambc match list

View recent match history.

cambc match unrated

Challenge another team to an unrated match.
Unrated matches run on the same AWS infrastructure as ladder matches with full time limit enforcement but do not affect ratings. They are prioritised over ladder matches for faster results.
Rate limits apply: max 10 test/unrated matches per 10 minutes.

cambc match test

Upload two local bots and run a remote match with full time limit enforcement on AWS Graviton3 hardware.
Both bots are packaged and uploaded to the server. Unlike cambc run, this enforces the 2ms CPU time limit per round — use this to check your bot’s performance before submitting. You can optionally specify .map26 files — one per game.

cambc match replay

Download replay files for a completed match.

cambc match watch

Open a match replay in the browser.

cambc match tests

View your team’s remote test run history.

cambc team

Search for teams or view team details.