A Claude Code slash command for uploading markdown files to Arweave permanent storage.
In an age where AI generates millions of pieces of content daily, proving the authenticity and origin of your work has never been more important. Strong provenance means your content has four cryptographically verifiable properties: it's permanent (cannot be deleted or altered), precisely timestamped (proving exactly when it was created), signed (your wallet's cryptographic signature proves you uploaded it), and unconstrained (anyone can verify it). By uploading your markdown to Arweave, you anchor something ephemeral into the real time domain with assurances around permanence—proving you authored this content at this specific moment, before anyone else could copy, modify, or claim it.
This matters whether you're a writer establishing priority over your ideas, a researcher documenting findings, or anyone who needs to prove "I wrote this first." As deepfakes proliferate and AI-generated content becomes indistinguishable from human work, having a tamper-proof timestamp on the blockchain provides the receipts you need. Think of it as a digital notary—permanent, global, and cryptographically secure.
- Content Authenticity Initiative — Cross-industry coalition (Adobe, NYT, BBC, Microsoft) building open standards for content provenance
- C2PA Technical Standard — The open specification for Content Credentials
- Deepfakes and Elections: Content Credentials Fight Back — IEEE Spectrum
- How Google and C2PA Are Increasing Transparency — Google Blog
- AI Deepfakes Are a 'Solvable Problem' — Fortune
This command is explicit invocation only. It will NOT automatically trigger when you mention "arweave" or "permanent storage" in conversation. You must explicitly run /markdown-provenance to upload anything.
- Install the plugin (see Installation below)
- Set up your Arweave wallet (see Wallet Setup below)
- Run:
/markdown-provenance path/to/file.md - Receive your permanent viewblock.io URL
# Add the marketplace (one-time)
/plugin marketplace add https://github.com/rickmanelius/markdown-provenance
# Install the plugin
/plugin install markdown-provenanceAfter installation, install npm dependencies:
# Find and install dependencies in the plugin directory
cd ~/.claude/plugins/cache/markdown-provenance/markdown-provenance/*/ && npm installOr if that path doesn't work, find it with:
find ~/.claude/plugins/cache -name "package.json" -path "*markdown-provenance*" -exec dirname {} \; | head -1 | xargs -I {} sh -c 'cd {} && npm install'git clone https://github.com/rickmanelius/markdown-provenance.git
cd markdown-provenance/plugins/markdown-provenance
npm install
# Symlink the plugin to Claude plugins directory
ln -s "$(pwd)" ~/.claude/plugins/markdown-provenancenpx -y arweave wallet generate > wallet.jsonIMPORTANT: Keep this file secure and never commit it to git!
Add to your ~/.zshrc or ~/.bashrc:
export MP_WALLET_PATH="/path/to/your/wallet.json"
export MP_AUTHOR="Your Name" # Optional - adds Author tag to uploadsThen reload your shell:
source ~/.zshrc # or source ~/.bashrcFiles under 100KB are FREE via Turbo.
For larger files, you need AR tokens:
-
Get your wallet address:
npx arweave wallet address wallet.json
-
Purchase AR from an exchange (Binance, Gate.io, etc.)
-
Send AR to your wallet address
/markdown-provenance ./my-document.md
cd /path/to/markdown-provenance
npm run upload ./my-document.mdOr directly:
npx tsx /path/to/markdown-provenance/scripts/upload-to-arweave.ts ./my-document.mdAll options are optional and can be combined:
npm run upload ./doc.md --author "Jane Doe" --fileName "my-article" --source "https://example.com/original"| Option | Description |
|---|---|
--author "Name" |
Override the MP_AUTHOR environment variable |
--fileName "name" |
Add a File-Name tag for easier lookup on Arweave |
--source "URL" |
Add a Source tag referencing the origin URL or URI |
On success, you'll receive:
- ViewBlock URL:
https://viewblock.io/arweave/tx/abc123...(block explorer) - Direct Arweave URL:
https://arweave.net/abc123...(raw content) - IPFS CID: Content identifier for the uploaded file
All transactions are logged to ~/.markdown-provenance/transactions.jsonl
Before uploading, Markdown Provenance checks if the exact content already exists on Arweave:
- Local log check (fast) - Searches your
~/.markdown-provenance/transactions.jsonlfor matching IPFS CID - Arweave GraphQL query - Queries the Arweave network for transactions with the same
IPFS-CIDtag
If the content already exists, you'll receive the existing transaction details without creating a duplicate upload. This saves costs and avoids redundant data on the permaweb.
Each upload includes these metadata tags:
| Tag | Value |
|---|---|
| App-Name | Markdown Provenance |
| App-Version | 0.0.1 |
| Author | From MP_AUTHOR env var or --author flag (if set) |
| File-Name | From --fileName flag (if set) |
| Source | From --source flag (if set) |
| IPFS-CID | Calculated from file content (CIDv1, SHA-256) |
| Content-Type | text/markdown |
| Type | Attestation |
- Never commit wallet.json to version control
- Store wallet in a secure location outside your project (e.g.,
~/.arweave/wallet.json) - Back up wallet.json to multiple secure locations
- Consider using a hardware wallet for large holdings
- The
MP_WALLET_PATHenvironment variable should point to this secure location
Set the environment variable pointing to your wallet.json file:
export MP_WALLET_PATH="/path/to/wallet.json"Check that the path in MP_WALLET_PATH is correct and the file exists:
ls -la $MP_WALLET_PATHFiles over 100KB require AR tokens. Fund your wallet address with AR:
# Get your wallet address
npx arweave wallet address $MP_WALLET_PATHCheck your internet connection and retry. Arweave uploads may take a moment.
Make sure you've registered the skill with Claude Code (see "Registering with Claude Code" section above).
All uploads are logged to ~/.markdown-provenance/transactions.jsonl:
{"timestamp":"2025-01-15T12:00:00Z","file":"doc.md","txId":"abc...","url":"https://viewblock.io/arweave/tx/abc...","cid":"bafkrei...","size":1234}You can view your transaction history:
cat ~/.markdown-provenance/transactions.jsonlOr get a count:
wc -l ~/.markdown-provenance/transactions.jsonlA visual interface for viewing your upload history.
- Auto-load transactions when opened via
npm run viewer - View all uploads in a sortable table with timestamp, filename, size, transaction ID, and IPFS CID
- Quick links to ViewBlock explorer and direct Arweave URLs
- Fetch tags from Arweave GraphQL to see Author, Source, and other metadata
- Statistics showing total uploads, total size, and latest upload date
cd plugins/markdown-provenance
npm run viewerThis automatically loads your ~/.markdown-provenance/transactions.jsonl and opens the viewer in your browser.
You can also open the viewer manually and load the file via drag-and-drop:
open plugins/markdown-provenance/viewer/index.html- File Reading: The script reads your markdown file
- CID Generation: Calculates an IPFS-compatible CID (CIDv1, SHA-256, raw codec)
- Transaction Creation: Creates an Arweave transaction with proper tags
- Upload: Uses ArDrive Turbo SDK for reliable, fast uploads
- Logging: Records the transaction in your local log file
- Arweave - Permanent data storage
- ArDrive Turbo SDK - Upload library
- ViewBlock - Arweave block explorer
- Permaweb Cookbook - Developer resources
A huge thank you to the ArDrive community for providing free uploads for files under 100KB through their Turbo SDK. This generous offering makes permanent, decentralized storage accessible to everyone and is what makes this tool practical for everyday use. Their commitment to lowering barriers to the permaweb is what enables projects like Markdown Provenance to exist.
MIT