{"id":27240754,"url":"https://github.com/fixpoint/deno-replutil","last_synced_at":"2026-05-07T18:14:06.066Z","repository":{"id":43270736,"uuid":"467036483","full_name":"fixpoint/deno-replutil","owner":"fixpoint","description":"🧰  REPL utilities","archived":false,"fork":false,"pushed_at":"2024-04-26T00:05:54.000Z","size":12,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-11T09:48:00.308Z","etag":null,"topics":["deno","node","repl","utilities"],"latest_commit_sha":null,"homepage":"https://deno.land/x/replutil","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fixpoint.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}},"created_at":"2022-03-07T09:58:08.000Z","updated_at":"2022-03-07T12:21:04.000Z","dependencies_parsed_at":"2023-12-22T02:45:42.021Z","dependency_job_id":"99627010-d7a2-40b4-a0fb-bc0bccf2dc16","html_url":"https://github.com/fixpoint/deno-replutil","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"403fedc4dc51f861b8f090a99a405f4ac3e99bf6"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/fixpoint/deno-replutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixpoint%2Fdeno-replutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixpoint%2Fdeno-replutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixpoint%2Fdeno-replutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixpoint%2Fdeno-replutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fixpoint","download_url":"https://codeload.github.com/fixpoint/deno-replutil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixpoint%2Fdeno-replutil/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259869259,"owners_count":22924298,"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":["deno","node","repl","utilities"],"created_at":"2025-04-10T19:55:45.601Z","updated_at":"2026-05-07T18:14:01.046Z","avatar_url":"https://github.com/fixpoint.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# replutil\n\n[![npm](http://img.shields.io/badge/available%20on-npm-lightgrey.svg?logo=npm\u0026logoColor=white)](https://www.npmjs.com/package/replutil)\n[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno)](https://deno.land/x/replutil)\n[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/replutil/mod.ts)\n[![Test](https://github.com/fixpoint/deno-replutil/workflows/Test/badge.svg)](https://github.com/fixpoint/deno-replutil/actions?query=workflow%3ATest)\n[![npm version](https://badge.fury.io/js/replutil.svg)](https://badge.fury.io/js/replutil)\n\nREPL (Read-eval-print loop) utilities.\n\n## Usage\n\nUse `Sender` to send message to REPL and `Receiver` to receive message from\nREPL.\n\n##### SSH\n\n```typescript\nimport { Receiver, Sender } from \"./mod.ts\";\n\nconst proc = Deno.run({\n  cmd: [\"ssh\", \"-tt\", \"localhost\", \"/bin/sh\"],\n  stdin: \"piped\",\n  stdout: \"piped\",\n});\nconst receiver = new Receiver(proc.stdout, {\n  pattern: /.*\\$ $/,\n});\nconst sender = new Sender(proc.stdin);\nawait receiver.recv();\nawait sender.send(\"ls -al\\n\");\nconst received = await receiver.recv();\nawait sender.send(\"exit\\n\");\nawait proc.status();\nproc.close();\n\nconsole.log(\"-\".repeat(80));\nconsole.log(received);\nconsole.log(\"-\".repeat(80));\n```\n\n##### Telnet\n\n```typescript\nimport { Receiver, Sender } from \"./mod.ts\";\n\nconst username = \"johntitor\";\nconst password = \"steinsgate\";\n\nconst proc = Deno.run({\n  cmd: [\"telnet\", \"localhost\"],\n  stdin: \"piped\",\n  stdout: \"piped\",\n});\nconst receiver = new Receiver(proc.stdout, {\n  pattern: /.* % /,\n});\nconst sender = new Sender(proc.stdin);\n\nawait receiver.recv(/login: $/);\nawait sender.send(`${username}\\n`);\n\nawait receiver.recv(/Password:$/);\nawait sender.send(`${password}\\n`);\n\nawait receiver.recv();\nawait sender.send(\"ls -al\\n\");\nconst received = await receiver.recv();\nawait sender.send(\"exit\\n\");\nawait proc.status();\nproc.close();\n\nconsole.log(\"-\".repeat(80));\nconsole.log(received);\nconsole.log(\"-\".repeat(80));\n```\n\n## Development\n\nLint code like:\n\n```text\nmake lint\n```\n\nFormat code like\n\n```text\nmake fmt\n```\n\nCheck types like\n\n```text\nmake type-check\n```\n\nRun tests like:\n\n```text\nmake test\n```\n\n## License\n\nThe code follows MIT license written in [LICENSE](./LICENSE). Contributors need\nto agree that any modifications sent in this repository follow the license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixpoint%2Fdeno-replutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffixpoint%2Fdeno-replutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixpoint%2Fdeno-replutil/lists"}