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.0.1.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.0.1-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: turbowarp_cli-1.0.1.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.0.1.tar.gz
Algorithm Hash digest
SHA256 08e973f006ff6bde53de95c88b18c663c196269e56f7cdbacaaeedb31cf4882e
MD5 bbcd71ec1196e089e9674e4fc1d41137
BLAKE2b-256 1988241a6068249a7e90da6fd5aa06d31441c38d3e968b40f7cd24f371d1d3b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: turbowarp_cli-1.0.1-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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 826745302c21938f99b8c07a9898337f949675d14a048c344e937f61035c6d62
MD5 fa1f1eebf38b7ea5545ba8c48c50c01c
BLAKE2b-256 566157990251859a4ba3b785e9c5fe8e67a996833ca4e403eccdf30d414fe13e

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