{"id":15837884,"url":"https://github.com/sambacha/climaxxing","last_synced_at":"2026-04-26T12:32:49.369Z","repository":{"id":252663469,"uuid":"841074414","full_name":"sambacha/climaxxing","owner":"sambacha","description":"autogenerate tests via shell completion ","archived":false,"fork":false,"pushed_at":"2024-08-11T15:29:21.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T01:57:08.631Z","etag":null,"topics":["autogenerate","bash","bash-bats","bats","posix","shell-testing"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/sambacha.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":"2024-08-11T15:08:51.000Z","updated_at":"2024-08-11T15:29:24.000Z","dependencies_parsed_at":"2024-08-11T16:45:24.659Z","dependency_job_id":"c63243ca-fc70-45fd-afe3-87de1075b78a","html_url":"https://github.com/sambacha/climaxxing","commit_stats":null,"previous_names":["sambacha/climaxxing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sambacha/climaxxing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fclimaxxing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fclimaxxing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fclimaxxing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fclimaxxing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sambacha","download_url":"https://codeload.github.com/sambacha/climaxxing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sambacha%2Fclimaxxing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32297895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: 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":["autogenerate","bash","bash-bats","bats","posix","shell-testing"],"created_at":"2024-10-05T15:42:17.186Z","updated_at":"2026-04-26T12:32:49.352Z","avatar_url":"https://github.com/sambacha.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLIMaxxing\n\n\u003e Ensure that your CLI tool's bash completion script is working correctly for all commands and options, including edge cases like partial inputs and invalid commands.\n\n\n## Overview\n\nCLIMaxxing follows these steps to generate and run tests:\n\n1. **Parsing**: The tool reads the bash completion script and parses it to extract all commands, subcommands, and their respective options.\n\n2. **Test Generation**: Using the parsed information, CLIMaxxing generates a series of BATS tests. These include:\n   - Full completion tests for each command and subcommand\n   - Incremental completion tests, checking partial option lists\n   - Tests for invalid inputs\n   - Tests for partial command inputs\n\n3. **Mock Creation**: The tool generates a mock version of the CLI tool being tested. This mock intercepts completion requests and returns predefined outputs, allowing for controlled testing.\n\n4. **BATS Test Suite**: All generated tests are written into a BATS test file. This file includes setup and teardown functions to manage the testing environment.\n\n5. **Test Execution**: The generated BATS tests can then be run using the BATS framework, providing a detailed report of passing and failing completions.\n\n## Example\n\nLet's say we're testing the completions for a CLI tool called `cast`. Here's how you might use CLIMaxxing:\n\n1. Run the CLIMaxxing generator:\n   ```\n   cargo run -- cast.d\n   ```\n\n2. This generates two files:\n   - `test_cast_completion.bats`: The BATS test file\n   - `cast_mock`: The mock cast script\n\n3. The generated `test_cast_completion.bats` might include tests like:\n   ```bash\n   @test \"Test completion for 'cast call'\" {\n       mock_set_output \"$CAST_MOCK\" \"--rpc-url --from --interactive --private-key\"\n       run cast call --generate-bash-completion\n       assert_success\n       assert_output --partial \"--rpc-url --from --interactive --private-key\"\n   }\n\n   @test \"Test incremental completion for 'cast call' (2 options)\" {\n       mock_set_output \"$CAST_MOCK\" \"--rpc-url --from\"\n       run cast call --generate-bash-completion\n       assert_success\n       assert_output --partial \"--rpc-url --from\"\n   }\n   ```\n\n4. Run the BATS tests:\n   ```\n   bats test_cast_completion.bats\n   ```\n\n5. BATS will execute all the tests and provide a report, for example:\n   ```\n   ✓ Test completion for 'cast call'\n   ✓ Test incremental completion for 'cast call' (2 options)\n   ✓ Test completion for invalid input\n   ✓ Test completion for partial input 'cast to-'\n   ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambacha%2Fclimaxxing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsambacha%2Fclimaxxing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsambacha%2Fclimaxxing/lists"}