Skip to content

Google Drive Sync Setup

Quick setup guide to connect this repo with your Google Drive.

Prerequisites

✅ rclone installed (already done via brew install rclone)

Setup Steps

1. Run rclone Configuration

rclone config

2. Follow the Wizard

n) New remote
name> nutrieapp
Storage> drive
(or type "drive" and press Enter)
client_id> (press Enter - use default)
client_secret> (press Enter - use default)
scope> 1
(Full access - needed for read/write)
service_account_file> (press Enter - not needed)
Edit advanced config? (y/n)> n
Use auto config? (y/n)> Y
(This will open a browser window)

Browser opens: 1. Log in with your Google account 2. Click "Allow" to grant rclone access 3. Return to terminal

Configure this as a Shared Drive (Team Drive)? (y/n)> n
y) Yes this is OK (default)
q) Quit config

3. Create Google Drive Folder Structure

Open Google Drive in your browser and create:

My Drive/
└── Nutri-E Sync/
    ├── input/
    ├── output/
    ├── screenshots/
    └── generated/

Alternative: Create via CLI

rclone mkdir "nutrieapp:Nutri-E Sync/input"
rclone mkdir "nutrieapp:Nutri-E Sync/output"
rclone mkdir "nutrieapp:Nutri-E Sync/screenshots"
rclone mkdir "nutrieapp:Nutri-E Sync/generated"

4. Test the Connection

# List remotes
rclone listremotes

# Should show:
# nutrieapp:

# List folders
rclone lsd nutrieapp:

# Should show your Google Drive folders

# List Nutri-E Sync contents
rclone ls "nutrieapp:Nutri-E Sync"

# Should show the 4 subfolders

5. Test Sync

# Create a test file
echo "Hello from Claude Code!" > gdrive-sync/input/test.txt

# Push to Google Drive
./scripts/gdrive-push.sh

# Verify in Google Drive
rclone ls "nutrieapp:Nutri-E Sync/input"

# Should show test.txt

You're Done!

Now you can:

Upload from anywhere: - Phone → Google Drive → ./scripts/gdrive-pull.sh → Local files

Claude Code uploads: - Local files → ./scripts/gdrive-push.sh → Google Drive → Access anywhere

Bidirectional sync: - ./scripts/gdrive-sync.sh → Keeps everything in sync

Troubleshooting

Browser doesn't open

Problem: Use auto config? (y/n)> Y doesn't open browser

Solution: Use manual auth instead:

Use auto config? (y/n)> n
Follow the URL shown, copy the auth code, paste back in terminal

Permission denied errors

Problem: "Access denied" when syncing

Solution: Check that you granted "Full access" (scope 1) during setup

Re-run config:

rclone config reconnect nutrieapp:

Can't find remote

Problem: rclone listremotes shows nothing

Solution: You're in the wrong account or config wasn't saved. Re-run:

rclone config

Security Notes

Where credentials are stored: - File: ~/.config/rclone/rclone.conf - Encrypted OAuth tokens - Only accessible on this machine - Not in git repository

Revoking access: 1. Go to https://myaccount.google.com/permissions 2. Find "rclone" 3. Click "Remove access"

Next Steps

See README.md for: - Daily usage workflows - Integration with Claude Code - Advanced sync options - File size limits and security