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.

Interactive by Default

Most FileFortress commands run in interactive mode by default for the best user experience. Use --non-interactive when you need scripted or automated usage. This applies to commands like init, ls, remotes add, remotes info, and others.

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.

setup - Complete Interactive Setup

Recommended for new users! This command provides a complete onboarding experience: initializes your device, connects a cloud storage provider, and scans your files - all in one interactive session.

Syntax

filefortress setup [options]

What this command does

Device Initialization
Prompts for your registration code and initializes your device with FileFortress
Security Setup
Asks if you want to set up a custom password (recommended) and optionally creates a key file for convenience
Cloud Storage Selection
Lets you choose and connect Amazon S3, Google Drive, OneDrive, or Backblaze B2
Initial File Scan
Automatically scans your connected storage to build the search index
Why use setup instead of individual commands?
  • Streamlined onboarding experience
  • No need to remember multiple commands
  • Ensures proper configuration order
  • Immediate verification that everything works

Examples

Complete interactive setup for new users:
filefortress setup
Starts the interactive setup process. You'll be guided through device initialization, password setup (optional but recommended), cloud storage connection (Amazon S3, Google Drive, OneDrive, or Backblaze B2), and initial scanning. During the interactive session, you can choose whether to set up a custom password and key file.

init - Initialize Device Only

Register your device with FileFortress and set up the local configuration. Note: For new users, consider using the setup command instead for a complete onboarding experience.

Syntax

filefortress init [--code <registration_code>] [options]
filefortress init --non-interactive [--code <registration_code>] [options]
Interactive by Default

The init command runs in interactive mode by default for the best user experience. Use --non-interactive when you need scripted or automated usage.

Mode Options

Parameter Description Default
--non-interactive Run in non-interactive mode (requires --code) false
--quiet Suppress progress messages in script mode false

Parameters

Parameter Description Required Example
--code Registration code from your dashboard (required in non-interactive mode, prompted in interactive mode) In non-interactive mode --code ABC123XYZ
--name Device name (optional in both modes, will be prompted in interactive mode) Optional --name "My Laptop"

Additional Optional Parameters

Parameter Description Default
--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):
filefortress init
Guided setup with prompts for all options. This is the easiest and most user-friendly way to get started.
Interactive setup with pre-filled options:
filefortress init
The interactive session will guide you through all setup steps, including device name, registration code, and security options.
For scripting/automation:
filefortress init --non-interactive --code ABC123XYZ --name "Server-01"
Non-interactive mode for automated scripts. Useful for setting up multiple devices with specific names.
Initialize with custom password (non-interactive):
filefortress --password mySecretPassword init --non-interactive --code ABC123XYZ --create-key-file ./my-key.key
Sets up a user-defined password and creates a key file for convenient authentication in future commands.
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

reinit - Re-initialize Device

Re-register this device with FileFortress using a new registration code. This is useful if you have accidentally removed the device from the web portal.

Syntax

filefortress reinit --code <new_registration_code>
Important Note

This command requires access to your existing local configuration. If you have a custom password set, you must provide it using the global --password or --key-file option.

The command will re-use your existing device name and type; it does not change your security settings (password or encryption mode).

Parameters

Parameter Description Required Example
--code New registration code obtained from your dashboard. Yes --code XYZ789ABC

Examples

Re-initialize with a new code (automatic encryption):
filefortress reinit --code XYZ789ABC
Re-registers the device when you are using the default, machine-specific encryption.
Re-initialize with a new code (custom password):
filefortress --password mySecretPassword reinit --code XYZ789ABC
Re-registers the device when you have a custom password set for your local database.
Re-initialize using a key file:
filefortress --key-file ~/filefortress.key reinit --code XYZ789ABC
Re-registers the device using a private key file for authentication.

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.

device enable - Enable device

Enable this device for FileFortress operations.

filefortress device enable

Enables the device, allowing it to perform FileFortress operations like scanning, searching, and remote management. Use this command if your device was previously disabled.

device disable - Disable device

Disable this device and block most FileFortress operations.

filefortress device disable --confirm

Disables the device, blocking most operations until re-enabled. Requires the --confirm flag for safety.

Options
Option Description Required
--confirm Confirm that you want to disable this device Yes

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.
Enable device:
filefortress device enable
Enabbles the device for FileFortress operations. Use this if your device was previously disabled.
Enable device (with password):
filefortress --password mySecret device enable
Enables the device when using custom password mode.
Disable device:
filefortress device disable --confirm
Disables the device and blocks most operations. The --confirm flag is required for safety.
Disable device (with key file):
filefortress --key-file ~/filefortress.key device disable --confirm
Disables the device when using a private key file for authentication.

remotes - Manage Cloud Storage

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

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 [--non-interactive --access-key KEY --secret-key SECRET] [options]
filefortress remotes add backblaze [--non-interactive --key-id ID --application-key KEY] [options]

Supports: Google Drive, OneDrive, Amazon S3, and Backblaze B2.

All commands run in interactive mode by default for the best user experience. Use --non-interactive for scripted or automated setup with pre-provided credentials.

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 (by name or id).

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

Display comprehensive storage information including usage statistics.

filefortress remotes info <remote_name_or_id> [--refresh]

Shows account details, storage statistics, scan status, and cached vs live data. Supports Google Drive, OneDrive, Amazon S3, and Backblaze B2. Runs in interactive mode by default for better data exploration.

remotes remove - Remove cloud storage

Remove a connected cloud storage account.

filefortress remotes remove <remote_name_or_id>

Requires confirmation unless cancelled.

remotes scan - Scan for files

Scan connected storage for files and update the index.

filefortress remotes scan <remote_name_or_id>

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:
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 (scripted setup):
filefortress --key-file ~/filefortress.key remotes add s3 --non-interactive --access-key AKIA... --secret-key secret... --bucket my-bucket
Connects to a specific S3 bucket in non-interactive mode using a private key file for authentication.
Add Backblaze B2:
filefortress remotes add backblaze
Follow the interactive prompts to connect Backblaze B2.
Add Backblaze B2 (scripted setup):
filefortress --password mySecret remotes add backblaze --non-interactive --key-id 0057d6e... --application-key K007...
Connects to Backblaze B2 in non-interactive mode using Application Key ID and Application Key.
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.
Get Backblaze B2 storage info:
filefortress remotes info "My B2 Storage" --refresh
Shows detailed Backblaze B2 storage information including account ID, bucket count, and total file size.

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 or id --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"
--meta Filter files by metadata predicates --meta "exif.cameraMake=Canon"
--remote-type Filter by remote storage type (gdrive, onedrive, s3, backblaze) --remote-type gdrive
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.
Find photos by camera and date:
filefortress find query --media-type image --meta "exif.cameraMake=Canon" --meta "exif.takenAt>=2020-01-01" --save-query "canon-photos-2020"
Finds Canon photos taken after 2020 and saves the query for reuse.
Search by file ownership:
filefortress find query --meta "owner.email~=company.com" --meta "sharing.shared=false"
Finds unshared files owned by company email addresses.

ls - List Files and Folders

List files and folders in your connected storage, similar to the 'ls' command in Unix-like systems. Supports flexible formatting, sorting, and filtering. Also includes an interactive explorer mode.

Syntax

filefortress ls [path] [options]

Arguments

Argument Description
path Optional path to list. Can be a local-style path or a remote path in the format remote-name:/path/to/folder. If omitted, lists root of all remotes.

Display & Sorting Options

Option Description Example
--long Long listing format (includes size, modified time, extension, remote). --long
--one One entry per line (names only). --one
--sort Sort by: name, size, time, ext, remote. --sort size
--reverse Reverse the sort order. --reverse

Filtering & Traversal Options

Option Description Example
-R, --recursive List files in subdirectories recursively. --recursive
--max-depth Maximum directory depth for recursion. --max-depth 2
--min-depth Minimum directory depth. --min-depth 1
--files-only Show only files. --files-only
--folders-only Show only folders. --folders-only
--remote-name Filter by a specific remote storage name or id. --remote-name "Google Drive"
--extensions Filter by file extensions. --extensions pdf,docx
--size-min Minimum file size. --size-min 1MB
--size-max Maximum file size. --size-max 100MB
--modified-after Filter files modified after a date or relative time. --modified-after "7 days"
--media-type Filter by media type (e.g., image, video, audio, document). --media-type image
--exclude Patterns to exclude from the listing. --exclude "*.tmp,cache/*"
--meta Filter files by metadata predicates (format: "key operator value"). --meta "image.width>=1920"
--remote-type Filter by remote storage type (gdrive, onedrive, s3, backblaze). --remote-type gdrive

Pagination Options

Option Description Example
--page Page number for paginated results (1-based). --page 2
--page-size Number of items per page. --page-size 50

Output & View Options

Option Description Example
--view Output format. Can be list (default), summary, tree, or json. --view json
--save-to-file Save results to a file. --save-to-file listing.txt
Interactive Explorer Mode

Run filefortress ls to launch a terminal-based file explorer. This mode allows you to navigate your remotes, preview file details, and change view options on the fly. Use --non-interactive for script-friendly output.

Examples

List root of all remotes:
filefortress ls
List contents of a specific remote and path:
filefortress ls "My GDrive:/Documents/Reports"
Recursive listing with long format:
filefortress ls --recursive --long
List only PDF files, sorted by size (largest first):
filefortress ls --files-only --extensions pdf --sort size --reverse
List images modified in the last week and save to JSON file:
filefortress ls --media-type image --modified-after "7 days" --view json --save-to-file images.json
Start the interactive file explorer:
filefortress ls
Launches the interactive file explorer.
Script-friendly listing:
filefortress ls --non-interactive --view json
Non-interactive mode with structured output for scripting.
List Canon photos with high resolution:
filefortress ls --media-type image --meta "exif.cameraMake=Canon" --meta "image.width>=4000" --long
List files by specific remote type:
filefortress ls --remote-type gdrive --extensions pdf,docx --sort size --reverse
List Backblaze B2 backup files:
filefortress ls --remote-type backblaze --extensions tar,zip,gz --sort time --reverse

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

Examples

View all settings:
filefortress config list

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"

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"