Skip to content
/ nex Public

Nex terminal recording and sharing program, Using this users can share their terminal across the internet or record while running commands saved in .nex file.

Notifications You must be signed in to change notification settings

aryansrao/nex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nex - terminal recorder & sharing

This project contains a Rust CLI nex that records terminal sessions into .nex files.

Commands:

  • nex start — start recording the current shell session
  • nex stop — stop recording and finalize the .nex file
  • nex inspect <file.nex> — view metadata
  • nex play <file.nex> — replay recorded session (TBD)
  • nex csv <file.nex> --out <file.csv> — export to CSV
  • nex json <file.nex> --out <file.json> — export to JSON
  • nex serve <port> [--verbose] — host a collaborative session
  • nex catch <host> <port> --out <file.nex> — join a collaborative session and save
  • nex serve <port> --web — host a collaborative session with web UI (TBD)

This scaffold implements a minimal MVP for start/stop using a PTY-based approach in Rust.

Build:

cargo build --release

Installing:

cargo install --path .

nex records interactive terminal sessions into a portable .nex archive. It can:

  • Record a local interactive shell to a .nex file (nex start / exit, nex stop).
  • Replay a .nex (nex play <file>).
  • Export recorded sessions to CSV or JSON (nex csv <file>, nex json <file>).
  • Serve a shared shell over TCP for collaborative sessions (nex serve <port>).
  • Join a shared session as a client and auto-save the session (nex catch <host> <port>).

This project is a small Rust prototype. It uses a PTY-backed shell and records raw terminal bytes plus command lifecycle markers (injected via zsh hooks) into a newline-delimited JSON stream inside the .nex archive.

Quickstart

Installing:

cargo install --path .

Record locally (default timestamped filename):

nex start

Replay:

nex play recording.nex

CSV / JSON export:

nex csv recording.nex --out out.csv
nex json recording.nex --out out.json

Collaborative session (host):

nex serve 3000           # silent by default
nex serve 3000 --verbose # show connect/exits

Collaborative session (client):

nex catch <host-ip> 3000 --out mysession.nex
nex serve 3000           # silent by default
nex serve 3000 --verbose # show connect/exits

Collaborative session (client):

nex catch <host-ip> 3000 --out mysession.nex

Collaborative session (web UI):

nex serve 3000 --web

Recording format

A .nex file is a ZIP archive containing:

  • manifest.json — metadata and duration
  • session.json — newline-delimited JSON events (raw terminal bytes and command start/end objects)

Raw event example:

{"t": 0.123, "data": "<base64>"}

Command event example:

{"type":"command","phase":"start","t": 1234567890.123,"cwd":"/home/user","cmd_b64":"..."}

About

Nex terminal recording and sharing program, Using this users can share their terminal across the internet or record while running commands saved in .nex file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published