Command Reference
Complete reference for all FileFortress CLI commands

This page provides detailed documentation for all available FileFortress CLI commands. Each command includes syntax, parameters, options, and usage examples.

Command Syntax

All commands follow the pattern: filefortress [global-options] [command] [subcommand] [options]

Use filefortress --help or filefortress [command] --help for quick help.

Global Options

These options can be used with any command and must be specified before the command name.

Option Description Example
--password Password for database encryption (required if you set a custom password during init) filefortress --password mySecret remotes list
--key-file Path to private key file containing the password (alternative to --password) filefortress --key-file ~/filefortress.key remotes list
Password Authentication

FileFortress supports two authentication modes:

  • Automatic Encryption (Default): Uses machine-specific encryption, no password required
  • Custom Password: Uses your custom password, must provide --password or --key-file with every command

You cannot use both --password and --key-file options simultaneously.

init - Initialize Device

Register your device with FileFortress and set up the local configuration.

Syntax

filefortress init [--code <registration_code>] [options]
filefortress init --interactive [options]

Required Parameters

Parameter Description Example
--code Registration code from your dashboard (required in non-interactive mode) --code ABC123XYZ

Mode Options

Parameter Description Default
--interactive Run in interactive mode with guided prompts false
--format Output format (table, json) table

Optional Parameters

Parameter Description Default
--name Custom name for this device Computer name
--type Device type (desktop, mobile, server, laptop, tablet) desktop
--create-key-file File or folder path where to create a private key file (only valid with global --password option) None
Password Setup

When using the global --password option during initialization, you can also specify --create-key-file to automatically create a private key file. This allows you to use --key-file instead of typing your password for future commands.

Examples

Interactive initialization (recommended for beginners):
filefortress init --interactive
Guided setup with prompts for all options. No registration code needed upfront - you'll be prompted for it.
Basic initialization (automatic encryption):
filefortress init --code ABC123XYZ
Uses automatic encryption mode - no password required for future commands.
Custom device setup:
filefortress init --code ABC123XYZ --name "My Work Laptop" --type laptop
Registers with a custom name and specific device type.
Initialize with custom password:
filefortress --password mySecretPassword init --code ABC123XYZ
Sets up a user-defined password for enhanced security. You'll need to provide --password for all future commands.
Initialize with password and create key file:
filefortress --password mySecretPassword init --code ABC123XYZ --create-key-file ./my-key.key
Creates a private key file so you can use --key-file instead of typing the password each time.
Interactive with JSON output:
filefortress init --interactive --format json
Interactive setup with machine-readable JSON output for automation scripts.
Auto-generate key file:
filefortress --password mySecretPassword init --code ABC123XYZ --create-key-file
Creates a key file with an auto-generated name in the current directory.
Security Recommendations
  • Use automatic encryption mode for personal devices where convenience is preferred
  • Use custom password mode when you need to access data from multiple devices
  • Always create a key file when using custom passwords to avoid typing the password repeatedly
  • Store key files securely and back them up safely

device - Device Management

Manage device information and registration status.

Available Subcommands

device info - Show device information

Display information about the current device and user account.

filefortress device info

Shows device ID, name, type, registration status, user information, and local configuration.

Examples

View device information (automatic encryption):
filefortress device info
Shows comprehensive device and user information using automatic encryption mode.
View device information (with password):
filefortress --password mySecret device info
Shows device information when using custom password mode.
View device information (with key file):
filefortress --key-file ~/filefortress.key device info
Shows device information using a private key file.

remotes - Manage Cloud Storage

Manage connections to cloud storage providers like Google Drive, OneDrive, and Amazon S3.

Available Subcommands

remotes add - Add new cloud storage

Add a new cloud storage provider with provider-specific subcommands.

filefortress remotes add gdrive [--name "name"] [--reconfigure]
filefortress remotes add onedrive [--name "name"] [--reconfigure]
filefortress remotes add s3 [--interactive | --access-key KEY --secret-key SECRET] [options]

Supports: Google Drive, OneDrive, and Amazon S3.

For Amazon S3, you can run in interactive mode (--interactive) to be prompted for credentials and select buckets from a list, or provide credentials directly for non-interactive use.

remotes list - List connected storage

Display all connected cloud storage accounts.

filefortress remotes list

Shows name, type, creation date, and last update time for each remote.

remotes show - Show remote details

Display detailed information about a specific remote.

filefortress remotes show <remote_name>
remotes info - Comprehensive remote information

Display comprehensive storage information including usage statistics.

filefortress remotes info <remote_name> [--refresh] [--format table|json]

Shows account details, storage statistics, scan status, and cached vs live data.

remotes remove - Remove cloud storage

Remove a connected cloud storage account.

filefortress remotes remove <remote_name>

Requires confirmation unless cancelled.

remotes scan - Scan for files

Scan connected storage for files and update the index.

filefortress remotes scan <remote_name>

Fetches file information from the specified remote storage.

remotes enrich - Enrich file metadata

Enhance file metadata with additional information like file hashes.

filefortress remotes enrich [--query-name "query_name"]

Can be limited to files matching a specific stored query.

Common Usage Examples

Add Google Drive (automatic encryption):
filefortress remotes add gdrive
Follow the interactive prompts to connect Google Drive.
Add Google Drive (with password):
filefortress --password mySecret remotes add gdrive
Connect Google Drive when using custom password mode.
Add Amazon S3 (with key file):
filefortress --key-file ~/filefortress.key remotes add s3 --access-key AKIA... --secret-key secret... --bucket my-bucket
Connects to a specific S3 bucket using a private key file for authentication.
List all connected storage:
filefortress remotes list
# With custom password: filefortress --password mySecret remotes list
# With key file: filefortress --key-file ~/filefortress.key remotes list
Shows all remotes with basic information using different authentication methods.
Get comprehensive storage info:
filefortress --key-file ~/filefortress.key remotes info "My Google Drive" --refresh
Shows detailed storage usage and statistics with fresh data using key file authentication.
Scan specific remote:
filefortress --password mySecret remotes scan "My Google Drive"
Scans the specified Google Drive account for files using password authentication.

find - Search Files

Search for files across all connected cloud storage providers using various criteria.

Available Subcommands

find query - Search by text and criteria

Search files using various filters and criteria.

filefortress find query [options]
Search Options
Option Description Example
--remote-name Filter by specific remote storage name --remote-name "Google Drive"
--path-filter Filter files by path pattern --path-filter "*.pdf"
--extensions Filter by file extensions --extensions pdf,docx,txt
--size-min Minimum file size --size-min 1MB
--size-max Maximum file size --size-max 100MB
--modified-after Files modified after date --modified-after "2 days"
--media-type Filter by media type --media-type image
--view Output format --view summary|list|tree|json
--save-query Save query for reuse --save-query "my-search"
--save-to-file Save results to file --save-to-file results.txt
--exclude Patterns to exclude from search --exclude "*.tmp,temp/*"
--min-depth Minimum directory depth --min-depth 2
--max-depth Maximum directory depth --max-depth 5
--fixed Create fixed selection that won't update --fixed
--base-query Use results of another query as base --base-query "my-search"
find duplicates - Find duplicate files

Find duplicate files across all connected storage using various methods.

filefortress find duplicates [--save-query "query_name"]

Finds duplicates by name/size and by hash comparison for exact duplicates.

Search Examples

Search PDF files:
filefortress find query --extensions pdf --path-filter "*report*"
Finds PDF files with "report" in the filename.
Large files modified recently:
filefortress find query --size-min 10MB --modified-after "1 week"
Finds files larger than 10MB modified in the last week.
Search specific cloud storage:
filefortress find query --remote-name "Google Drive" --media-type image
Searches only in Google Drive for image files.
Find duplicate files:
filefortress find duplicates
Finds all duplicate files using both name/size and hash comparison.
Save query results:
filefortress find query --extensions docx,pdf --save-query "documents" --save-to-file docs.txt
Searches for documents, saves the query, and exports results to file.

update - Update CLI

Update the FileFortress CLI to the latest version.

filefortress update [options]

Options

Option Description Default
--check-only, -c Check for updates without installing false
--force, -f Force update even if already latest version false
--version, -v Specify version to update to latest

Examples

Check for updates:
filefortress update --check-only
Checks if a newer version is available without installing.
Update to latest version:
filefortress update
Downloads and installs the latest stable version.
Update to specific version:
filefortress update --version 1.2.3
Updates to a specific version.

config - Manage Configuration

Manage CLI configuration settings and preferences.

Available Subcommands

config list - List all settings

Display all configuration settings and their current values.

filefortress config list
config get - Get specific setting

Get the value of a specific configuration setting.

filefortress config get <key>
config set - Set configuration value

Set a configuration value.

filefortress config set <key> <value>
config delete - Delete setting

Delete a configuration setting (revert to default).

filefortress config delete <key>

Common Configuration Settings

Setting Description Default
output.format Default output format for commands table
search.limit Default number of search results 25
scan.auto Automatically scan remotes periodically true
logging.level Logging verbosity level info

Examples

Set default search limit:
filefortress config set search.limit 50
Change output format to JSON:
filefortress config set output.format json
View all settings:
filefortress config list
Get specific setting:
filefortress config get output.format

feedback - Submit Feedback

Submit feedback, bug reports, or feature requests directly from the CLI.

Available Subcommands

feedback create - Submit new feedback

Submit new feedback, bug report, or feature request.

filefortress feedback create --title "Title" --content "Content"
feedback list - List your feedback

List all feedback you've submitted.

filefortress feedback list [--include-archived]
feedback show - Show feedback details

Show detailed information about specific feedback.

filefortress feedback show <feedback_id>

Examples

Submit a bug report:
filefortress feedback create --title "Search not working" --content "Search returns no results for existing files"
Request a feature:
filefortress feedback create --title "Add file preview" --content "Would like to preview files before downloading"
List your feedback:
filefortress feedback list
View specific feedback:
filefortress feedback show 12345678-1234-1234-1234-123456789012