Skip to content

astralarium/live

Repository files navigation

live

Live stream command line output.

Enable agents to inspect logs via familiar interfaces like cat and tail. Explore logs from long-running or long-dead processes.

Large logs auto-rotate. Old sessions are cleaned opportunistically. No long running daemons. All state is stored in ~/.live.

Requires Python 3.10+. Zero dependencies.

Install

pipx install live-cmd
# or
uv tool install live-cmd

Install shell completions:

live update-shell

Install agent skill:

npx skills add astralarium/live

Print agent guide:

live llms.txt

Usage

Record command:

live run -n server npm start   # foreground
live run -dn server npm start  # run detached; print session UUID

Inspect sessions:

live ps              # active sessions
live ps -ag          # all sessions
live less server     # interactive paging
live tail -f server  # follow logs

Select by name (newest match) or UUID prefix. Commands are scoped to the current directory (and descendants); pass -C PATH to scope another directory, or -g for global scope.

Stop and clean up:

live stop server
live rm server
live rm --exited --older-than 1d

Agents

Resumable streaming for agents using POSIX semantics:

live cat -v server

Verbose output (-v) returns stream metadata on stderr.

live: id=925f… next-line=42 next-byte=250 last-time=1800…

Continue reading from next line:

live tail -vn +42 server

Config

~/.live/config.json, auto-created.

Option Default Description
ttlDays 7 Time before old sessions are cleaned up. Negative value to disable.
maxKb 512 Per-session output cap, in KB. Older segments are dropped.
segmentKb 64 Segment file size, in KB, before rotation.
heartbeatSec 30 Seconds between writer heartbeats; 3× this marks a session hung.

References

Links

About

Live stream command line output. Inspect long processes from agent workflows. Zero dependencies.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages