← All tools

suzuki-shunsuke/docfresh

Popularity 65 Updated Content & Media

Make document maintainable, reusable, and testable

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

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 -v

Output:

docfresh version v3.0.0-local

2. 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 -->