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.
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 |
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
Examples
filefortress setup
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]
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 |
Examples
filefortress init
filefortress init
filefortress init --non-interactive --code ABC123XYZ --name "Server-01"
filefortress --password mySecretPassword init --non-interactive --code ABC123XYZ --create-key-file ./my-key.key
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>
Parameters
Parameter | Description | Required | Example |
---|---|---|---|
--code |
New registration code obtained from your dashboard. | Yes | --code XYZ789ABC |
Examples
filefortress reinit --code XYZ789ABC
filefortress --password mySecretPassword reinit --code XYZ789ABC
filefortress --key-file ~/filefortress.key reinit --code XYZ789ABC
search - Search Files by Term
Fast, term-based search across your connected storage. Use this for quick searches where you know the term you’re looking for. For more advanced scenarios like saved queries or composing queries from other queries, see find query.
Syntax
filefortress search <term> [options]
Options
Option | Description | Example |
---|---|---|
--remote-name |
Filter by specific remote storage name or id | --remote-name "Google Drive" |
--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 or relative time | --modified-after "30 days" |
--media-type |
Filter by media type | --media-type image |
--exclude |
Patterns to exclude from search | --exclude "*.tmp,temp/*" |
--min-depth |
Minimum directory depth | --min-depth 1 |
--max-depth |
Maximum directory depth | --max-depth 5 |
--view |
Output format | --view summary|list|tree|json |
--save-to-file |
Save results to file | --save-to-file results.txt |
--case-sensitive-term |
Use case-sensitive matching for the search term | --case-sensitive-term |
--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 |
Metadata Filtering
The --meta
option supports powerful metadata predicates with these operators:
Operator | Description | Example |
---|---|---|
= |
Equals (exact match) | --meta "exif.cameraMake=Canon" |
!= |
Not equals | --meta "sharing.shared!=true" |
>=, >, <=, < |
Numeric/date comparisons | --meta "image.width>=1920" |
~= |
Contains (case-insensitive) | --meta "owner.email~=gmail.com" |
^= |
Starts with | --meta "hash.md5^=d128a6ef" |
$= |
Ends with | --meta "mime.type$=jpeg" |
in |
Value in pipe-separated list | --meta "exif.cameraMake in Canon|Nikon" |
exists |
Key exists (no value needed) | --meta "exif.cameraMake exists" |
Examples
filefortress search "report" --extensions pdf --view summary
filefortress search photos --media-type image --remote-name "Google Drive"
filefortress search budget --modified-after "30 days" --extensions xlsx,csv
filefortress search invoice --view list --save-to-file invoices.txt
filefortress search "IMG" --media-type image --meta "exif.cameraMake=Canon" --meta "exif.takenAt>=2020-01-01"
filefortress search "photo" --meta "image.width>=4000" --meta "image.height>=3000"
filefortress search "" --meta "hash.md5^=d128a6ef" --remote-type gdrive
filefortress search "backup" --remote-type backblaze --extensions tar,zip
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
filefortress device info
filefortress --password mySecret device info
filefortress --key-file ~/filefortress.key device info
filefortress device enable
filefortress --password mySecret device enable
filefortress device disable --confirm
filefortress --key-file ~/filefortress.key device disable --confirm
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
filefortress remotes add gdrive
filefortress --password mySecret remotes add gdrive
filefortress --key-file ~/filefortress.key remotes add s3 --non-interactive --access-key AKIA... --secret-key secret... --bucket my-bucket
filefortress remotes add backblaze
filefortress --password mySecret remotes add backblaze --non-interactive --key-id 0057d6e... --application-key K007...
filefortress remotes list
# With custom password: filefortress --password mySecret remotes list
# With key file: filefortress --key-file ~/filefortress.key remotes list
filefortress --key-file ~/filefortress.key remotes info "My Google Drive" --refresh
filefortress --password mySecret remotes scan "My Google Drive"
filefortress remotes info "My B2 Storage" --refresh
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
filefortress find query --extensions pdf --path-filter "*report*"
filefortress find query --size-min 10MB --modified-after "1 week"
filefortress find query --remote-name "Google Drive" --media-type image
filefortress find duplicates
filefortress find query --extensions docx,pdf --save-query "documents" --save-to-file docs.txt
filefortress find query --media-type image --meta "exif.cameraMake=Canon" --meta "exif.takenAt>=2020-01-01" --save-query "canon-photos-2020"
filefortress find query --meta "owner.email~=company.com" --meta "sharing.shared=false"
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 |
Examples
filefortress ls
filefortress ls "My GDrive:/Documents/Reports"
filefortress ls --recursive --long
filefortress ls --files-only --extensions pdf --sort size --reverse
filefortress ls --media-type image --modified-after "7 days" --view json --save-to-file images.json
filefortress ls
filefortress ls --non-interactive --view json
filefortress ls --media-type image --meta "exif.cameraMake=Canon" --meta "image.width>=4000" --long
filefortress ls --remote-type gdrive --extensions pdf,docx --sort size --reverse
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
filefortress update --check-only
filefortress update
filefortress update --version 1.2.3
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
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
filefortress feedback create --title "Search not working" --content "Search returns no results for existing files"
filefortress feedback create --title "Add file preview" --content "Would like to preview files before downloading"