CLI
Create and manage pastes from the terminal with the mdgist command-line tool.
cat README.md | mdgist
mdgist notes.md
echo '# Hello' | mdgist --url my-doc --password secretInstall
Homebrew (macOS / Linux)
brew install jameslupolt/tap/mdgistGo
go install github.com/jameslupolt/mdgist/cli@latestManual Download
Grab the latest binary from GitHub Releases and put it in your PATH.
Options
| Flag | Short | Description |
|---|---|---|
--url |
-u |
Custom URL slug |
--password |
-p |
Password-protect the paste |
--edit-code |
-e |
Edit code for edits and deletion |
--ttl |
-t |
Time to live (1h, 1d, 1w, 30d) |
--history |
Enable edit history | |
--delete |
-d |
Delete a paste by ID |
--server |
-s |
Server URL |
--version |
Print version |
The default server is https://mdgist.com. Override it with --server or the MDGIST_SERVER environment variable.
Examples
Paste with a custom URL and 1-day expiry:
cat draft.md | mdgist -u meeting-notes -t 1dPassword-protected paste with edit code:
mdgist secret.md -p hunter2 -e mycodePaste to a self-hosted instance:
cat log.md | mdgist -s http://localhost:8000Deleting Pastes
Pastes without an edit code can be deleted by anyone:
mdgist -d abc123If the paste has an edit code, you need it to delete:
mdgist -d abc123 -e myeditcode