Stardew Valley looks gentle from a distance, but anyone who has tried to juggle crops, livestock, fishing, mining, and the social calendars of 30+ Pelican Town residents knows the to-do list never really ends. When the backlog gets ridiculous, or you just want to test a build without grinding for forty in-game days, console commands are the shortcut. With a single line you can spawn items, adjust money, freeze time, or send every NPC running to their next scene.
This guide covers how to open the console and the most useful, reasonably safe commands available through SMAPI.

The vanilla game has no command line and no admin interface. To get one you need SMAPI, the unofficial mod loader that also doubles as a launcher with a live terminal attached.
After installing it, head to wherever your Stardew Valley copy lives on disk (Steam, GOG, or your platform of choice) and launch the executable called StardewModdingAPI instead of the normal shortcut. A console window will open alongside the game.
From there you play the game as usual, with the SMAPI window staying open on the side. Every command runs in real time, so a typo on something like `world_clear` can wipe a map instantly with no undo. Back up your save folder before testing anything destructive, especially the commands that permanently raise stats.
If the SMAPI installation gives you grief, the short walkthrough below covers the full setup on a regular client:

The list below skips the riskier debug commands that can crash the game or corrupt saves. Most of what remains still qualifies as cheating, since these commands hand over progress that would otherwise take many in-game days. Use them when you want to experiment, recover from a glitched save, or simply ignore the farming sim part of the farming sim.
- list_items: prints every item whose name contains the keyword you pass in.
- Syntax: `list_items <item name>`
- Example: `list_items Iridium`
- player_add name: adds an item to your inventory by name.
- Syntax: `player_add "<item name>" <quantity> <quality>`
- Example: `player_add name "Stir Fry" 10 4`
- Quality values: 0 = Normal, 1 = Silver, 2 = Gold, 4 = Iridium.
- player_add: same idea, but targets the item ID instead of the name.
- Syntax: `player_add <item ID> <quantity> <quality>`
- Example: `player_add (O)128 10 4` spawns 10 Pufferfish at Iridium quality.
- player_setmoney: overrides your gold balance with whatever number you provide.
- Syntax: `player_setmoney <amount>`
- Example: `player_setmoney 100000`
- player_changecolor: recolors hair, eyes, or pants using RGB values.
- Syntax: `player_changecolor <feature> <R,G,B>`
- Example: `player_changecolor eyes 255,0,0`
- player_changestyle: swaps a cosmetic option such as hair, shirt, skin, shoes, accessory, swimsuit, or gender.
- Syntax: `player_changestyle <target> <style ID>`
- Example: `player_changestyle hair 1`
- player_sethealth: sets your current HP to the chosen value.
- Syntax: `player_sethealth <amount>`
- Example: `player_sethealth 200`
- player_setimmunity: sets your total immunity stat. This change is permanent. If you boost it while wearing immunity gear, unequip the gear first and run `player_setimmunity 0` before changing it again.
- Syntax: `player_setimmunity <amount>`
- Example: `player_setimmunity 10`
- player_setmaxhealth: raises your HP ceiling. Permanent.
- Syntax: `player_setmaxhealth <amount>`
- Example: `player_setmaxhealth 500`
- player_setmaxstamina: same idea applied to stamina. Permanent.
- Syntax: `player_setmaxstamina <amount>`
- Example: `player_setmaxstamina 300`
- player_setname: renames your character or your farm.
- Syntax: `player_setname <target> <name>`
- Examples: `player_setname player John` or `player_setname farm "Vintage"`
- player_setstamina: tops off current stamina without changing the cap.
- Syntax: `player_setstamina <amount>`
- Example: `player_setstamina 200`
- hurry_all: warps every NPC straight to their next scheduled position.
- Syntax: `hurry_all`
- set_farm_type list: prints all farm layouts and their numeric IDs so you can use them with `set_farm_type`.
- set_farm_type: swaps your farm layout. As of Update 1.6 the IDs are 0 Standard, 1 Riverlands, 2 Forest, 3 Hilltop, 4 Combat, 5 Four Corners, 6 Beach, 7 Meadowlands.
- Syntax: `set_farm_type <value>`
- Example: `set_farm_type 1`
- world_clear: removes entities of a given type from the selected location.
- Syntax: `world_clear <location> <entity type>`
- Example: `world_clear current grass`
- world_downminelevel: drops you one floor deeper into the Mines. If you are not in the Mines, it teleports you to floor 1 instead.
- Syntax: `world_downminelevel`
- world_freezetime: pauses or resumes the in-game clock.
- Syntax: `world_freezetime <0 or 1>` (1 freezes time, 0 resumes it)
- world_setday: jumps to a specific day inside the current season.
- Syntax: `world_setday <day>`
- Example: `world_setday 15`
- world_setminelevel: teleports you to a specific floor in the Mines, Skull Cavern, or Quarry Mine. You need to already be inside the dungeon you want to use.
- Syntax: `world_setminelevel <mine level>`
- Example: `world_setminelevel 80`
- world_setseason: switches the season directly.
- Syntax: `world_setseason <season>`
- Example: `world_setseason spring`
- world_settime: sets the current in-game time using the 26-hour clock.
- Syntax: `world_settime <time>`
- Example: `world_settime 1530`
- world_setyear: jumps the calendar forward to the year you specify.
- Syntax: `world_setyear <year number>`
- Example: `world_setyear 2`
- harmony_summary: lists Harmony patches injected by SMAPI and any installed mods.
- Syntax: `harmony_summary <search string>`
- Example: `harmony_summary MeleeWeapon`
- help: prints documentation for a specific command. Handy when you forget the exact parameters `world_clear` takes.
- Syntax: `help <command name>`
- Example: `help hurry_all`
- log_context: enables verbose context logging (button presses, menu changes, and so on).
- Syntax: `log_context`
- reload_i18n: reloads translation files for all installed mods.
- Syntax: `reload_i18n`
- set_verbose: toggles SMAPI's detailed log output. Drop the mod ID at the end to apply it to every loaded mod.
- Syntax: `set_verbose <true|false|1|0> <mod ID>`
- Example: `set_verbose 1 SMAPI Pathoschild.ContentPatcher`
- show_data_files: opens the folder containing your save and log files.
- Syntax: `show_data_files`
- show_game_files: opens the game's install folder.
- Syntax: `show_game_files`
Most of these commands cannot be undone mid-save. SMAPI applies stat changes the instant you press Enter, which means closing the game without saving will not roll them back. If you care about the file at all, copy your save folder somewhere safe first. After that, the valley is yours: build a million-gold farm, max out stamina, or teleport directly into Skull Cavern level 200 and find out how badly that ends.