{"id":22367725,"url":"https://github.com/hugojosefson/deno-stdin","last_synced_at":"2026-05-18T09:09:48.905Z","repository":{"id":66830169,"uuid":"441470359","full_name":"hugojosefson/deno-stdin","owner":"hugojosefson","description":"Trying different ways of reading Deno.stdin.","archived":false,"fork":false,"pushed_at":"2023-04-25T18:22:30.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-31T17:48:20.831Z","etag":null,"topics":["deno","input","keypress","stdin","stdout"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/hugojosefson.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-24T13:16:30.000Z","updated_at":"2021-12-26T09:59:06.000Z","dependencies_parsed_at":"2024-12-11T06:00:42.637Z","dependency_job_id":null,"html_url":"https://github.com/hugojosefson/deno-stdin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-stdin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-stdin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-stdin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hugojosefson%2Fdeno-stdin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hugojosefson","download_url":"https://codeload.github.com/hugojosefson/deno-stdin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245689482,"owners_count":20656416,"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","input","keypress","stdin","stdout"],"created_at":"2024-12-04T18:20:43.551Z","updated_at":"2025-10-09T22:14:37.029Z","avatar_url":"https://github.com/hugojosefson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deno stdin experiments\n\nTrying different ways of reading\n[Deno.stdin](https://deno.land/api?s=Deno.stdin). I hope to be able to switch in\nand out of `Deno.stdin.setRaw()`, while waiting for input, without locking up or\nencountering errors.\n\nThat could be useful for making a\n[port of ink for Deno](https://github.com/hugojosefson/ink) work correctly.\n\n## Conclusion\n\n```sh\ndeno run --reload https://raw.githubusercontent.com/hugojosefson/deno-stdin/main/src/demo.ts --silent\n```\n\nSource code in: [src/demo.ts](src/demo.ts)\n\nApparently, setting raw mode on `Deno.stdin`, and reading/writing is fine, as\nlong as you await the `Promise` returned from\n[Deno.Writer.write](https://deno.land/api?s=Deno.Writer#write).\n\nDon't just write in the background haphazardly, and then try to\n`Deno.stdin.setRaw()` while that's happening. Instead, in a loop where you await\neach `Deno.Writer.write`, check a `let done: boolean` flag for whether to stop\nwriting and resetting the raw mode to `false`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugojosefson%2Fdeno-stdin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhugojosefson%2Fdeno-stdin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhugojosefson%2Fdeno-stdin/lists"}