[package] name = "clap-stdin" version = "0.5.1" edition = "2021" authors = ["Mat Wood "] description = "Provides a type for easily accepting Clap arguments from stdin" categories = ["command-line-interface"] keywords = ["clap", "stdin"] license = "MIT OR Apache-2.0" documentation = "https://docs.rs/clap-stdin" readme = "README.md" repository = "https://github.com/thepacketgeek/clap-stdin" [features] default = [] tokio = ["dep:tokio"] # This feature is used for testing with the bins below, since they are linked with deps and not dev-deps test_bin = ["clap"] test_bin_tokio = ["clap", "tokio"] [dependencies] thiserror = "1.0" clap = { version = "4.5", features = ["derive"], optional = true } tokio = { version = "1.37", features = [ "fs", "io-std", "io-util", ], optional = true } [dev-dependencies] anyhow = "1.0" assert_cmd = "2.0" predicates = "3.1" clap = { version = "4.5", features = ["derive"] } tempfile = "3.10" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" tokio = { version = "1.37", features = ["rt", "macros"] } [[example]] name = "parse_with_serde" required-features = ["default"] # These bins are only used for testing [[bin]] name = "maybe_stdin_positional_arg" path = "tests/fixtures/maybe_stdin_positional_arg.rs" test = false bench = false required-features = ["test_bin"] [[bin]] name = "maybe_stdin_optional_arg" path = "tests/fixtures/maybe_stdin_optional_arg.rs" test = false bench = false required-features = ["test_bin"] [[bin]] name = "maybe_stdin_twice" path = "tests/fixtures/maybe_stdin_twice.rs" test = false bench = false required-features = ["test_bin"] [[bin]] name = "file_or_stdin_positional_arg" path = "tests/fixtures/file_or_stdin_positional_arg.rs" test = false bench = false required-features = ["test_bin"] [[bin]] name = "file_or_stdin_optional_arg" path = "tests/fixtures/file_or_stdin_optional_arg.rs" test = false bench = false required-features = ["test_bin"] [[bin]] name = "file_or_stdin_twice" path = "tests/fixtures/file_or_stdin_twice.rs" test = false bench = false required-features = ["test_bin"] [[bin]] name = "is_stdin" path = "tests/fixtures/is_stdin.rs" test = false bench = false required-features = ["test_bin"]