CMAPI console commands
Commands are case-insensitive. Arguments containing spaces can be quoted, but give_item also joins an unquoted multi-word item name. Type commands for the categorized live catalog, commands <search> to filter it, or help <command> for aliases, category, provider, description, and usage.
Catalog search checks command names, aliases, categories, descriptions, usage text, and provider names. Each canonical command appears once even when it has aliases.
Information and diagnostics
| Command | Details |
|---|---|
commands [search] |
Shows or filters every built-in and mod command, grouped by category. |
help [command] |
Opens the catalog, or explains one command or alias in detail. |
version |
Shows the CMAPI runtime, independently versioned Mod Menu, and IPC console protocol versions. |
health_check |
Summarizes build compatibility, APIs, session, mods, commands, backups, gameplay authority, HUD notices, updates, and an explicit result. |
gameinfo |
Shows the product/version, CMAPI build classification, Assembly-CSharp MVID, and any missing required player hooks. |
config |
Shows active CMAPI settings and the exact config.json path. It never changes settings. |
players |
Lists connected players with session client ID, local/host roles, position, oxygen, water, health, and toxicity. Values are live snapshots. |
Useful discovery examples:
commands gameplay
commands backup
commands tokens
commands SourceNine
help give_tokens
Mods and updates
| Command | Details |
|---|---|
mods |
Lists every mod that completed loading successfully. |
modinfo <UniqueID> |
Shows one mod's author, version, minimum CMAPI version, stable ID, description, folder, update state, and registered commands. |
updates |
Shows the latest cached or completed update result for each loaded mod. Checks never block startup. |
updates check |
Starts a fresh asynchronous check instead of waiting for the cache interval. Run updates again to see results. |
Steam and save safety
| Command | Details |
|---|---|
steam |
Prints the exact "<GameRoot>\CMAPI.exe" %command% value to paste into Steam Launch Options. |
backups |
Lists the ten newest CMAPI save snapshots and the backup folder. |
backup |
Lists backups and reminds the user how to create one. |
backup create |
Requests a normal game save, waits for its OnSaved event, then makes a manual ZIP snapshot in the background. It is unavailable before a world loads or while saving is locked. |
Offline backup maintenance is also available while the game is closed:
.\CMAPI.exe --list-backups
.\CMAPI.exe --restore-backup "<listed filename.zip>"See STEAM-AND-BACKUPS.md before restoring.
Read-only content and local inventory
| Command | Details |
|---|---|
inventory [backpack|equipment] [search] |
Shows local slot usage and item counts aggregated by stable group ID. Backpack is the default. |
recipes [search] |
Searches output IDs/names, ingredient IDs/names, and native crafting-station IDs. |
recipe <output ID or name> |
Shows one recipe's output kind, crafting stations, and collapsed ingredient quantities. |
unlocks [available|locked|blueprint] [search] |
Lists live state and requirements for loaded content. |
unlock_info <content ID or name> |
Shows one entry's progression, blueprint, global-save, and planet rules. |
These commands never craft, unlock, equip, travel, or mutate inventories. Exact stable IDs are preferred; localized names are accepted only when one exact entry matches. Catalog lists stop after 100 entries and ask for a narrower search. Live unlock state and inventories require a loaded local world.
inventory backpack uranium
inventory equipment
recipes super alloy
recipe Super Alloy
unlocks available
unlocks blueprint chip
unlock_info SomeGroupId
See CONTENT-AND-LIFECYCLE-API.md for the matching mod APIs, event ordering, and snapshot semantics.
Item and Terra Token tools
These commands change the current world and are enabled only for the host by default. They are intended for mod testing, recovery from a mod problem, and players who deliberately want console tools. CMAPI logs successful grants.
items [search]
Lists stable item IDs and localized display names. At most 25 results are shown, so add part of an ID or name to narrow a large list.
items uranium
items super alloy
give_item <item ID or name> [amount]
Adds the chosen inventory item to the local host's backpack through Planet Crafter's network-aware inventory handler. Amount defaults to 1 and accepts 1–100. CMAPI resolves an exact ID first, then an exact localized name, then a partial match. Multiple partial matches are listed instead of guessing.
CMAPI checks the entire requested amount against free backpack slots first. If there is not enough room, nothing is added.
give_item Iron
give_item Iron 10
give_item Super Alloy 5
Quotes remain supported by the general command parser, but give_item joins a multi-word item name automatically.
give_money <amount> (give_tokens alias)
Adds 1–1,000,000 shared Terra Tokens through the game's server RPC. Terra Tokens belong to the world rather than one player's private wallet. CMAPI checks integer overflow before sending the grant. give_tokens resolves to the same canonical command and does not create a duplicate catalog entry.
give_money 1000
give_tokens 250
The relevant configuration defaults are:
{
"EnableCheatCommands": true,
"RequireHostForCheatCommands": true,
"ShowGameplayNotifications": true,
"ModMenuToggleKey": "Insert"
}Disabling RequireHostForCheatCommands removes CMAPI's guard and is not recommended for multiplayer sessions.
Native HUD message
notify <message>
Shows a local four-second message through Planet Crafter's native information HUD. The message may contain spaces without quotes and is limited to 300 characters. It does not send a multiplayer chat message or notify remote clients.
notify CMAPI notifications are working
Same-planet teleporting
teleport <x> <y> <z> and teleport back
Moves the local player through Planet Crafter's network-aware placement path and is host-only by default. Coordinates must be finite numbers from -1,000,000 to 1,000,000. CMAPI preserves the player's facing, resets fall-damage tracking, refreshes physics and environment detection, and records the origin for teleport back in the same player session on the same planet.
teleport 414.61 8.3 585.28
teleport back
This command never changes planets and never moves a vehicle. Exit vehicles first. Coordinates are intentionally exact: CMAPI does not move the destination onto terrain or promise that it is safe. Use a disposable save while testing unknown coordinates and use teleport back immediately if needed.
Reversible trainer controls
Trainer commands are registered only when EnableCheatCommands is true. They always require the local world host, regardless of the more permissive console authority setting, and are designed to restore captured runtime state.
| Command | Details |
|---|---|
god_mode [on|off|toggle|status] |
Locks oxygen, water, and health, clears toxicity, and suppresses fall damage. Alias: god. |
refill_vitals |
Refills the three survival gauges and clears toxicity once. Alias: heal. |
infinite_oxygen [on|off|toggle|status] |
Controls the oxygen lock. |
infinite_water [on|off|toggle|status] |
Controls the water/thirst lock. |
infinite_health [on|off|toggle|status] |
Controls the health/food lock. |
no_toxicity [on|off|toggle|status] |
Continuously clears local toxicity. |
no_fall_damage [on|off|toggle|status] |
Temporarily disables and later restores the local fall-damage component. |
fly_mode [on|off|toggle|status] |
Controls Planet Crafter's native flight flag. Alias: fly. |
move_speed <0.5-5|reset|status> |
Multiplies captured walk and run speeds. Alias: speed. |
infinite_power [on|off|toggle|status] |
Temporarily keeps machine energy requesters powered without editing generators/consumers. Alias: power. |
Omitting an on/off toggle argument prints status; toggle flips it. Survival locks use the game's network-aware gauge methods at a bounded rate and do not send a request while already full. Planet Crafter 2.008 has no independent stamina gauge: health is the food/survival gauge.
Infinite Power depends on isolated hooks in the tested game build. It reports unavailable and stays off when those hooks cannot be found. Disabling it asks the game's energy manager to recalculate the real grid. cmapi_uninject, host loss, player loss, and shutdown disable all trainer state too.
Environment and weather
| Command | Details |
|---|---|
weather_events [search] |
Lists natural current-planet definitions with stable ID, readable name, meteor type, duration, rain, wetness, and stage bounds. Alias: weather_list. |
weather_status |
Shows synchronized active event, type, completion, and remaining time. Alias: weather. |
weather_start <event ID or name> |
Starts one native synchronized event as host. A unique partial match is accepted; ambiguous matches are listed. |
world_state [unit] |
Shows terraformation totals/net rates and current/next stage. Alias: world. |
environment |
Shows current planet, day/night value, local underwater state, and weather. Alias: env. |
day_reset |
Resets the synchronized host cycle to full day. |
planets |
Lists installed/purchased planets, current/start flags, natural-weather counts, and purification use. |
weather_start refuses to replace active weather because Planet Crafter's cleanup branch runs only after the current event ends. It also enforces the event's terraformation-stage bounds. day_reset and weather_start appear only when cheat commands are enabled and are always host-only at the public API level. CMAPI does not expose forced weather stopping or forced planet travel.
See ENVIRONMENT-API.md for the native game paths, structured statuses, and mod-development examples.
Optional in-game interface
| Command | Details |
|---|---|
cmapi_menu |
Shows CMAPI Mod Menu's separate module version and injection state. |
cmapi_inject |
Creates and safely shows CMAPI Mod Menu 0.2.2 for this process. Alias: inject_menu. |
cmapi_uninject |
Destroys only the optional overlay. Alias: uninject_menu. |
Commands are case-insensitive, so CMAPI_Inject and CMAPI_Uninject work. The 0.2.2 menu runs real Player, Inventory, Item Catalog, World, Teleport, Mods, and Console actions through these same commands. Its configurable keyboard default is Insert; hold L3+R3 to hide/show with a controller. View+Menu is deliberately unused because Steam can reserve it for the overlay. While visible, CMAPI captures Planet Crafter's enabled action maps so game controls cannot fire behind the menu. Controller users select actions with the D-pad and activate them with A. See MOD-MENU.md for lifecycle, restoration, UI, and controls.
Mod-provided catalog metadata
The original registration overloads remain supported and place commands in the Mods category. CMAPI 0.8.0 added ConsoleCommandOptions for an explicit category and aliases:
helper.ConsoleCommands.Add(
"weather_report",
"Shows the current weather state.",
new ConsoleCommandOptions(
"weather_report [planet]",
"Weather",
"weather"
),
OnWeatherReport
);Names and aliases are global and case-insensitive. They use lower-case letters, numbers, underscores, or hyphens and must start with a lower-case letter. A collision reports the existing provider. If mod loading fails, CMAPI removes the command and all aliases together.