If you are running a complex list of commands (like spawning a specific fleet composition), you can write them in a notepad, copy them, and paste them directly into the console using standard Ctrl+V commands.
Typing out addweapon heavyautocannon 10 every time can get tedious. Here are pro-tips to streamline the process: starsector console commands