Overview
GDrive Ingest features a beautiful interactive CLI with arrow key navigation, live progress bars, and color-coded output. This guide covers all interactive features and keyboard controls.Interactive Folder Browser
Launching Interactive Mode
Run the script without the--folder flag:
Keyboard Controls
Navigation Examples
Special Options
Create New Folder
At the root level:Select Current Folder
When inside a folder:Enter to upload to the current folder (not a subfolder).
Type Folder Name or ID
At the root level:Live Progress Indicators
Download Progress Bar
Real-time download progress with percentage:- Live percentage updates
- Visual bar graph
- Updates every 100ms
- ASCII-safe (works in any terminal)
Upload Progress with Spinner
Uploads show a spinner with file size:Cover Art Upload
Color-Coded Output
Color Meanings
- Status Colors
- Text Styles
| Color | Used For | Example |
|---|---|---|
| 🔴 Red | Errors, failures | ✗ Upload failed |
| 🟢 Green | Success, checkmarks | ✓ Download complete |
| 🟡 Yellow | Warnings, downloads | ⬇ Downloading... |
| 🔵 Blue | Info, metadata | 🔐 MD5: 6d2300f6... |
| 🟣 Magenta | Headers, music info | 💿 Artist - Album |
| 🔷 Cyan | Progress, actions | Organizing files... |
Example Output
Usage Modes
Interactive Mode (No —folder flag)
- Arrow key navigation
- Browse nested folders
- Create folders on the fly
- Visual folder tree
- Exploring your Drive structure
- One-off uploads
- Organizing files manually
Command-Line Mode (With —folder flag)
- Skips interactive browser
- Direct upload to specified folder
- Creates folder if it doesn’t exist
- Faster for automation
- Automation scripts
- Batch processing
- Known destination folders
Debug Mode
- Shows commands without executing
- Displays API queries
- Shows duplicate checks
- No actual upload occurs
- Testing configuration
- Troubleshooting issues
- Understanding script behavior
Example Interactive Session
Technical Details
Terminal Controls
| Feature | Implementation | Purpose |
|---|---|---|
| Cursor hiding | tput civis | Clean UI without flicker |
| Cursor showing | tput cnorm | Restored on exit |
| ANSI colors | Escape codes | Color-coded output |
| Raw input | read -rsn1 | Single keypress detection |
| Cleanup trap | trap cleanup EXIT | Ensures cursor restored |
Progress Implementations
Download progress:- Parses curl output in real-time
- Extracts percentage from progress bar
- Updates display every 100ms
- Background curl process
- Foreground spinner animation
- PID monitoring with
kill -0
Navigation Logic
Recursive folder browsing:- Fetch all folders (single API call)
- Filter by parent ID
- Display current level
- Track navigation history
- Return to parent on
←
- Special handling for root-level folders
- Different options at root vs nested levels
Pro Tips
Quick Navigation
Use
→ to dive deep, ← to go back quicklyAutomation
Use
--folder flag for scripts and automationExploration
Omit
--folder to browse interactivelyCreate on Fly
Select “Create new folder” to organize as you go
Visual Feedback
Watch spinners to confirm uploads are working
Debug First
Test with
--debug before actual uploadsNext Steps
Usage Examples
See real-world usage patterns
File Organization
Understand how files are organized
Troubleshooting
Fix common issues
Setup Guide
Configure the script