{"id":22104229,"url":"https://github.com/thecheese42/realtime-stream","last_synced_at":"2026-05-08T04:43:47.439Z","repository":{"id":254587460,"uuid":"846974127","full_name":"TheCheese42/realtime-stream","owner":"TheCheese42","description":"An application to share terminal output streams.","archived":false,"fork":false,"pushed_at":"2024-09-02T17:13:09.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T08:43:05.497Z","etag":null,"topics":["rest-api","sharing","stream","terminal"],"latest_commit_sha":null,"homepage":"http://rtstream.freeddns.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheCheese42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-24T13:42:47.000Z","updated_at":"2024-09-02T17:14:23.000Z","dependencies_parsed_at":"2024-12-01T06:32:13.297Z","dependency_job_id":"aa2becad-4f25-4ede-9a08-6b1c5966353d","html_url":"https://github.com/TheCheese42/realtime-stream","commit_stats":null,"previous_names":["thecheese42/realtime-stream"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCheese42%2Frealtime-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCheese42%2Frealtime-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCheese42%2Frealtime-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCheese42%2Frealtime-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheCheese42","download_url":"https://codeload.github.com/TheCheese42/realtime-stream/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245199479,"owners_count":20576553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rest-api","sharing","stream","terminal"],"created_at":"2024-12-01T06:29:43.622Z","updated_at":"2026-05-08T04:43:47.410Z","avatar_url":"https://github.com/TheCheese42.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Realtime Stream\n\nAn application to share terminal output streams.\n\n## Hosting\n\nFirst, clone and install the requirements.\n\n```sh\ngit clone https://github.com/TheCheese42/realtime-stream\ncd realtime-stream\npython -m venv .venv\nsource .venv/bin/activate  # Linux and MacOS\n.venv/Scripts/activate.ps1  # Windows\npip install -r requirements.txt\n```\n\n\\\nThen, add a .env file to the root directory. The content should be as follows:\n\n```toml\nFLASK_APP = \"rtstream/app.py\"\n\n# The following are required when using MySQL\nMYSQL_HOST = \"\u003cMYSQL_DB_URL_HERE\u003e\"\nMYSQL_PORT = \"3306\"  # This is the standard MySQL port\nMYSQL_USERNAME = \"\u003cMYSQL_USERNAME_HERE\u003e\"\nMYSQL_PASSWORD = \"\u003cMYSQL_PASSWORD_HERE\u003e\"\nMYSQL_DATABASE = \"\u003cMYSQL_DATABASE_NAME_HERE\u003e\"\n\n# The following are required when using SQLite. Do NOT add them otherwise!\nRTS_USE_SQLITE = \"1\"\nRTS_SQLITE_PATH = \"rtstream.db\"\n\n# Optional keys:\n# RTS_NO_SETUP_SQLITE = \"1\"  # If a newly created SQLite DB should not be set up automatically. Usually better to leave this away.\n```\n\n## Usage\n\nThis tool is intended to be used with a terminal binary like cURL or the `rts` script to redirect terminal output to the webserver, making it accessible for everyone with the link. Streams can be seen using the `/g` endpoint or in the webview, using the `/v` endpoint (also usable through the index page).\n\n### Databases\n\nThe application can either connect to a MySQL or an SQLite database. Both can be initialized using the `setup_db.py` script:\n\n```sh\npython setup_db.py\n```\n\nThe script reads everything it needs from the `.env` file, including wether it should use MySQL or SQLite.\n\n### The `rts` script\n\nThe `rts` script can be found at the `/script` path of the webserver. It handles sending the cURL requests to the hostname it was downloaded from. It is a **bash** script, it does **not** work on regular Windows shells.\n\nThis install instruction can also be found on the index page, with the correct url.\n\n```sh\ncurl \"http://doma.in/script\" \u003e ~/.local/bin/rts \u0026\u0026 chmod +x ~/.local/bin/rts\n```\n\nIt can be used like this:\n\n```sh\nneofetch | rts\n```\n\nThis prints the UUID of the newly created stream to the stdout. It also prints the piped output. To append to an existing stream, pass that as an argument to `rts`.\n\n```sh\nneofetch | rts ABC123\n```\n\n### The webview\n\nInstead of fetching stream output from the terminal, it can also be viewed from the browser. The webview at `/v/\u003cuuid\u003e` will refresh automatically. It can also be accessed by entering the UUID into the dedicated input field at the top of the index page.\n\n### Endpoints\n\nThe application has the following REST API endpoints:\n\n#### Create a new output stream\n\nEndpoint: `/c`\nHTTP Method: `POST`\nSuccessful response content: The UUID of the newly created output stream.\n\nExamples (cURL):\n`curl -X POST http://doma.in/c`\n`curl -X POST -d \"Initial Data\" http://doma.in/c`\n\n#### Append to an output stream\n\nEndpoint: `/a/\u003cuuid\u003e`\nHTTP Method: `PATCH`\n\nExample (cURL):\n`curl -X PATCH -d \"Some new output for the stream\" http://doma.in/a/ABC123`\n\n#### Delete an output stream\n\nEndpoint: `/d/\u003cuuid\u003e`\nHTTP Method: `DELETE`\n\nExample (cURL):\n`curl -X DELETE http://doma.in/d/ABC123`\n\n#### Fetch a stream's full output\n\nEndpoint: `/g/\u003cuuid\u003e`\nSuccessful response content: The full output as plain text.\nHTTP Method: `GET`\n\nExample (cURL):\n`curl http://doma.in/g/ABC123`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecheese42%2Frealtime-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecheese42%2Frealtime-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecheese42%2Frealtime-stream/lists"}