sadrive.cli module#
sadrive CLI Entrypoint
Main command-line interface for the SA-Drive application, managing cloud storage uploads, downloads, navigation, and service account configuration using Google Drive.
Commands are modularly registered from submodules and grouped into the sadrive command.
- Behavior:
On every invocation (except config set-dir), validates that a config directory has been set and initializes the rclone config if missing.
Delegates to subcommands such as upload, navigate, search, delete, share, etc.
- Subcommands:
config: Configure SA-Drive environment (set or show config path)
update_sas: Synchronize service account usage with DB
upload: Upload a file or directory to SA-Drive
navigate: Browse remote Drive structure
mount: Mount SA-Drive using gclone
delete: Delete a specific file or folder from Drive and DB
clearall: Wipe all Drive contents across accounts
newfolder: Create a folder in SA-Drive
download: Download a file or folder using gclone
rebuild: Reconstruct a .sapart split file
share: Share a file/folder via link
rename: Rename a file/folder on Drive
open-link: Open a file/folder in browser
search: Fuzzy or strict search for files
details: Show storage usage by each service account
- Usage:
sadrive <subcommand> [options]
Example
sadrive upload ~/Videos/movie.mp4
- sadrive.cli.get_config_dir()#