Context menu to add content to IPFS
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-13 11:09:51 +02:00
AGENTS.md Simplyifing addition logic 2026-09-13 11:09:51 +02:00
ipfs_nautilus.py Simplyifing addition logic 2026-09-13 11:09:51 +02:00
README.md Simplyifing addition logic 2026-09-13 11:09:51 +02:00

IPFS Nautilus Extension

This workspace contains a Nautilus extension that adds a single Publish on IPFS action to the right-click menu for local files and directories.

The action runs this flow:

ipfs add -Q -r --wrap-with-directory <selected path>
ipfs files cp /ipfs/<cid> /GNOME-extension/<generated_folder_name>
ipfs pin remote add --service=$REMOTEPINSERVICE --background <cid>

The extension always copies the published item(s) into a dedicated timestamped folder under /GNOME-extension/, using the path /GNOME-extension/import-YYYY-mm-dd-HH:MM:ss.

After a successful add, it extracts the CID from ipfs add output, registers it in the MFS, optionally queues a remote pin, copies the CID to the clipboard, and shows it in a dialog. Long-running operations execute in the background and show a progress dialog with a cancel button, so Nautilus remains responsive.

Requirements

  • Nautilus with nautilus-python
  • Python GObject introspection bindings
  • The ipfs CLI available in the Nautilus process environment

On Debian or Ubuntu systems that usually means:

sudo apt install nautilus-python python3-gi

Install

Copy the extension into Nautilus' user extensions directory:

mkdir -p ~/.local/share/nautilus-python/extensions
cp ipfs_nautilus.py ~/.local/share/nautilus-python/extensions/
nautilus -q

Then reopen Files.

Notes

  • Only local filesystem items are supported.
  • There is no special case for a single file, a directory, or multiple files: all uploads are registered in the same MFS destination pattern /GNOME-extension/import-YYYY-mm-dd-HH:MM:ss.
  • The extension runs the ipfs CLI binary and sets IPFS_PATH for those commands.
  • Default IPFS_PATH is $HOME/.ipfs.
  • Override by exporting IPFS_PATH in the Nautilus environment if your IPFS repo is elsewhere.
  • If Nautilus starts without your shell PATH, set IPFS_CLI to the absolute path of the ipfs binary.
  • If REMOTEPINSERVICE is set in the Nautilus environment (for example REMOTEPINSERVICE=web3.storage), the command also queues a remote pin for the published CID.