Interactive CLI tool that runs several shell-backed processes at once (plus optional integrations) and merges stdout/stderr into a single colored terminal stream, so you can watch many log sources side by side.
- Go 1.26.1 or newer (see
go.mod) - For
/docker: Docker CLI installed and able to rundocker logs -f … - For
/supabase: Network access and a Supabase account with a suitable personal access token (see below)
go build -o logstreamer ../logstreamer
# or during development:
go run .On startup you are asked how many commands you want from the outset. Enter a non‑negative integer, then paste one shell command per line (each runs as sh -c '…'). Pipelines and redirects work like in your shell.
Example initial commands:
nginx -g 'daemon off;'alongsidetail -f /var/log/app.lognpm run devnext to another service
After startup you get a logstreamer> prompt. Control verbs:
| Command | Meaning |
|---|---|
/add |
Prompt for another command and attach its logs |
/docker |
Prompt for a container ID and stream docker logs -f … via the shell backend |
/supabase |
Prompt for project URL or ref and a personal access token; polls the Management API logs endpoint in the background |
/quit |
Shut down cleanly (signals children, drains streamer workers) |
Empty lines at the prompt are ignored. Sending EOF on stdin (e.g. Ctrl+D on some setups) behaves like quitting with a clean shutdown.
Press Ctrl+C or deliver SIGTERM to interrupt; the handler cancels integrations, stops subprocesses with SIGTERM, then exits.
/supabase uses the Supabase Management API (https://api.supabase.com). You need:
- Project ref — either paste the subdomain ref (e.g.
abcdefghijklmnop) or the full project URL (https://abcdefghijklmnop.supabase.co). - Personal access token — created under your Supabase Account → Access Tokens, with
analytics_logs_read(or equivalent scope that allows analytics log reads) for the project.
This is not the project’s anon or service-role API key used by client apps.
| Path | Role |
|---|---|
main.go |
Entry — app.Run(), exit code to OS |
app/ |
REPL, signal handling, wiring integrations |
streamer/ |
Process spawning (sh -c), stdout/stderr fan-in, locking, shutdown |
ui/ |
Line-oriented prompts (bufio.Scanner on stdin) |
integrations/docker/ |
Wraps docker logs -f as a streamed command |
integrations/supabase/ |
HTTPS polling + deduped print path into the streamer |
- 0 — normal quit (
/quit, EOF), or interrupt path (currently exits viaos.Exit(0)after shutdown) - 1 — input or setup errors printed to stderr during the initial questionnaire or stdin errors