{"id":13534576,"url":"https://github.com/mosjs/mos","last_synced_at":"2025-09-28T21:30:36.475Z","repository":{"id":57143925,"uuid":"54432213","full_name":"mosjs/mos","owner":"mosjs","description":":pill: A pluggable module that injects content into your markdown files via hidden JavaScript snippets","archived":true,"fork":false,"pushed_at":"2019-11-03T14:14:19.000Z","size":1096,"stargazers_count":108,"open_issues_count":13,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-06T09:57:23.863Z","etag":null,"topics":["markdown","node","nodejs","readme"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/mosjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-22T00:15:56.000Z","updated_at":"2023-09-08T17:08:24.000Z","dependencies_parsed_at":"2022-09-06T00:11:35.931Z","dependency_job_id":null,"html_url":"https://github.com/mosjs/mos","commit_stats":null,"previous_names":["zkochan/mos"],"tags_count":64,"template":false,"template_full_name":null,"purl":"pkg:github/mosjs/mos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosjs%2Fmos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosjs%2Fmos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosjs%2Fmos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosjs%2Fmos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mosjs","download_url":"https://codeload.github.com/mosjs/mos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosjs%2Fmos/sbom","scorecard":{"id":660892,"data":{"date":"2025-08-11","repo":{"name":"github.com/mosjs/mos","commit":"6e1f331459f37017012ea5d4fe0f7f99ddd5c676"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-21T16:10:27.742Z","repository_id":57143925,"created_at":"2025-08-21T16:10:27.742Z","updated_at":"2025-08-21T16:10:27.742Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274434891,"owners_count":25284535,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["markdown","node","nodejs","readme"],"created_at":"2024-08-01T08:00:28.146Z","updated_at":"2025-09-28T21:30:34.567Z","avatar_url":"https://github.com/mosjs.png","language":"TypeScript","funding_links":[],"categories":["The list"],"sub_categories":[],"readme":"**This project is currently not maintained. [projectz](https://www.npmjs.com/package/projectz) may satisfy your needs.**\n\n# mos\n\n\u003e A pluggable module that injects content into your markdown files via hidden JavaScript snippets\n\n\u003c!--@shields('npm', 'travis', 'coveralls', 'gitter')--\u003e\n[![npm version](https://img.shields.io/npm/v/mos.svg)](https://www.npmjs.com/package/mos) [![Build Status](https://img.shields.io/travis/mosjs/mos/master.svg)](https://travis-ci.org/mosjs/mos) [![Coverage Status](https://img.shields.io/coveralls/mosjs/mos/master.svg)](https://coveralls.io/r/mosjs/mos?branch=master) [![Gitter](https://img.shields.io/gitter/room/mosjs/mos.svg)](https://gitter.im/mosjs/mos)\n\u003c!--/@--\u003e\n\n## Why mos?\n\n- Markdown files are always up to date\n- [Examples are always correct][mos-plugin-example]\n- [Shields (a.k.a. badges) are auto-generated][mos-plugin-shields]\n- Commonly used README sections are auto-generated using info from `package.json`\n- Plugins can be used for tons of additional features\n\n## Preview\n\nThe [readme][] you are currently reading uses mos! Here's how the shields are generated:\n\n```md\n\u003c!--@shields('npm', 'travis', 'coveralls', 'gitter')--\u003e\n[![npm version](https://img.shields.io/npm/v/mos.svg)](https://www.npmjs.com/package/mos) [![Build Status](https://img.shields.io/travis/mosjs/mos/master.svg)](https://travis-ci.org/mosjs/mos) [![Coverage Status](https://img.shields.io/coveralls/mosjs/mos/master.svg)](https://coveralls.io/r/mosjs/mos?branch=master) [![Gitter](https://img.shields.io/gitter/room/mosjs/mos.svg)](https://gitter.im/mosjs/mos)\n\u003c!--/@--\u003e\n```\n\n## Table of Contents\n\n- [Installation](#installation)\n  - [Manual installation](#manual-installation)\n- [Usage](#usage)\n- [CLI Usage](#cli-usage)\n  - [mos](#mos)\n  - [mos test](#mos-test)\n    - [Optional TAP output](#optional-tap-output)\n- [Mos plugins](#mos-plugins)\n  - [Configuring the default plugins](#configuring-the-default-plugins)\n- [Who uses mos?](#who-uses-mos)\n- [License](#license)\n\n## Installation\n\nInstall mos globally:\n\n```sh\nnpm i -g mos\n```\n\nMake mos configure your `package.json`:\n\n```sh\nmos --init\n```\n\nYour `package.json` will be updated with some new dependencies and `script` properties:\n\n```json\n{\n  \"name\": \"awesome-package\",\n  \"scripts\": {\n    \"test\": \"mos test\",\n    \"md\": \"mos\",\n    \"?md\": \"echo \\\"Update the markdown files\\\"\"\n  },\n  \"devDependencies\": {\n    \"mos\": \"^1.2.0\"\n  }\n}\n```\n\n### Manual installation\n\nYou can also install mos directly:\n\n```sh\nnpm i -D mos\n```\n\nYou'll have to configure the `script` property in your `package.json` to use mos (see above).\n\n## Usage\n\nMos uses a simple templating syntax to execute JavaScript inside markdown files. The result of the JavaScript execution is then inserted into the markdown file.\n\nThe great thing is, that the template and the markdown file are actually the same file! The code snippets are written inside markdown comments, which are invisible when reading the generated markdown file.\n\nLets use mos to write a readme with some dynamic data. Have you ever renamed your package and forgotten to update the readme? Good news! With mos it won't ever happen again:\n\n**README.md**\n\n```md\n\u003c!--@h1([pkg.name])--\u003e\n\u003c!--/@--\u003e\n```\n\nIf you view your readme now, it will be empty. However, you have the code that can insert the title in your readme. All you have to do now is to run `mos` in a terminal.\n\nOnce you've run `mos`, the readme will look like this:\n\n```md\n\u003c!--@h1([pkg.name])--\u003e\n# my-awesome-module\n\u003c!--/@--\u003e\n```\n\nNow your readme has both the code that generates the content and the content itself. However, only the content is visible after the readme is generated to HTML by GitHub or npm. Awesome!\n\n![Happy cat](http://i.imgur.com/JG9BXxe.jpg)\n\n## CLI Usage\n\n### `mos`\n\nRegenerate the markdown files if they are out of date.\n\n### `mos test`\n\nTest the markdown files. Fails if can't generate one of the markdown files or one of the markdown files is out of date. It is recommended to add this command to the `scripts.test` property of `package.json`.\n\n![](http://i.imgur.com/t6CLmMS.png?1)\n\n#### Optional TAP output\n\nMos can generate TAP output via `--tap` option for use with any [TAP reporter](https://github.com/sindresorhus/awesome-tap#reporters).\n\n```console\nmos test --tap | tap-nyan\n```\n\n![](http://i.imgur.com/jet4ZAG.png?2)\n\n**NOTE:** the CLI will use your local install of mos when available, even when run globally.\n\n## Mos plugins\n\nIn the usage example the `package` variable was used to access the package info. The variables available in the markdown scope are _declared by mos plugins_. The `package` variable is created by the [package-json][mos-plugin-package-json] plugin.\n\nThere are a few mos plugins that are installed with mos by default:\n\n- [package-json][mos-plugin-package-json]\n- [shields][mos-plugin-shields]\n- [license](packages/mos-plugin-license)\n- [installation](packages/mos-plugin-installation)\n- [example][mos-plugin-example]\n- [dependencies](packages/mos-plugin-dependencies)\n- [snippet](packages/mos-plugin-snippet)\n- [table-of-contents](packages/mos-plugin-toc)\n- [markdownscript](packages/mos-plugin-markdownscript)\n\nDo you want to write a new one? Read the [plugins readme](./docs/PLUGINS.md).\n\n### Configuring the default plugins\n\nIt is possible to pass options to the default mos plugins via the `mos` property in the `package.json`.\n\n```json\n{\n  \"mos\": {\n    \"installation\": {\n      \"useShortAlias\": true\n    }\n  }\n}\n```\n\nTo disable a default plugin, pass `false` instead of a config object:\n\n```json\n{\n  \"mos\": {\n    \"license\": false\n  }\n}\n```\n\n## Who uses mos?\n\n- [npm-scripts-info](https://github.com/srph/npm-scripts-info)\n- [magic-hook](https://github.com/zkochan/magic-hook)\n\n## License\n\n[MIT](./LICENSE) © [Zoltan Kochan](http://kochan.io)\n\n* * *\n\n**What does mos mean?**\n\u003cbr\u003e\nIt means _Markdown on Steroids_!\n\n[readme]: https://raw.githubusercontent.com/mosjs/mos/master/README.md\n\n[mos-plugin-package-json]: packages/mos-plugin-package-json\n\n[mos-plugin-example]: packages/mos-plugin-example\n\n[mos-plugin-shields]: packages/mos-plugin-shields\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosjs%2Fmos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmosjs%2Fmos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosjs%2Fmos/lists"}