
An AI-powered CLI tool to enhance your Markdown workflow, with auto-image downloading, translation, and more features coming soon!
- Automatically downloads remote images to a specified local directory.
- Translates markdown files using AI models with support for multiple languages.
- Uploads local images in markdown files to cloud storage services and updates references.
- Exports markdown files to various document formats (DOCX, PDF, EPUB) with customization options.
- Generates llms.txt files from website sitemaps for training language models.
Use Homebrew to install mdctl. Follow the Homebrew Installation Guide to install Homebrew.
brew tap samzong/tap
brew install samzong/tap/mdctl
Or use go to install mdctl.
go install github.com/samzong/mdctl@latest
Quick examples for common tasks:
# Process a single file
mdctl download -f path/to/your/file.md
# Process a directory
mdctl download -d path/to/your/directory
# Translate to Chinese
mdctl translate -f README.md -l zh
# Translate a directory to Japanese
mdctl translate -d docs/ -l ja
# Upload images from a file
mdctl upload -f post.md
# Upload images from a directory
mdctl upload -d docs/
# Export to DOCX
mdctl export -f README.md -o output.docx
# Export to PDF with table of contents
mdctl export -d docs/ -o documentation.pdf -F pdf --toc
# Standard mode (titles and descriptions)
mdctl llmstxt https://example.com/sitemap.xml > llms.txt
# Full-content mode
mdctl llmstxt -f https://example.com/sitemap.xml > llms-full.txt
If you are interested in contributing, please refer to the DEVELOPMENT.md file for a complete technical architecture, component design, and development guide.
Welcome to contribute code, report issues, or suggest features! Please follow these steps:
- Fork this repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.