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

Uploaded Python 3

File details

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

File metadata

  • Download URL: turbowarp_cli-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 979aa21829f97be413a21e7ab2be138573a0cdc2b5ea8a4471d0617374e51c8c
MD5 7995640295a3bca70c996c43d3d6a120
BLAKE2b-256 66a7c59964a67ad5eaceacf84c24a761ed26b7b17597ebc2c12a28efa403cc5d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: turbowarp_cli-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6be2f7e0ae862d7b53cbafea00ee632ab073cf7ed3b2cc9466459498c14b0828
MD5 bf66ba52d8d792867c3bbc2b999a30a0
BLAKE2b-256 f469303dbdf8c6ca89bb4382a7de3018e5779a89f5c829e4cffef8fa7d1801e2

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