{"id":22912935,"url":"https://github.com/nicholasbishop/command-run","last_synced_at":"2025-08-23T23:09:31.980Z","repository":{"id":62438826,"uuid":"293038349","full_name":"nicholasbishop/command-run","owner":"nicholasbishop","description":"Rust library for running a command in a subprocess","archived":false,"fork":false,"pushed_at":"2024-03-16T16:49:53.000Z","size":56,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-09T02:15:30.992Z","etag":null,"topics":["command","process","rust","subprocess"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicholasbishop.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":"2020-09-05T08:51:06.000Z","updated_at":"2024-12-30T22:25:23.000Z","dependencies_parsed_at":"2024-12-14T04:30:16.299Z","dependency_job_id":null,"html_url":"https://github.com/nicholasbishop/command-run","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasbishop%2Fcommand-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasbishop%2Fcommand-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasbishop%2Fcommand-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasbishop%2Fcommand-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicholasbishop","download_url":"https://codeload.github.com/nicholasbishop/command-run/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176442,"owners_count":21866143,"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":["command","process","rust","subprocess"],"created_at":"2024-12-14T04:30:11.265Z","updated_at":"2025-05-09T02:15:36.689Z","avatar_url":"https://github.com/nicholasbishop.png","language":"Rust","readme":"# command-run\n\n[![crates.io](https://img.shields.io/crates/v/command-run.svg)](https://crates.io/crates/command-run)\n[![Documentation](https://docs.rs/command-run/badge.svg)](https://docs.rs/command-run)\n\nRust library for running a command in a subprocess.\n\nThis library is a thin wrapper around the [`std::process::Command`]\ntype with a few additional convenient features:\n\n- Print or log the command before running it\n- Optionally return an error if the command is not successful\n- Optionally combine stdout and stderr\n- Optionally print the command's output if the command fails\n- The command can be formatted as a command-line string\n- The [`Command`] type can be cloned and its fields are public\n\n## Dependencies and features\n\n- `log` - this is an optional dependency. It can be disabled by\n  turning off the `logging` feature:\n\n  ```toml\n  command-run = { version = \"*\", default-features = false }\n  ```\n\n- `os_pipe` - this dependency is used to implement `combine_output`.\n  \n## Example\n\n```rust\n// This will return an error if the command did not exit successfully\n// (controlled with the `check` field).\nlet output = Command::with_args(\"echo\", \u0026[\"hello\", \"world\"])\n    .enable_capture()\n    .run()?;\nassert_eq!(output.stdout_string_lossy(), \"hello world\\n\");\n```\n\n[`log`]: https://crates.io/crates/log\n[`std::process::Command`]: https://doc.rust-lang.org/std/process/struct.Command.html\n[`Command`]: https://docs.rs/command-run/latest/command_run/struct.Command.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholasbishop%2Fcommand-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicholasbishop%2Fcommand-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholasbishop%2Fcommand-run/lists"}