clitest
brew install clitest
v0.5.0
MIT
Command-Line Tester
5
30-day installs · #10550
10
90-day · #12172
28
365-day · #12908
174
★ GitHub stars · updated 3y ago
Links
- https://github.com/aureliojargas/clitest
- GitHub: aureliojargas/clitest
- Brew formula source: Formula/c/clitest.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Command-Line Tester",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:36:27+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "clitest",
"github_default_branch": "main",
"github_last_commit_at": "2023-06-22T21:25:15Z",
"github_readme_excerpt": "# clitest \u2013 Command Line Tester\n\nclitest is a [portable][1] POSIX shell script that performs automatic\ntesting in Unix command lines.\n\nIt\u0027s the same concept as in Python\u0027s [doctest][2] module: you document\nboth the commands and their expected output, using the familiar\ninteractive prompt format, and a specialized tool tests them.\n\nIn fact, the doctest [official][3] description can also be used for\nclitest:\n\n* The **doctest** module searches for pieces of text that look like\n interactive **Python sessions**, and then executes those **sessions**\n to verify that they work exactly as shown.\n\n* The **clitest** command searches for pieces of text that look like\n interactive **Unix command lines**, and then executes those\n **command lines** to verify that they work exactly as shown.\n\n\n## Download \u0026 install\n\nThe full program is just [a single shell script file][4].\n\nSave it, make it executable and move it to a `$PATH` directory:\n\n```bash\ncurl -sOL https://raw.githubusercontent.com/aureliojargas/clitest/master/clitest\nchmod +x clitest\nsudo mv clitest /usr/bin\n```\n\nNow check if everything is fine:\n\n```\nclitest --help\n```\n\n\n## Docker image\n\nYou can also run clitest in a Docker container ([more info in Docker Hub](https://hub.docker.com/r/aureliojargas/clitest)).\n\n```\ndocker run --rm -t aureliojargas/clitest --help\n```\n\n\n## Quick Intro\n\nSave the commands and their expected output in a text file:\n\n\u2666 [examples/intro.txt][5]\n\n```\n$ echo \"Hello World\"\nHello World\n$ cd /tmp\n$ pwd\n/tmp\n$ cd \"$OLDPWD\"\n$\n```\n\nUse clitest to run these commands and check their output:\n\n```console\n$ clitest examples/intro.txt\n#1\techo \"Hello World\"\n#2\tcd /tmp\n#3\tpwd\n#4\tcd \"$OLDPWD\"\nOK: 4 of 4 tests passed\n$\n```\n\n\n## CLI Syntax\n\nThere\u0027s no syntax to learn.\n\nThe test files are identical to the good old command line interface\n(CLI) you\u0027re so familiar:\n\n\u2666 [examples/cut.txt][6]\n\n```\n$ echo \"one:two:three:four:five:six\" | cut -d : -f 1\none\n$ echo \"one:two:three:four:five:six\" | cut -d : -f 4\nfour\n$ echo \"one",
"github_repo": "aureliojargas/clitest",
"github_stars": 174,
"github_topics": [],
"homepage": "https://github.com/aureliojargas/clitest",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 5,
"installs_365d": 28,
"installs_90d": 10,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MIT",
"llm_generated_at": null,
"llm_model": null,
"name": "clitest",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 10550,
"rank_365d": 12908,
"rank_90d": 12172,
"raw_hash": "a318fc1e4ffb9ceb",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/c/clitest.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "0.5.0",
"versioned_formulae": [],
"why_use_this": null
}