A CLI and terminal-based Google Drive file browser built with Cobra and Bubble Tea.
- Go (1.25.6+) must be installed
- Google Cloud OAuth2 credentials are required
- Go to the Google Cloud Console Credentials page
- Create an OAuth 2.0 Client ID (type: "Desktop app")
- Enable the Google Drive API in your Google Cloud project
- Download the credentials JSON file
- Save it to
~/.config/storage/credentials.json
# Build the binary
go build -o storage ./cmd/storage/
# Or run directly with go run
go run ./cmd/storage/ <command># Launch the interactive TUI file browser
storage tui
# List files in your Drive root
storage list
# List files in a specific folder
storage list <folder-id>
# Show help
storage --helpOn the first run, the app will:
- Print an authorization URL to the terminal
- You open that URL in your browser and grant Google Drive read-only access
- The browser redirects to
http://127.0.0.1:9874/callback - A token is cached at
~/.config/storage/token.jsonfor future runs
| Key | Action |
|---|---|
j / Down |
Move cursor down |
k / Up |
Move cursor up |
Enter / l |
Enter a folder |
Backspace / h |
Go back to parent |
q / Ctrl+C |
Quit |
storage/
├── cmd/storage/ # Entry point
├── pkg/
│ ├── core/ # Domain types, Backend interface, FileService
│ ├── storage/gdrive/ # Google Drive backend implementation
│ └── auth/ # Google OAuth2 authentication
├── internal/
│ ├── cli/ # Cobra commands (root, list, tui)
│ └── tui/ # Bubble Tea interactive file browser
MIT