By far the best way to enable all sorts of cheats in your Stardew Valley game is using two specific mods: the CJB Cheats Menu, and the CJB Item Spawner. To install them both, you'll first need to download and install another mod (don't panic) called SMAPI.