Skip to content
/ mdembed Public

CLI to embed file contents in Markdown

License

Notifications You must be signed in to change notification settings

croaky/mdembed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mdembed

mdembed is a command line tool to embed file contents in Markdown.

Install

go install github.com/croaky/mdembed

Use

cat example.md | mdembed

Examples

See examples directory.

So what?

I wanted the following workflow in Vim:

  1. Open tmp.md in my project.
  2. Write a prompt for an LLM (Large Language Model).
  3. Reference other files, or subsets of files, in my project.
  4. Hit a key combo (Space+r for me) to send all the contents to an LLM.
  5. Open a visual split to render the LLM's response.

mdembed handles step 3. I use mods for the LLM steps:

go install github.com/charmbracelet/mods@latest

So, my Vim config runs the following Unix pipeline in a visual split:

cat example.md | mdembed | mods

License

MIT

About

CLI to embed file contents in Markdown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages