Quick Start Guide
Get productive with Markdown-OS in under 5 minutes. This guide covers the essentials using real examples.Your First File
Let’s start by creating and opening a markdown file:Open in Markdown-OS
Launch the editor with a single command:Your browser opens automatically at
http://127.0.0.1:8000If port 8000 is occupied, Markdown-OS automatically tries 8001, 8002, etc. Watch the console output for the actual URL.
Generate a Feature Showcase
The fastest way to explore Markdown-OS features is using the example command:example.md in your current directory with:
- Text formatting examples
- Code blocks with syntax highlighting
- Mermaid diagrams (flowcharts, sequence diagrams, state machines)
- Math equations with KaTeX
- Tables, lists, blockquotes
- Image upload examples
Open the Example Immediately
Custom Output Path
Overwrite Without Prompting
Use
--force or -f to skip the overwrite confirmation for existing files.Single File vs Directory Mode
Markdown-OS operates in two modes based on what you open:Single File Mode
Open a single markdown file for focused editing:- Clean, distraction-free interface
- No sidebar or tabs
- Perfect for quick edits
- Ideal for personal notes
Directory Workspace Mode
Open an entire directory to work with multiple files:- File tree sidebar with search
- Multi-file tabs (up to 15 open files)
- Smart tab naming for duplicate filenames
- URL-based file routing:
?file=path/to/file.md - Cached content and scroll positions
The directory must contain at least one
.md or .markdown file to open in workspace mode.Open Current Directory
Runmarkdown-os without arguments to open the current directory:
Essential Features
Auto-Save
Markdown-OS automatically saves your work:- Debounce delay: 1 second after you stop typing
- Status indicator: Shows “Saving…” → “Saved” or error states
- Never lose work: Even if your browser crashes, content is persisted
Live Preview
See your rendered markdown as you type:- Instant updates: Preview refreshes as you edit
- Syntax highlighting: Code blocks with language detection
- Mermaid rendering: Diagrams render inline with pan/zoom
- KaTeX math: LaTeX equations rendered beautifully
Inline Markdown Shortcuts
Type markdown syntax and watch it transform:| Type This | Get This | Feature |
|---|---|---|
**text** | text | Bold |
*text* | text | Italic |
~~text~~ | Strikethrough | |
`code` | code | Inline code |
# Space | Heading 1 | H1 heading |
## Space | Heading 2 | H2 heading |
- Space | • List item | Unordered list |
1. Space | 1. List item | Ordered list |
Image Upload
Add images with drag-and-drop or paste:
Supported formats: PNG, JPG, GIF, WEBP, SVG, BMP, ICO (max 10MB)
Drag and Drop:
Drag image files directly onto the editor to upload them.
Mermaid Diagrams
Create diagrams with Mermaid syntax:Code Blocks
Write code with syntax highlighting:- Automatic language detection
- Copy button on hover
- Language label badge
- Line numbers (optional)
- 180+ languages supported via highlight.js
Math Equations
Render LaTeX equations with KaTeX: Inline math:Command Reference
Open Command
PATH: File or directory to open (required)
--host TEXT: Host interface to bind (default:127.0.0.1)--port INTEGER: Preferred start port (default:8000)--help: Show help message
Example Command
OUTPUT: Output path for example file (default:example.md)
--open: Open in editor after creation--force/-f: Overwrite without prompting--help: Show help message
Keyboard Shortcuts
Editor Shortcuts
| Shortcut | Action |
|---|---|
Ctrl/Cmd + B | Toggle bold |
Ctrl/Cmd + I | Toggle italic |
Ctrl/Cmd + K | Insert link |
Ctrl/Cmd + Z | Undo |
Ctrl/Cmd + Shift + Z | Redo |
Ctrl/Cmd + V | Paste (including images) |
Ctrl/Cmd + Click | Open link in new tab |
Tab | Indent list item |
Shift + Tab | Outdent list item |
Browser Shortcuts
| Shortcut | Action |
|---|---|
Ctrl/Cmd + S | Manual save (if needed) |
Ctrl/Cmd + R | Reload page |
F12 | Open developer tools |
Advanced Usage
Custom Host and Port
Bind to a specific host and port:Path Validation
Markdown-OS validates paths automatically: For files:- Must exist
- Must have
.mdor.markdownextension - Expands
~to home directory - Resolves to absolute path
- Must exist
- Must contain at least one
.mdor.markdownfile (recursive search) - Expands
~and resolves to absolute path
Conflict Detection
If the file changes externally while you have unsaved edits, Markdown-OS shows a conflict dialog with three options:- Save My Changes: Overwrite the external changes with your edits
- Discard My Changes: Load the external changes and lose your edits
- Cancel: Keep editing without resolving the conflict
WebSocket notifications alert you to external changes in real-time.
File Tree Navigation (Workspace Mode)
In directory mode, use the sidebar to navigate:- Click file: Open in new tab (or switch to existing tab)
- Search box: Filter files by name
- Folder icons: Click to expand/collapse
- Active indicator: Highlights currently open file
Tab Management (Workspace Mode)
- Click tab: Switch to that file
- Close button: Close tab (prompts if unsaved changes)
- Dirty indicator:
•dot shows unsaved changes - Smart naming: When multiple files share the same name, shows parent directory
- Max tabs: Limit of 15 open tabs
Themes
Markdown-OS includes 6 built-in themes:- Default Light: Clean, professional light theme
- Default Dark: Easy-on-eyes dark theme
- Dracula: Popular dark theme with vibrant colors
- Nord Light: Calm, arctic-inspired light palette
- Nord Dark: Polar night dark theme
- Lofi: Vintage, low-contrast aesthetic
Troubleshooting
Browser Doesn’t Open Automatically
The CLI shows the URL in the console. Copy and paste it into your browser:Auto-Save Not Working
Check the save status indicator:- “Saving…”: Save in progress
- “Saved”: Success
- Error message: Check file permissions
Mermaid Diagrams Not Rendering
Ensure syntax is correct:Math Equations Not Rendering
Verify LaTeX syntax:\$10-\$20
Port Already in Use
Markdown-OS auto-increments the port. Watch the console output:Best Practices
File Organization
For workspace mode, organize files logically:Backup Your Work
While auto-save is reliable, use version control:Image Management
Images are saved toimages/ adjacent to your markdown:
- Single file mode:
images/in the same directory as the file - Workspace mode:
images/in the workspace root
Performance Tips
- Keep files reasonable: Very large files (>1MB) may slow the editor
- Close unused tabs: In workspace mode, close tabs you’re not actively using
- Limit concurrent edits: Auto-save works best when editing one file at a time
Next Steps
You’re ready to use Markdown-OS productively! Explore more:GitHub Repository
View source code and contribute
Report Issues
Found a bug? Let us know
Example Template
Run
markdown-os example --open to explore featuresIntroduction
Review the overview and feature list