{"id":20594378,"url":"https://github.com/unboundedsystems/markdown-clitest","last_synced_at":"2025-07-03T09:32:17.409Z","repository":{"id":35090544,"uuid":"205416031","full_name":"unboundedsystems/markdown-clitest","owner":"unboundedsystems","description":"Test all the CLI commands and examples in your Markdown docs!","archived":false,"fork":false,"pushed_at":"2024-08-09T19:39:30.000Z","size":502,"stargazers_count":3,"open_issues_count":16,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T23:36:28.378Z","etag":null,"topics":["automate","bash","cli","docs","documentation","documentation-testing","markdown","md","shell","test","testing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/unboundedsystems.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2019-08-30T16:10:33.000Z","updated_at":"2024-07-29T04:56:57.000Z","dependencies_parsed_at":"2023-01-15T13:38:38.145Z","dependency_job_id":"4767e17b-b1ea-4c3b-91c7-2b3b1c3bc2a4","html_url":"https://github.com/unboundedsystems/markdown-clitest","commit_stats":{"total_commits":243,"total_committers":3,"mean_commits":81.0,"dds":0.279835390946502,"last_synced_commit":"8b6550e3b60f5d907443a31e39834a3222f0d03e"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/unboundedsystems/markdown-clitest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unboundedsystems%2Fmarkdown-clitest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unboundedsystems%2Fmarkdown-clitest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unboundedsystems%2Fmarkdown-clitest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unboundedsystems%2Fmarkdown-clitest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unboundedsystems","download_url":"https://codeload.github.com/unboundedsystems/markdown-clitest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unboundedsystems%2Fmarkdown-clitest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263300467,"owners_count":23445243,"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":["automate","bash","cli","docs","documentation","documentation-testing","markdown","md","shell","test","testing"],"created_at":"2024-11-16T08:08:52.359Z","updated_at":"2025-07-03T09:32:17.379Z","avatar_url":"https://github.com/unboundedsystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/unboundedsystems/markdown-clitest.svg?branch=master)](https://travis-ci.com/unboundedsystems/markdown-clitest)\n[![NPM version](https://img.shields.io/npm/v/markdown-clitest?color=blue)](https://www.npmjs.com/package/markdown-clitest)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\n# Markdown CLI Test\n\nTest all the CLI commands and examples in your Markdown docs!\n\n## Install `markdown-clitest`\n\n```console\nnpm install -g markdown-clitest\n```\n\n## Using `markdown-clitest`\n\n### Add comments in your Markdown files that tell `markdown-clitest` what to test\n\n**README.md:**\n\n````markdown\n# Instructions for generating a random quote\n\nFirst, install wikiquote-cli:\n\n[This comment says to actually run the commands in the following code block.]\n\u003c!-- doctest command --\u003e\n```\nnpm install -g wikiquote-cli\n```\n\n[This comment runs wikiquote to confirm it got installed]\n\u003c!-- doctest exec { cmd: \"wikiquote --help\", matchRegex: \"Get quotes from Wikiquote\" } --\u003e\n\nNow you can get quotes!\n\n[Run the command]\n\u003c!-- doctest command --\u003e\n```\nwikiquote random \"Steve Jobs\"\n```\n\n[And check the output from the previous command]\n\u003c!-- doctest output { matchRegex: \"-- Steve Jobs\" } --\u003e\n````\n\n### Then run `markdown-clitest` on your Markdown file\n\n`markdown-clitest` looks for the embedded test comments in your Markdown, executing commands you tag, checking output, and running other tests.\n\nThis example uses the `-i` flag to run in interactive mode.\n\n```console\n$ ./bin/markdown-clitest -i README.md\n\nChanged to new cwd: '/src'\nRunning in temp dir: /tmp/clitest-PP2CZr\nTesting file: README.md\n\nCWD: /tmp/clitest-PP2CZr\nCommand: npm install -g wikiquote-cli\nContinue? [Yes, No, Skip] y\n/usr/local/bin/wikiquote -\u003e /usr/local/lib/node_modules/wikiquote-cli/index.js\n+ wikiquote-cli@1.2.7\nadded 64 packages from 83 contributors in 2.598s\n\nOutput OK? [Yes, No] y\n\nCWD: /tmp/clitest-PP2CZr\nCommand: wikiquote --help\nContinue? [Yes, No, Skip] y\nGet quotes from Wikiquote\n\nUsage: wikiquote \u003ccmd\u003e [options]\n\nCommands:\n  wikiquote cache \u003ccmd\u003e              issue cache commands\n  wikiquote list \u003cname\u003e [options]    list quotes for a given page name\n  wikiquote random \u003cname\u003e [options]  get a random quote from a page\n  wikiquote search \u003cquery\u003e           search for a page name\n  wikiquote completion               generate completion script\n\nOptions:\n  -v, --version  Show version number                           [boolean]\n  -h, --help     Show help                                     [boolean]\n\nExamples:\n  wikiquote random \"Steve Jobs\"\n  wikiquote search \"bill gates\"\n\nCWD: /tmp/clitest-PP2CZr\nCommand: wikiquote random \"Steve Jobs\"\nContinue? [Yes, No, Skip] y\nWe have always been shameless about stealing great ideas.\nTriumph of the Nerds (1996) -- Steve Jobs\n\nOutput OK? [Yes, No] y\nRemoving temp dir: /tmp/clitest-PP2CZr\n```\n\n## Command Line Usage\n\n```console\nUsage: markdown-clitest [options] \u003cfilepath\u003e\n\nOptions:\n  -i, --interactive  Ask for user input at each action\n  --list             List actions, but do not run them\n  --no-cleanup       Don't remove temporary directory on exit\n  -h, --help         output usage information\n\nWhen used with a single file, it must be a markdown file and only that\nfile will be tested.\n\nWhen used with a directory, all markdown files in that directory will be\ntested, ordered with index.md first, followed by the remaining files sorted\nby filename.\n```\n\n## Releasing markdown-clitest\n\nThis project uses [Conventional Commits](https://conventionalcommits.org) with [`standard-version`](https://github.com/conventional-changelog/standard-version) as the tool to manage releases.\n\n\u003e **NOTE**\n\u003e\n\u003e `standard-version` appears to always use release type `patch` prior to v1.0.0, so the `--release-as` option is required for now.\n\nTo create a release:\n\n```console\ngit checkout master\ngit pull origin master\n\n# Confirm what steps the release will perform\nyarn run release --dry-run --release-as minor\n\n# Create the release and publish\nyarn run release --release-as minor\ngit push --follow-tags origin master\nyarn publish\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funboundedsystems%2Fmarkdown-clitest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funboundedsystems%2Fmarkdown-clitest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funboundedsystems%2Fmarkdown-clitest/lists"}