[PR #611] [MERGED] stream command #539

Closed
opened 2026-02-25 20:34:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/asciinema/asciinema/pull/611
Author: @ku1ik
Created: 2/7/2024
Status: Merged
Merged: 2/7/2024
Merged by: @ku1ik

Base: developHead: stream


📝 Commits (5)

  • e742183 Initial version of stream command
  • aebd177 cargo fmt
  • 81f8ad6 Add --listen-addr / -l option to stream command, listen on 127.0.0.1:8080 by default
  • e5cc3fb Display full HTTP URL on streaming session start
  • 90dd08b Add comment about ALiS protocol

📊 Changes

13 files changed (+4053 additions, -25 deletions)

View changed files

📝 Cargo.lock (+501 -25)
📝 Cargo.toml (+7 -0)
assets/asciinema-player.css (+2835 -0)
assets/asciinema-player.min.js (+1 -0)
assets/index.html (+67 -0)
📝 src/cmd/mod.rs (+1 -0)
src/cmd/stream.rs (+93 -0)
📝 src/config.rs (+38 -0)
📝 src/main.rs (+5 -0)
src/streamer/alis.rs (+76 -0)
src/streamer/mod.rs (+221 -0)
src/streamer/server.rs (+104 -0)
src/streamer/session.rs (+104 -0)

📄 Description

This adds asciinema stream command, which allows viewing a live stream of a terminal session in a browser.

Start the stream with:

$ asciinema stream
::: Streaming session started, web server listening on http://127.0.0.1:8080
::: Press <ctrl+d> or type 'exit' to end
$
exit
::: Streaming session ended

View the stream at http://127.0.0.1:8080


This a an improved version of the live terminal streaming initially implemented in https://github.com/asciinema/tst (which was a prototype of this functionality). This PR includes the "local server" mode. The "forward to remote asciinema server" mode (available in tst) will be implemented in a future PR.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/asciinema/asciinema/pull/611 **Author:** [@ku1ik](https://github.com/ku1ik) **Created:** 2/7/2024 **Status:** ✅ Merged **Merged:** 2/7/2024 **Merged by:** [@ku1ik](https://github.com/ku1ik) **Base:** `develop` ← **Head:** `stream` --- ### 📝 Commits (5) - [`e742183`](https://github.com/asciinema/asciinema/commit/e742183159e8ffa3a8907a83b83e9650308dd20c) Initial version of `stream` command - [`aebd177`](https://github.com/asciinema/asciinema/commit/aebd177cd2cb76182fd6810287484f1b9164e254) cargo fmt - [`81f8ad6`](https://github.com/asciinema/asciinema/commit/81f8ad61b6d214dd4f082583c12e1348ff57cc62) Add `--listen-addr` / `-l` option to `stream` command, listen on 127.0.0.1:8080 by default - [`e5cc3fb`](https://github.com/asciinema/asciinema/commit/e5cc3fb1cd7d60a18b018f92b5666259e46f692d) Display full HTTP URL on streaming session start - [`90dd08b`](https://github.com/asciinema/asciinema/commit/90dd08b28caf2625e76f228597568765c189e23c) Add comment about ALiS protocol ### 📊 Changes **13 files changed** (+4053 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+501 -25) 📝 `Cargo.toml` (+7 -0) ➕ `assets/asciinema-player.css` (+2835 -0) ➕ `assets/asciinema-player.min.js` (+1 -0) ➕ `assets/index.html` (+67 -0) 📝 `src/cmd/mod.rs` (+1 -0) ➕ `src/cmd/stream.rs` (+93 -0) 📝 `src/config.rs` (+38 -0) 📝 `src/main.rs` (+5 -0) ➕ `src/streamer/alis.rs` (+76 -0) ➕ `src/streamer/mod.rs` (+221 -0) ➕ `src/streamer/server.rs` (+104 -0) ➕ `src/streamer/session.rs` (+104 -0) </details> ### 📄 Description This adds `asciinema stream` command, which allows viewing a live stream of a terminal session in a browser. Start the stream with: ``` $ asciinema stream ::: Streaming session started, web server listening on http://127.0.0.1:8080 ::: Press <ctrl+d> or type 'exit' to end $ exit ::: Streaming session ended ``` View the stream at http://127.0.0.1:8080 --- This a an improved version of the live terminal streaming initially implemented in https://github.com/asciinema/tst (which was a prototype of this functionality). This PR includes the "local server" mode. The "forward to remote asciinema server" mode (available in tst) will be implemented in a future PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 20:34:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#539
No description provided.