| name | markedit-tools |
| description | Provides tools for managing MarkEdit, a macOS markdown editor |
Purpose
Help users configure and extend MarkEdit, a free and open-source markdown editor for macOS.
Key Capabilities
- Upgrade the MarkEdit app
- Install, upgrade, and manage MarkEdit extensions
- Configure MarkEdit advanced settings
- Answer questions related to MarkEdit
Core Concepts
File Locations
| Path | Description |
|---|
~/Library/Containers/app.cyan.markedit/Data/Documents/scripts/ | Extensions directory |
~/Library/Containers/app.cyan.markedit/Data/Documents/settings.json | Advanced settings |
~/Library/Containers/app.cyan.markedit/Data/Documents/editor.css | Custom stylesheets |
~/Library/Containers/app.cyan.markedit/Data/Documents/editor.js | Custom JavaScript |
Extension URLs
When a user provides an extension name, download from this URL pattern:
https://github.com/MarkEdit-app/extension-name/blob/main/dist/extension-name-kebab-cased.js?raw=true
Always normalise the extension name to kebab-case.
For example, MarkEdit Preview is available at:
https://github.com/MarkEdit-app/MarkEdit-preview/blob/main/dist/markedit-preview.js?raw=true
When a user requests a "lite" build, it is located in the lite subfolder under dist:
https://github.com/MarkEdit-app/MarkEdit-preview/blob/main/dist/lite/markedit-preview.js?raw=true
The filename is identical to the standard build; do not add a -lite suffix.
If the dist file is not found (non-200 response), fall back to the GitHub latest release asset:
- Fetch the latest release tag from the GitHub API:
https://api.github.com/repos/MarkEdit-app/extension-name/releases/latest
- Read the
tag_name field from the response.
- Download the asset using:
https://github.com/MarkEdit-app/extension-name/releases/download/{tag_name}/extension-name-kebab-cased.js
For example, if dist/markedit-preview.js is not available in the repository and the latest release tag is v1.0.0:
https://github.com/MarkEdit-app/MarkEdit-preview/releases/download/v1.0.0/markedit-preview.js
If the user provides a URL ending with .js, use that URL directly.
Common Tasks
Upgrading MarkEdit
- Retrieve the latest release from GitHub releases
- Prompt the user to choose:
.dmg or apple-silicon.dmg
- Download the selected installer
- Extract the
.app bundle from the .dmg
- Move the
.app bundle to /Applications
- Launch MarkEdit
Re-Launching MarkEdit
osascript -e 'quit app "MarkEdit"' -e 'delay 1' -e 'launch app "MarkEdit"'
Installing Extensions
- Download the extension by name or URL
- Place it in the extensions directory
- Re-launch MarkEdit
Use the filename derived from the URL. If a file with the same name exists, prompt the user to confirm overwriting.
Listing Extensions
List all .js files in the extensions directory with their sizes and last modification dates.
Upgrading Extensions
- Re-download the extension from the same source (lite or full)
- Overwrite the existing file
- Re-launch MarkEdit
Uninstalling Extensions
- Add
.js suffix to the name if needed
- Remove the file from the extensions directory
- Re-launch MarkEdit
Editing Preferences
- Use the wiki as reference
- Edit
settings.json directly
- Re-launch MarkEdit
Answering Questions
When users ask questions:
- If it's a task (install, configure, upgrade) → perform the action
- If it's a customisation question → explain editor.css, editor.js, or settings.json
- If it's a feature question → fetch from wiki and issues
- If unknown → suggest the wiki or GitHub issues
Examples
- "Upgrade MarkEdit"
- "Install MarkEdit Preview extension"
- "Install the lite version of MarkEdit Preview"
- "Upgrade MarkEdit Preview"
- "List installed extensions"
- "Remove MarkEdit Preview"
- "Enable autoSaveWhenIdle in MarkEdit"
- "How to customise the editor appearance?"
Error Handling
- If extension download fails from both the dist URL and the latest release, suggest checking the extension name or URL
- If
settings.json is malformed, suggest validating JSON syntax
- If MarkEdit is not installed, suggest installation methods
Documentation
When answering questions, refer to the MarkEdit Wiki:
Search also https://github.com/MarkEdit-app/MarkEdit/issues?q=is%3Aissue%20state%3Aclosed for answered questions or discussed topics.
When answering questions related to development, refer to the MarkEdit API repository too.
Chezmoi
The user manages their markedit config files with chezmoi.
After making changes to settings.json or other config files, ensure you add them to chezmoi (chezmoi add --encrypt <file>), but do not run any git commands.