It's entirely possible to use PICO-8 as an interactive shell, but you probably want to tap into the game loop. In order to do that, you must create at least one of these callback functions:
_update()
_update60() (after v0.1.8)
_draw()
A minimal "game" might simply draw something on...