{"id":42410152,"url":"https://github.com/whatl3y/txr","last_synced_at":"2026-01-28T01:44:36.302Z","repository":{"id":26327713,"uuid":"108045148","full_name":"whatl3y/txr","owner":"whatl3y","description":"Send files super easily to other computers/servers using WebSockets.","archived":false,"fork":false,"pushed_at":"2023-01-07T02:17:16.000Z","size":1909,"stargazers_count":21,"open_issues_count":25,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-27T11:59:07.762Z","etag":null,"topics":["directories","files","transfer-data","transfer-files","websocket"],"latest_commit_sha":null,"homepage":"https://txr.euphoritech.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whatl3y.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-23T22:01:45.000Z","updated_at":"2024-02-22T16:46:34.000Z","dependencies_parsed_at":"2023-01-14T04:25:35.561Z","dependency_job_id":null,"html_url":"https://github.com/whatl3y/txr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/whatl3y/txr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whatl3y%2Ftxr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whatl3y%2Ftxr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whatl3y%2Ftxr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whatl3y%2Ftxr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whatl3y","download_url":"https://codeload.github.com/whatl3y/txr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whatl3y%2Ftxr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28832570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["directories","files","transfer-data","transfer-files","websocket"],"created_at":"2026-01-28T01:44:33.082Z","updated_at":"2026-01-28T01:44:36.294Z","avatar_url":"https://github.com/whatl3y.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-txr (transfer)\n\nSend files from one computer/server to another easier than you ever have before. As long as both have an internet connection, you can send files to each other.\n\n## Example\n\n### Computer 1\n\n```sh\n$ txr listen computer1\n# Successfully registered name: computer1. You are now listening for files.\n# Starting to receive file with data: {\"filename\":\"file.json\",\"filesizebytes\":2048}\n# .........\n# Finished receiving file with data: {\"filename\":\"file.json\",\"filesizebytes\":2048}\n# Target file path: /Users/username/file_1593026398451.json\n```\n\n### Computer 2\n\n```sh\n$ txr send computer1 -f ./a/config/file.json\n# .........\n# All bytes have been read from file: ./a/config/file.json.\n# Your file has successfully sent to computer1!\n```\n\n## Install\n\n```bash\n# for CLI use\n$ npm install -g txr\n\n# for library use\n$ npm install txr\n```\n\n## What is this, and why?\n\nThis package hopefully makes it stupid easy to send files to other computers without needing to setup scp, sftp, or any other protocol that requires some sysadmin and networking skills to setup. This package includes both a client and server component. The server listens for connections from clients and handles sending files to and from each other. Clients can listen for files, send files, and even chat with others all with a single identifier (what we call a \"username\").\n\nWe have a default server listening for connections on Heroku at `https://txr.euphoritech.com`, which is what any new client will connect to by default. Files are **never** stored anywhere on the server since it's basically just serving as a middleman between clients, but feel free to audit the code to confirm. I also encourage you to [setup your own server](#server) to use offline or in your own secure network if you're passing sensitive data to others and/or have more stringent security requirements.\n\n![Easily setup a server and 2 clients!](https://user-images.githubusercontent.com/13718950/32149608-89e29732-bcdd-11e7-96cf-ee9fbb1aeca8.gif)\n\n## node-txr's goal\n\nEase-of-use and simplicity, period. I'm aware there are already industry standard and well audited tools built for security (sftp, scp, etc.) to accomplish the same end goal this package serves, but all require a level of sysadmin and networking skills to setup and get running. If I setup a small EC2 machine and want to send a directory of 100 images to it that is on my computer for example, or want to send a coworker and small config file quickly and easily, this package hopefully removes the hoops you would usually have to jump through to get them there.\n\n## Quick Start (cli)\n\n### Setup listening client\n\n```bash\n$ # Connect to the default server (https://txr.euphoritech.com) to listen for files sent to your username\n$ txr listen -u myname123\nSuccessfully registered name: myname123. You are now listening for files.\n```\n\n### Send a file to your listening client\n\n```bash\n$ # Connect to the default server (https://txr.euphoritech.com) to send the specified file to your listening client\n$ txr send -u myname123 -f /path/to/file/to/send\n........\nAll bytes have been read from file: /path/to/file/to/send.\nYour file has successfully sent to myname123!\n```\n\n## How does txr work?\n\n**Server**: the server listens for clients to connect and manages registering\n\"listener\" clients based on a provided username.\n\n**Client**: There are three types of clients:\n\n1. **listener**, who registers a desired username with the server and waits\n   for anyone who wants to send files to him/her.\n2. **sender**, who can send files or directories from his/her local machine\n   to a listener based on the listener's username they registered with.\n3. **chat** user, who will register a username with the txr server and\n   designate another listening/chatting user who they would like to send chat messages to.\n\n## Server\n\nAs of today, there is a Heroku hobby dyno that has a server waiting for\nclient connections (https://txr.euphoritech.com). If you install this\npackage you can start a listening client with that server without doing\nanything else other than running the client \"listener\" command below.\nIf you want to run a txr-server separately than the Heroku dyno,\nfollow instructions below and be sure the point the TXR_HOST environment\nvariable (or -h/--host parameter) of your clients to the appropriate endpoint.\n\n### Config\n\nThe following are environment variables you can configure to\ncustomize your server:\n\n1. LOGGING_LEVEL: The [bunyan](https://github.com/trentm/node-bunyan) logging level. DEFAULT: 'info'\n2. PORT: The port your server will listen on. DEFAULT: 8000\n3. REDIS_URL: Only applicable if you are using the 'redis' type parameter below, but will\n   determine the server/db combo with which connected client data will be stored.\n   DEFAULT: redis://localhost:6379\n\n### Parameters\n\n1. Optional: -t/--type: If present, will determine where information about the connected\n   clients will live. DEFAULT: 'memory' - memory: Connected client information will be stored in memory in a Javascript object - redis: Connected client information will be stored in a redis database, where the\n   connection string for the redis server should be in process.env.REDIS_URL (default: 'redis://localhost:6379')\n2. Optional: -p/--port: If present, this will override the PORT config\n   that determines what port for the server to listen on.\n\n### Start server\n\n```bash\n$ txr-server\n$ txr-server -p 3000\n```\n\n## Clients\n\n### Config\n\nThe following are environment variables you can configure to\ncustomize your clients:\n\n1. TXR_HOST: The full URL (including protocol and port) of the txr-server\n   you are connecting to. DEFAULT: https://txr.euphoritech.com\n2. TXR_PATH: For \"listener\" clients, this is the path to a directory\n   where files you receive will be delivered to.\n   DEFAULT: process.env.HOME - unix/linux, process.env.USERPROFILE - windows\n\n### Client types\n\n#### \"listener\": listen for files to be sent to you\n\n##### Parameters:\n\n1. Required: -u/--user: The username you want to register with the server as.\n2. Optional: -a/--auth: If present, you will need to authorize any files\n   attempted to be sent to you before they'll be sent.\n3. Optional: -h/--host: If present, this will override the TXR_HOST config\n   that points to the server you'll connect to.\n\n```bash\n$ txr listen yourUniqueUsername\n$ txr listen -u yourUniqueUsername\n$ txr listen -u yourUniqueUsername -a\n$ txr listen -u yourUniqueUsername -h http://localhost:8000\n$ txr listen -u yourUniqueUsername -h ws://localhost:8000\n```\n\n#### \"sender\": send a file to someone listening for files to be sent to them\n\n##### Parameters\n\n1. Required: -f/--file or -d/--dir: The full path of the file or directory you're sending to a \"listener\"\n2. Required: -u/--user: The \"listener\" client's username you're sending a file to.\n3. Optional: -h/--host: If present, this will override the TXR_HOST config\n   that points to the server you'll connect to.\n\n```bash\n$ txr send yourFriendsUniqueUsername -f /local/path/to/file/or/dir\n$ txr send -u yourFriendsUniqueUsername -f /local/path/to/file/or/dir\n$ txr send -u yourFriendsUniqueUsername -d /local/path/to/file/or/dir\n$ txr send -u yourFriendsUniqueUsername -f /local/path/to/file/or/dir -h http://localhost:8000\n$ txr send -u yourFriendsUniqueUsername -f /local/path/to/file/or/dir -h ws://localhost:8000\n```\n\n#### \"chat\": send chat messages to someone listening with a particular username. The target user can be a \"listening\" or \"chatting\" client.\n\nNote: As of today a chat client can only be created if the listener and chatter\nare using the CLI interface.\n\n##### Parameters\n\n1. Required: -u/--user: Your username you're registering as.\n2. Required: -t/--target_user: The username of the user listening for files that you're going to chat with\n3. Optional: -h/--host: If present, this will override the TXR_HOST config\n   that points to the server you'll connect to.\n\n```bash\n$ txr chat -u myUsername -t myFriendsUsername\n```\n\n## Development\n\n### Build /dist files\n\n```bash\n$ npm run build\n```\n\n## TODO\n\n- Dockerfile for server\n- Extend Test Coverage\n- Improve documentation\n- Additional interfaces?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhatl3y%2Ftxr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhatl3y%2Ftxr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhatl3y%2Ftxr/lists"}