Archived
1
0
Fork
You've already forked tw-cli
0
CLI for running scratch projects using playwright and turbowarp scaffolding. https://inflated-goboscript.github.io/tw-cli/
This repository has been archived on 2026年04月16日. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • JavaScript 99.7%
  • Python 0.2%
  • HTML 0.1%
Find a file
2025年09月30日 22:06:01 +01:00
.github/workflows fix: actually install deps 2025年09月07日 15:41:43 +01:00
tests tests: fix tests 2025年09月08日 20:22:01 +01:00
twcli chore: version 2025年09月30日 22:06:01 +01:00
MANIFEST.in fix: syntax issue 2025年09月07日 14:33:47 +01:00
Project.sb3 feat: INCOMPATIBLE CHANGES, input args is list, not str 2025年09月08日 19:55:36 +01:00
README.md docs: about new exit code system 2025年09月08日 20:07:34 +01:00
requirements.txt feat: colored logs 2025年09月07日 10:14:58 +01:00
setup.py pypi: config 2025年09月08日 21:07:38 +01:00

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 open before 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:

  • hi
  • there

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'

  1. Use the error block. This will print in red but not exit the program
  2. Use the breakpoint block

This is ^^ intentional design to keep things simpler.