Skip to content

Commit e379457

Browse files
authored
Merge pull request #62 from phlowdotdev/payload-fixs
Payload fixs
2 parents ee54bc1 + 5fa3bdd commit e379457

2 files changed

Lines changed: 34 additions & 24 deletions

File tree

scripts/install-phlow.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ set -e
44

55
REPO="phlowdotdev/phlow"
66
BIN_NAME="phlow"
7+
INSPECT_BIN_NAME="phlow-cli-inspect"
78
INSTALL_DIR="$HOME/.phlow"
89
BIN_PATH="$INSTALL_DIR/phlow"
10+
INSPECT_BIN_PATH="$INSTALL_DIR/phlow-cli-inspect"
911
ADD_PATH_CMD='export PATH="$HOME/.phlow:$PATH"'
1012

1113
echo "🔍 Detecting platform..."
@@ -16,13 +18,16 @@ ARCH=$(uname -m)
1618
# Identificando o asset correto
1719
if [[ "$OS" == "Darwin" ]]; then
1820
ASSET_NAME="${BIN_NAME}-macos"
21+
INSPECT_ASSET_NAME="${INSPECT_BIN_NAME}-macos"
1922
elif [[ "$OS" == "Linux" ]]; then
2023
case "$ARCH" in
2124
x86_64)
2225
ASSET_NAME="${BIN_NAME}-amd64"
26+
INSPECT_ASSET_NAME="${INSPECT_BIN_NAME}-amd64"
2327
;;
2428
aarch64 | arm64)
2529
ASSET_NAME="${BIN_NAME}-arm64"
30+
INSPECT_ASSET_NAME="${INSPECT_BIN_NAME}-arm64"
2631
;;
2732
*)
2833
echo "❌ Unsupported Linux architecture: $ARCH"
@@ -41,13 +46,18 @@ LATEST=$(curl -s https://api.github.com/repos/$REPO/releases/latest | grep tag_n
4146
echo "📦 Latest version is $LATEST"
4247

4348
URL="https://github.com/$REPO/releases/download/$LATEST/$ASSET_NAME"
49+
INSPECT_URL="https://github.com/$REPO/releases/download/$LATEST/$INSPECT_ASSET_NAME"
4450

4551
echo "🚚 Downloading $BIN_NAME from $URL..."
4652
mkdir -p "$INSTALL_DIR"
4753
curl -L "$URL" -o "$BIN_PATH"
4854

55+
echo "🚚 Downloading $INSPECT_BIN_NAME from $INSPECT_URL..."
56+
curl -L "$INSPECT_URL" -o "$INSPECT_BIN_PATH"
57+
4958
echo "⚙️ Making binary executable..."
5059
chmod +x "$BIN_PATH"
60+
chmod +x "$INSPECT_BIN_PATH"
5161

5262
echo "🔧 Updating shell configuration files..."
5363
for shell_rc in "$HOME/.bashrc" "$HOME/.zshrc"; do

site/docs/advanced/debug.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,56 @@ sidebar_position: 2
33
title: Debug
44
---
55

6-
# Debug do Phlow
6+
# Phlow Debugging
77

8-
O modo debug pausa a execucao antes de cada step e permite inspecionar o contexto (main/payload), o step atual e o historico de execucao via um servidor TCP e o TUI inspector.
8+
Debug mode pauses execution before each step and lets you inspect the context (main/payload), the current step, and the execution history through a TCP server and the TUI inspector.
99

10-
## Ativando o debug
10+
## Enabling debug
1111

12-
O debug eh habilitado por variavel de ambiente. Use `PHLOW_DEBUG=true`:
12+
Debug is enabled via an environment variable. Use `PHLOW_DEBUG=true`:
1313

1414
```bash
15-
PHLOW_DEBUG=true cargo run -p phlow-runtime -- ./examples/qualquer.phlow
15+
PHLOW_DEBUG=true phlow ./examples/any.phlow
1616
```
1717

18-
Por padrao o servidor debug escuta em `0.0.0.0:31400`. Para mudar a porta, use `PHLOW_DEBUG_PORT`:
18+
By default the debug server listens on `0.0.0.0:31400`. To change the port, use `PHLOW_DEBUG_PORT`:
1919

2020
```bash
21-
PHLOW_DEBUG=true PHLOW_DEBUG_PORT=31400 cargo run -p phlow-runtime -- ./examples/qualquer.phlow
21+
PHLOW_DEBUG=true PHLOW_DEBUG_PORT=31400 phlow ./examples/any.phlow
2222
```
2323

24-
## Inspecao com o phlow-tui-inspect
24+
## Inspecting with phlow-tui-inspect
2525

26-
Em outro terminal, conecte o inspector na mesma porta:
26+
In another terminal, connect the inspector to the same port:
2727

2828
```bash
29-
PHLOW_DEBUG_PORT=31400 cargo run -p phlow-tui-inspect
29+
PHLOW_DEBUG_PORT=31400 phlow-cli-inspect
3030
```
3131

32-
O inspector se conecta em `127.0.0.1`, entao para depurar remotamente use tunel/port-forward.
32+
The inspector connects to `127.0.0.1`, so use a tunnel/port-forward if you need remote debugging.
3333

34-
## Comandos principais
34+
## Main commands
3535

36-
Voce pode digitar os comandos diretamente na barra do inspector:
36+
You can type commands directly in the inspector bar:
3737

38-
- `STEP` - mostra o step aguardando execucao
39-
- `SHOW` - mostra o script compilado
40-
- `NEXT` - libera um step
41-
- `RELEASE` - libera o pipeline atual
42-
- `ALL` - mostra historico de steps
43-
- `PAUSE` - pausa qualquer liberacao em andamento
38+
- `STEP` - shows the step waiting for execution
39+
- `SHOW` - shows the compiled script
40+
- `NEXT` - releases one step
41+
- `RELEASE` - releases the current pipeline
42+
- `ALL` - shows step history
43+
- `PAUSE` - pauses any ongoing release
4444

45-
Atalhos do inspector (equivalentes aos comandos acima):
45+
Inspector shortcuts (equivalent to the commands above):
4646

4747
- `/n` (Ctrl+n) - NEXT + STEP
4848
- `/a` (Ctrl+a) - NEXT + ALL
4949
- `/r` (Ctrl+r) - RELEASE + ALL
5050
- `/w` (Ctrl+w) - SHOW
5151
- `/g` (Ctrl+g) - STEP
5252

53-
Use `/m` para abrir o resumo de comandos e `ESC` para fechar.
53+
Use `/m` to open the command summary and `ESC` to close it.
5454

55-
## Observacoes e seguranca
55+
## Notes and safety
5656

57-
- Quando o debug esta ativo, a execucao pausa a cada step ate receber `NEXT` ou `RELEASE`.
58-
- O servidor debug eh uma porta TCP simples. Use apenas em ambiente confiavel e evite expor para a internet.
57+
- When debug is active, execution pauses at each step until it receives `NEXT` or `RELEASE`.
58+
- The debug server is a simple TCP port. Use it only in trusted environments and avoid exposing it to the internet.

0 commit comments

Comments
 (0)