Skip to content

Command Line Reference

FuryMesh provides a comprehensive command-line interface (CLI) for interacting with the application. This reference documents all available commands and their options.

Global Options

These options can be used with any command:

--config <path>       Path to the configuration file (default: config.yaml)
--verbose, -v         Enable verbose output
--help, -h            Show help for a command
--version             Show version information

Basic Commands

Start

Start a FuryMesh node:

furymesh start [options]

Options:

--port <port>                 Port to listen on (default: 8080)
--data-dir <path>             Directory to store data (default: ./data)
--bootstrap <peers>           Comma-separated list of bootstrap peers
--debug                       Enable debug mode
--log-level <level>           Set log level (debug, info, warn, error)
--stun <servers>              Comma-separated list of STUN servers
--turn <servers>              Comma-separated list of TURN servers
--turn-username <username>    Username for TURN authentication
--turn-password <password>    Password for TURN authentication

Example:

furymesh start --port 8080 --bootstrap peer1.example.com:8080

Share

Share a file with the network:

furymesh share [options]

Options:

--file <path>         Path to the file to share
--encrypt             Encrypt the file before sharing
--chunk-size <size>   Size of each chunk in bytes (default: 1MB)

Example:

furymesh share --file /path/to/file.txt --encrypt

Download

Download a file from a peer:

furymesh download [options]

Options:

--file-id <id>        ID of the file to download
--peer-id <id>        ID of the peer to download from
--output <path>       Path to save the downloaded file
--multi-peer          Download from multiple peers
--max-peers <count>   Maximum number of peers to use (default: 5)
--strategy <strategy> Chunk selection strategy (rarest_first or round_robin)
--peers <peers>       Comma-separated list of specific peers to use

Example:

furymesh download --file-id abc123 --output /path/to/output --multi-peer

Resume

Resume an interrupted download:

furymesh resume [options]

Options:

--file-id <id>        ID of the file to resume
--output <path>       Path to save the downloaded file
--peer-id <id>        ID of the peer to download from
--multi-peer          Download from multiple peers
--max-peers <count>   Maximum number of peers to use (default: 5)

Example:

furymesh resume --file-id abc123 --multi-peer

Information Commands

List Files

List files being shared:

furymesh list-files [options]

Options:

--format <format>     Output format (table, json, csv)
--sort <field>        Sort by field (name, size, date)

Example:

furymesh list-files --format json

List Peers

List connected peers:

furymesh list-peers [options]

Options:

--format <format>     Output format (table, json, csv)
--sort <field>        Sort by field (id, files, last_seen)

Example:

furymesh list-peers --sort last_seen

Status

Show the status of transfers:

furymesh status [options]

Options:

--file-id <id>        Show status for a specific file
--verbose             Show detailed information
--format <format>     Output format (table, json, csv)

Example:

furymesh status --file-id abc123 --verbose

Stats

Show storage and network statistics:

furymesh stats [options]

Options:

--format <format>     Output format (table, json, csv)

Example:

furymesh stats --format json

Management Commands

Delete

Delete a file:

furymesh delete [options]

Options:

--file-id <id>        ID of the file to delete
--force               Force deletion without confirmation

Example:

furymesh delete --file-id abc123

Clean Resume

Clean up resume data:

furymesh clean-resume [options]

Options:

--file-id <id>        ID of the file to clean
--all                 Clean all resume data
--force               Force cleanup without confirmation

Example:

furymesh clean-resume --all

List Resume

List available resume data:

furymesh list-resume [options]

Options:

--format <format>     Output format (table, json, csv)

Example:

furymesh list-resume

Resume Info

Show detailed information about resume data:

furymesh resume-info [options]

Options:

--file-id <id>        ID of the file to show info for
--format <format>     Output format (table, json, csv)

Example:

furymesh resume-info --file-id abc123

Advanced Commands

Generate Key

Generate a new encryption key:

furymesh generate-key [options]

Options:

--size <bits>         Key size in bits (default: 2048)
--output <path>       Path to save the key

Example:

furymesh generate-key --size 4096 --output /path/to/key

Export

Export files or configuration:

furymesh export [options]

Options:

--files               Export list of shared files
--config              Export current configuration
--output <path>       Path to save the export
--format <format>     Output format (json, yaml)

Example:

furymesh export --files --output /path/to/export.json

Import

Import files or configuration:

furymesh import [options]

Options:

--files <path>        Import list of shared files
--config <path>       Import configuration

Example:

furymesh import --config /path/to/config.yaml

Examples

Basic Node Setup

# Start a node with default settings
furymesh start

# Start a node with custom settings
furymesh start --port 8080 --data-dir ./data --bootstrap peer1.example.com:8080

File Sharing

# Share a file
furymesh share --file /path/to/file.txt

# Share an encrypted file
furymesh share --file /path/to/file.txt --encrypt

File Downloading

# Download a file from a specific peer
furymesh download --file-id abc123 --peer-id xyz789 --output /path/to/output

# Download a file from multiple peers
furymesh download --file-id abc123 --multi-peer --output /path/to/output

# Download a file with a specific chunk selection strategy
furymesh download --file-id abc123 --multi-peer --strategy rarest_first --output /path/to/output

Managing Transfers

# Resume an interrupted transfer
furymesh resume --file-id abc123

# Check the status of a transfer
furymesh status --file-id abc123 --verbose

# Delete a file
furymesh delete --file-id abc123

Information Gathering

# List shared files
furymesh list-files

# List connected peers
furymesh list-peers

# Show storage statistics
furymesh stats