https://github.com/tzador/x.md Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} tzador / makedown.sh Public * Notifications You must be signed in to change notification settings * Fork 1 * Star 62 Organize your CLI scripts in executable markdown files License MIT license 62 stars 1 fork Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights tzador/makedown.sh This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 16 Commits .vscode .vscode bin bin x x .gitignore .gitignore LICENSE LICENSE README.md README.md package.json package.json pnpm-lock.yaml pnpm-lock.yaml x.md x.md View all files Repository files navigation * README * MIT license x.md x.md is a versatile CLI tool that lets you execute shell scripts, JavaScript code, and Python code from one or more markdown files. It's a streamlined alternative to Makefile or package.json scripts, and it features built-in syntax highlighting through markdown code blocks. Key Features * Multilingual Execution: Supports Zsh, JavaScript, and Python. * Simplified Scripting: Use markdown files (.md) to organize and run commands. * Syntax Highlighting: Leverages markdown code blocks for readability. * Autocomplete Support: ZSH completions for a smoother workflow. Installation npm install -g @tzador/x.md Usage Create a file named x.md in your project root, with the following example content: # Just a demo x.md file This text here is ignored, just for documentation purposes. ## hello Prints "Hello" to `stdout` using Zsh. ```zsh echo "Hello" ``` ## world Just prints "World" to `stdout` using JavaScript. ```js console.log("World"); ``` ## weather-tomorrow Prints the weather for tomorrow to `stdout` using Zsh. ```zsh curl wttr.in/tomorrow ``` ## generate-password Prints a random password to `stdout` using Python. ```python import random import string length = 16 characters = string.ascii_letters + string.digits + string.punctuation password = ''.join(random.choice(characters) for _ in range(length)) print(password) ``` Run x generate-password to generate a random password. Similarly, you can run x hello, x world or x weather-tomorrow to see other examples. Command line completions for ZSH Run the following once to add x command completions to your .zshrc: x --zsh-completion >> ~/.zshrc Then restart your terminal. It will suggest available commands when you type x and press tab. About Organize your CLI scripts in executable markdown files Topics markdown cli makefile scripts Resources Readme License MIT license Activity Stars 62 stars Watchers 4 watching Forks 1 fork Report repository Releases No releases published Packages 0 No packages published Languages * JavaScript 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.