console - nesbox/TIC-80 GitHub Wiki

| Command | Description | Usage |
|---|---|---|
new |
Creates a new cartridge from the demo of the selected language. | new <lua | moon | yue | fennel | js | scheme | squirrel | python | wren | ruby | janet | miniscript | gravity | forth | wasm> |
load |
Load cartridge from the local filesystem (there's no need to type the .tic extension). You can also load just the data (sprites, map etc) from another cart. | load <cart> [ code | tiles | sprites | map | sfx | music | palette | flags | screen ] |
save |
Save cartridge to the local filesystem, use any language extension (.lua .py .rb .js .moon .yue .fnl .nut .wren .janet .scm .ms .fth .gravity .wasmp) to save it in text/project format to use an external editor [PRO version]. Use .png to save it in a png cartridge.
|
save <cart> |
edit |
Switches to the code editor. | edit |
run |
Run current project. | run |
resume |
Resume last loaded project. Accepts reload argument in 1.2 or later. | resume [reload] |
import |
Import code/images from an external file. See Importing Images. Use load to import code/sprites/music/… from another cart. |
import [ binary | tiles | sprites | map | code | screen] <file> [bank=0 x=0 y=0 w=0 h=0 vbank=0 bpp=0] |
eval / =
|
Run code. See Evaluating Code. |
eval / =
|
export |
Export currently loaded cart to HTML or as a native build, export sprites or cover as image, or export sfx and music to wav files (0.80), export help in a markdown file. <outfile> argument is the output file name. Use alone=1 to export the game without the editors [PRO version]. |
export [ win | linux | linuxarm | mac | macintel | html | binary | tiles | sprites | map | mapimg | sfx | music | screen | help] <outfile> [bank=0 vbank=0 id=0 alone=0] |
| Command | Description | Usage |
|---|---|---|
dir / ls
|
Show list of local files. |
dir / ls
|
mkdir |
Make directory. | mkdir <name> |
cd |
Change directory. | cd <path> |
del / rm
|
Delete from the filesystem. | del <file> |
folder |
Open working directory in OS (Windows, Linux, Mac OS). | folder |
add |
Show file open dialog to add file to TIC [browser version]. | add |
get |
Show file save dialog to download file [browser version]. Save the cart first if you don't find the file. | get <file> |
| Command | Description | Usage |
|---|---|---|
surf |
Open the carts browser. Local carts, tic80.com cartridges, and the signed-in player's Shelf and Likes folders are listed here. | surf |
login |
Sign in to tic80.com. Native builds start a pairing: desktop and Android print a link with the code embedded, browserless builds print the link and a separate code; the browser IDE opens the site's sign-in. See Shelf. | login |
logout |
Native builds only: sign out and remove the stored account token. The browser IDE signs out on the site. | logout |
| Command | Description | Usage |
|---|---|---|
help |
Show current version, welcome message, specs, 96K RAM layout, 16K VRAM layout, list of available commands, API commands, fill patterns, keys, buttons and their codes, startup options, hotkeys, terms, license. | help [<text> | version | welcome | spec | ram | vram | commands | api | fill | keys | buttons | startup | hotkeys | terms | license] |
config |
Show config file editor when used without parameter, use reset param to reset current configuration, use default to edit default cart template. | config [reset | default] |
menu |
Show the game menu where a running cart's MENU items appear. The studio's own menu is the menu bar. | menu |
cls / clear
|
Clear screen. |
cls / clear
|
exit / quit
|
Exit the application. |
exit / quit
|
demo |
Install the bundled demo carts into the current directory. | demo |
For those operating systems that support it, tab completion and command history is available in the console.
Example of eval usage.
To log the results use trace.
Note that you need to run a cart first to launch the virtual machine; otherwise the console answers that no cart is running.
> eval trace("Hello World")
Hello World
> eval t=8
> eval trace(t%3)
2
Put your file to import in the TIC-80/ folder and not the folder where your exe file is. Find the TIC-80 folder by typing folder in the console.
While importing images, colors are merged to the closest color of the palette.
For example, with default palette, this image:

becomes:

Note that if the palette is all black (like default bank1) the imported image will be all black.
Use bpp=1, bpp=2 or bpp=4 to import a sprite sheet at a lower bit depth.