Stream terminal output to the browser devtools!
LLL is a command line program which allows you to view terminal output in a browser's devtools. Use the JSON inspector, filter, and more when viewing your terminal's output.
LLL has no dependencies.
npm i -g looshis-local-logger
Start an application from LLL:
lll "node ./examples/node-app/index.js"
OR start LLL in standalone mode:
lll
# LLL> Enter Commands
After LLL has started, open your browser and navigate to http://localhost:3333, open devtools and click on the console tab.
CTRL+C to exit.
# Start lll in standalone mode and enter a curl command
lll
curl -s https://swapi.dev/api/planets/1 \
-H "Accept: application/json"
# Run npm script:
lll "npm --prefix ./examples/node-app run start"
# Open browser at http://localhost:3333, open devtools.
# Specify a port:
LLL_PORT=1234 lll "npm --prefix ./examples/node-app run start"
# Open browser at: http://localhost:1234/, open devtools.
# Start a ruby app:
lll "ruby ./examples/ruby-app/ruby.rb"
# Open browser at http://localhost:3333, open devtools.
# Pass env vars to the child process:
MY_VAR=3 lll "node ./examples/node-app/index"
# MY_VAR will be available in node-app.index.js
LLL is a lightweight node application that essentially captures stdout and serves it down to an html client. LLL works slightly different depending on whether you pass it args ( spawn ) or not ( standalone ).
When given a command, LLL will spawn the given command in a subprocess. The subprocess stdout/stderr events are then sent to a browser-based client via server-sent events.
If no command is given, the server listens for stdin, runs that command, and sends its sdtout/stderr to the client via server-sent events.