MDCode turns markdown heading syntax into executable scripts. Every # is a command. Readable by anyone, runnable by everything.
#import lib-mdcode #import lib-autoVar #var name (create) | MDCode #print | Hello from + name | ! #env HOME > homeDir #print | Running from: + homeDir #os | uname -r > kernel ###print | Kernel: + kernel #exit | 0
Why MDCode
|. Bare words are always variables. No ambiguity, ever./ just like the shell. Pipe output directly into the next command's input.lib-autoVar for automatic variable passing. Import lib-visual for native GUI windows.Guide
Every line starts with #. The number of # symbols defines nesting depth, incrementing by +2 per level. ## is special — it accesses onetimeVars from the parent block.
#print | top level ###print | child of above #####print | child of child ##print | accesses parent onetimeVar
| starts a literal value. A bare word is a variable. Use + to concatenate anything.
#print | hello world ← string #print myVar ← variable #print | hello + userName ← str + var #print vr + | it worked ← var + str
Use > to store output. Use / to pipe output into the next command. Pipes chain.
#os | uname -r > kernel #print | kernel: + kernel #print | y / input | continue?
Create or edit vars with #var. onetimeVars are block-scoped — only accessible one level deeper via ##.
#var greeting (create) | hello #var greeting (edit) | goodbye #var data (change) type > onetimeVar ##print | data: + data
lib-mdcode is the core, always import it. lib-autoVar auto-exposes strVar and log vars. lib-visual builds native GTK windows with navbar and webview.
#import lib-mdcode #import lib-autoVar #readFile | ~/.config/hypr.log ##print strVar #import lib-visual #visual | My App ###topbar #####navbar | (button) Home (gotoWeb) https://example.com #######webview | https://example.com
Get MDCode
requires python 3.10+ — no pip installs needed