Skip to content

Commit 376aa8d

Browse files
committed
docs: tw cli
1 parent 8bb1583 commit 376aa8d

File tree

4 files changed

+48
-1
lines changed

4 files changed

+48
-1
lines changed

docs/tw-cli/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# [TW-CLI](https://github.com/inflated-goboscript/tw-cli)
2+
3+
> Run scratch projects in the terminal
4+
5+
- Uses playwright and turbowarp scaffolding
6+
- Supports the turbowarp debugger's log, warn, error and breakpoint blocks.
7+
- Supports exit codes with the `TW-CLI: exit code` variable **for all sprites**.

docs/tw-cli/installation.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Installation
2+
3+
`pip install turbowarp-cli`
4+
5+
??? "Bleeding edge"
6+
7+
Install from source:
8+
9+
1. `git clone https://github.com/inflated-goboscript/tw-cli`
10+
2. `cd tw-cli`
11+
3. `pip install -e .`
12+
4. to update, use `git pull`

docs/tw-cli/usage.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Usage
2+
3+
`twcli run` <Project path\>
4+
5+
It only works on project files.
6+
7+
---
8+
9+
If you want to automatically supply inputs to `ask and wait` blocks, use the -i command:
10+
11+
`twcli run .\Project.sb3 -i "hi" "there`
12+
13+
This provides the arguments:
14+
- `hi`
15+
- `there`
16+
17+
If you want to disable headless mode (to see the browser), use `-H`:
18+
19+
`twcli run .\Project.sb3 -i "hi" "there" -H`
20+
21+
If you want to raise an error if the exit code is not `'0'`, use `-R`:
22+
23+
`twcli run .\Project.sb3 -i "hi" "there" -R`

mkdocs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,9 @@ nav:
130130
- Usage:
131131
- Getting Started: inflator/usage/getting started.md
132132
- Installing Packages: inflator/usage/installing packages.md
133-
- Other commands: inflator/other commands.md
133+
- Other commands: inflator/other commands.md
134+
- TW-CLI:
135+
- TW-CLI: tw-cli/index.md
136+
- Installation: tw-cli/installation.md
137+
- Usage: tw-cli/usage.md
138+

0 commit comments

Comments
 (0)