- JavaScript 99.7%
- Python 0.2%
- HTML 0.1%
| .github/workflows | fix: actually install deps | |
| tests | tests: fix tests | |
| twcli | chore: version | |
| MANIFEST.in | fix: syntax issue | |
| Project.sb3 | feat: INCOMPATIBLE CHANGES, input args is list, not str | |
| README.md | docs: about new exit code system | |
| requirements.txt | feat: colored logs | |
| setup.py | pypi: config | |
tw-cli
Run scratch projects in the terminal
Warning
These install instructions may not be enough if you are running a linux distro not directly supported by playright, e.g. arch. Make sure you can open chromium with playright with
playwright openbefore trying to use tw-cli
- Uses playwright and turbowarp scaffolding
- Supports the turbowarp debugger's log, warn, error and breakpoint blocks.
Installation
pip install turbowarp-cli
Bleeding edge:
1. git clone this repo 2. `pip install -e .` 3. to update, use `git pull`Usage
twcli run <Project path>
It only works on project files.
If you want to automatically supply inputs to ask and wait blocks, use the -i command:
twcli run .\Project.sb3 -i "hi" "there
This provides the arguments:
hithere
If you want to disable headless mode (to see the browser), use -H:
twcli run .\Project.sb3 -i "hi" "there" -H
If the exit code is 1, a Runtime error will always be raised. The only way to exit with code 1 is with a breakpoint block. Otherwise, the program will exit with code 0 when it naturally stops.
If you want to use your own 'error codes'
- Use the error block. This will print in red but not exit the program
- Use the breakpoint block
This is ^^ intentional design to keep things simpler.