{"id":33939223,"url":"https://github.com/zhiburt/ptyprocess","last_synced_at":"2026-04-08T13:31:07.836Z","repository":{"id":45608837,"uuid":"381335669","full_name":"zhiburt/ptyprocess","owner":"zhiburt","description":"A process abstraction to work with PTY/TTY on Unix systems","archived":false,"fork":false,"pushed_at":"2025-09-12T21:44:49.000Z","size":117,"stargazers_count":15,"open_issues_count":6,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-13T15:45:27.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/zhiburt.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}},"created_at":"2021-06-29T11:08:34.000Z","updated_at":"2025-09-12T21:44:52.000Z","dependencies_parsed_at":"2022-09-14T08:00:45.940Z","dependency_job_id":null,"html_url":"https://github.com/zhiburt/ptyprocess","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/zhiburt/ptyprocess","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiburt%2Fptyprocess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiburt%2Fptyprocess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiburt%2Fptyprocess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiburt%2Fptyprocess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhiburt","download_url":"https://codeload.github.com/zhiburt/ptyprocess/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhiburt%2Fptyprocess/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31558379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"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":[],"created_at":"2025-12-12T15:17:47.034Z","updated_at":"2026-04-08T13:31:07.829Z","avatar_url":"https://github.com/zhiburt.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ptyprocess [![Build](https://github.com/zhiburt/ptyprocess/actions/workflows/ci.yml/badge.svg)](https://github.com/zhiburt/ptyprocess/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/zhiburt/ptyprocess/branch/main/graph/badge.svg?token=QBQLAT904B)](https://codecov.io/gh/zhiburt/ptyprocess) [![Crate](https://img.shields.io/crates/v/ptyprocess)](https://crates.io/crates/ptyprocess) [![docs.rs](https://img.shields.io/docsrs/ptyprocess?color=blue)](https://docs.rs/ptyprocess/0.1.0/ptyprocess/) [![license](https://img.shields.io/github/license/zhiburt/ptyprocess)](./LICENSE.txt)\n\nA library provides an interface for a unix [PTY/TTY](https://en.wikipedia.org/wiki/Pseudoterminal).\n\nIt aims to work on all major Unix variants.\n\nThe library was developed as a backend for a https://github.com/zhiburt/expectrl.\nIf you're interested in a high level operations may you'd better take a look at `zhiburt/expectrl`.\n\n## Usage\n\n```rust\nuse std::io::{BufRead, BufReader, Result, Write};\nuse std::process::Command;\n\nuse ptyprocess::PtyProcess;\n\nfn main() -\u003e Result\u003c()\u003e {\n    // spawn a cat process\n    let mut process = PtyProcess::spawn(Command::new(\"cat\"))?;\n\n    // create a communication stream\n    let mut stream = process.get_raw_handle()?;\n\n    // send a message to process\n    writeln!(stream, \"Hello World!\")?;\n\n    // read a line from the stream\n    let mut reader = BufReader::new(stream);\n    let mut buf = String::new();\n    reader.read_line(\u0026mut buf)?;\n\n    println!(\"line was entered {buf:?}\");\n\n    // stop the process\n    assert!(process.exit(true)?);\n\n    Ok(())\n}\n```\n\n### Features\n\n- `close-range` - optimization for faster `PtyProcess::spawn` (available on FreeBSD and on Linux since 5.9 and glibc 2.34)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhiburt%2Fptyprocess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhiburt%2Fptyprocess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhiburt%2Fptyprocess/lists"}