MCPcopy Index your code
hub / github.com/dim0x69/mdx

github.com/dim0x69/mdx @v0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2 ↗ · + Follow
60 symbols 154 edges 7 files 5 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

mdx - Execute your Markdown Code Blocks

Imagine you have the following Markdown file to document your commands:

# demo.md
## [simple_echo]() - Simple echo in shell

```sh
echo "hello world"
```

With mdx you execute the sh code block:

% mdx simple_echo
hello world

🚀 In a nutshell:

  • Pass arguments into your code block. ➔ Example
  • Define dependencies ➔ Example
  • supports shebangs in code block ➔ Example

  • parses all .md files in the CWD for potential commands

  • list all commands using -list or -l

Usage

Getting started

Installation

You can simply download a binary which fits your operating system and achitecture from the releases page.

Then just use the demo.md from above to execute simple_echo.

Build

Go should be installed on your system: Follow this guide to install go in your PATH.

$ git clone https://github.com/dim0x69/mdx
$ go build
$ go install

Resources

The idea for this project came from Makedown.

Core symbols most depended-on inside this repo

executeCodeBlock
called by 9
exec.go
errorExit
called by 9
main.go
executeCommandBlock
called by 6
exec.go
getMarkdownFilePaths
called by 6
main.go
loadCommands
called by 5
parser.go
isExecutableInPath
called by 4
exec.go
Close
called by 2
parser.go
extractCommandAndDepsFromHeading
called by 2
parser.go

Shape

Function 45
Method 8
Struct 7

Languages

Go100%

Modules by API surface

parser_test.go14 symbols
exec_test.go14 symbols
parser.go12 symbols
main.go8 symbols
exec.go7 symbols
main_test.go5 symbols

For agents

$ claude mcp add mdx \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact