/π/π»
A daemon-based network file system mount manager for Linux (Debian/Ubuntu and other distributions).
- Multi-protocol: NFS, SMB/CIFS support
- Persistent: Mounts survive daemon restarts
- Auto-reconnect: Exponential backoff for lost connections
- Secure: Encrypted credentials, audit logging, sandboxed processes
- Multi-instance: Cluster support with automatic configuration synchronization
# Dependencies (Debian/Ubuntu)
sudo apt-get install nfs-common cifs-utils
# Build
cargo build --release
sudo cp target/release/fuji /usr/local/bin/# Start daemon
fuji daemon start -d
# Mount shares
fuji mount nfs://server/export
fuji mount smb://server/share
# Check status
fuji status
# Unmount
fuji unmount <mount-id>
# Stop daemon
fuji daemon stopFuji supports clustering multiple instances for automatic configuration synchronization:
# On the first node, generate an invitation
fuji cluster info
# This will output something like:
# Cluster invitation: eyJ2ZXJzaW9uIjoiMS4wIiw...
# Share this with other nodes to join the cluster
# On other nodes, join the cluster
fuji cluster join <invitation-string>
# Check cluster status
fuji cluster status
# View sync history
fuji cluster history
# Force synchronization
fuji cluster sync-force
# Leave the cluster
fuji cluster leave- Automatic Sync: Configurations synchronize every 5 minutes (configurable)
- Conflict Resolution: Timestamp-based with deterministic tie-breaking
- Fault Tolerant: Continues working even if some nodes go down
- Secure: Pre-shared key authentication for cluster communication
Mounts are organized under /mnt/fuji/{hostname}_{protocol}/path.
# Mount a network share
fuji mount <url> [--mount-point <path>] [--options <opts>]
# Mount with additional flags
fuji mount <url> --disable # Add mount but don't activate it
fuji mount <url> --no-persist # Temporary mount (not saved to config)
# Unmount by ID
fuji unmount <mount-id>
# Enable/disable mounts
fuji enable <mount-id>
fuji disable <mount-id>
# Remove mount configuration
fuji remove <mount-id>
# List all configured mounts
fuji list
# List active mounts
fuji status [--json]# Start daemon
fuji daemon start [-d] # -d for foreground
fuji daemon start --ephemeral # Don't persist config changes (testing mode)
fuji daemon start --no-automount # Don't auto-mount enabled shares on startup
# Stop daemon
fuji daemon stop
# Restart daemon
fuji daemon restart
# Check daemon health
fuji doctor# Generate cluster invitation
fuji cluster info
# Join cluster
fuji cluster join <invitation>
# Show cluster status
fuji cluster status
# Show sync history
fuji cluster history
# Force synchronization
fuji cluster sync-force
# Leave cluster
fuji cluster leave# Show configuration
fuji config [--json]
# Get configuration value
fuji config get <key>
# Set configuration value
fuji config set <key> <value>
# Delete configuration value
fuji config delete <key>
# Reset configuration
fuji config reset [--force]
# Edit configuration in editor
fuji config edit# Execute batch file
fuji batch <file> [--dry-run] [--continue-on-error]Config locations (checked in order):
~/.config/fuji/mounts.toml/etc/fuji/mounts.toml
Socket locations:
/run/fuji.sock/tmp/fuji.sock
By default, Fuji persists all mount operations to disk:
- Mount: Creates new entry in
mounts.toml - Unmount: Marks mount as disabled (keeps configuration)
- Enable/Disable: Updates mount state in config
- Remove: Deletes mount from config file
Config changes are saved atomically to prevent corruption.
For testing or temporary use, disable persistence:
# Start daemon in ephemeral mode (no config changes saved)
fuji daemon start --ephemeral
# Or create temporary mounts (this mount only, not saved)
fuji mount nfs://server/share --no-persistUse cases:
- Testing: Try mounts without modifying config
- Temporary Access: One-time file transfers
- CI/CD: Automated testing environments
# Run tests
cargo test
# Integration tests (requires Docker)
docker-compose up --buildFor consistent development environment across platforms, you can use Dev Containers either with VS Code or via the command-line interface.
- Install the "Dev Containers" extension in VS Code
- Open the command palette (
Ctrl+Shift+PorCmd+Shift+P) - Select "Dev Containers: Reopen in Container"
- The container will build with all necessary dependencies
- Install the
devcontainerCLI by following the official installation guide - From your project directory, run:
devcontainer up --workspace-folder .
# Or to connect to the running container:
devcontainer exec --workspace-folder . bashOnce inside the container, you can run:
# Build the project
make build
# Run all tests
make test
# Run integration tests (with NFS/SMB test servers)
make test-integration
# Run CI checks locally
make ciAlternatively, you can use the compose-based devcontainer which includes NFS/SMB test servers (works with both VS Code and CLI):
- Using VS Code: Command Palette β "Dev Containers: Reopen in Container..." β Select docker-compose file β Choose
.devcontainer/docker-compose.devcontainer.json - Using CLI:
devcontainer up --config .devcontainer/docker-compose.devcontainer.json --workspace-folder .
When using the compose-based devcontainer (with NFS/SMB test servers), run integration tests directly without starting additional docker services:
# Run integration tests (the NFS/SMB servers are already running in the container environment)
cargo test integration_tests --all-featuresISC License