Skip to main content

Run scratch projects in your terminal using turbowarp scaffolding

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

turbowarp_cli-1.1.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

turbowarp_cli-1.1.0-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file turbowarp_cli-1.1.0.tar.gz.

File metadata

  • Download URL: turbowarp_cli-1.1.0.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for turbowarp_cli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5c1e73b558a2bf7ba71cdbe19b3efe962bcb951ef14e62151138efe1178ff7ab
MD5 05ac6e7e39d604fa5ba0e053d202dc96
BLAKE2b-256 ec606a3f86126377c27bd93bee02061fb1e8b664be0b156ef0b850e17f684e13

See more details on using hashes here.

File details

Details for the file turbowarp_cli-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: turbowarp_cli-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for turbowarp_cli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 927bb4ee4563ca12401295e07d02fb0f2ab8c40b257120f3dbbc12058bfb998c
MD5 800c4a31d35bad9f9e9f84e76b4571c4
BLAKE2b-256 586647815fccec6d4ac020ed8e75dc0036717eb29915a9425a9c5ebc8e8ced7c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page