docfresh
docfresh is a CLI making document with command and code snippet maintainable, reusable, and testable. It prevents document from being outdated.
Features
- Execute external commands and embed their output into document
- Test external commands in document
- Unify a template file and generated file, which improves the maintainability of document
- Fetch documents from local and remote files and embed them into a document
- You can share documents across multiple files and repositories
- You can separate code snippets from the document and apply linters and formatters to them
- Allow running commands in containers
- Securely run commands in isolated environments
- Consistent Command Results across different machines
Note that docfresh is intended to update markdown files. Other markup language isn't supported.
Getting Started
- Install docfresh
- Run commands and embed the output into a document
- Embed Local Files
- Embed Remote Files
1. Install docfresh
Please see INSTALL.md.
command: command: docfresh -v --
docfresh -vOutput:
docfresh version v3.0.0-local2. Run commands and embed the output into a document
- Create a document hello.md
file: path: examples/file/hello.md codeblock: true --
# Embed the output of commands into a document
<!-- docfresh begin
command:
command: echo hello
-->
<!-- docfresh end -->