Context menu to add content to IPFS
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Solène RAPENNE d539c3d832 Link video demo
2026-09-23 19:19:49 +02:00
AGENTS.md Improve code reliability 2026-09-22 23:45:21 +02:00
ipfs_nautilus.py Improve code reliability 2026-09-22 23:45:21 +02:00
README.md Link video demo 2026-09-23 19:19:49 +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.

Video presentation

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.
  • If your IPFS repo is elsewhere, either edit DEFAULT_IPFS_PATH in ipfs_nautilus.py or export IPFS_PATH in the Nautilus environment.
  • If Nautilus starts without your shell PATH, set IPFS_CLI to the absolute path of the ipfs binary.
  • Remote pinning is easiest to configure by editing DEFAULT_REMOTE_PIN_SERVICE in ipfs_nautilus.py. Set it to a service such as web3.storage to enable pinning, or leave it empty to disable it.
  • Environment variables still work as an override: if REMOTEPINSERVICE is set in the Nautilus environment, it takes precedence over the file edit.