Video series · 19 parts
Building a CLI that syncs code projects to Google Drive: OAuth, the Drive API, concurrent uploads, a custom .gitignore parser and an incremental sync algorithm.

I build a Google Drive syncer in Go, starting with the Google Cloud Console and OAuth setup so I can back up local coding projects to Drive as a second backup alongside GitHub. After losing unpushed local changes when…

I build a config-driven Google Drive syncer in Go, cleaning up the entry point and adding a reusable Drive struct plus JSON configuration for deciding which project folders and files get uploaded. I refactor the OAuth…

I implement the upload side of my Google Drive sync tool in Go, creating folders on Drive and uploading every file from a configured local folder into them. I build an uploadFolder function that creates a project…

I add subfolder support and duplicate-folder handling to my Google Drive project syncer, so re-syncing a project replaces the old Drive folder instead of creating duplicates and preserves nested folder structure. I use…

I add .gitignore-aware filtering to my Google Drive sync tool so it skips secrets and build artifacts during upload. I build a readGitIgnore function that opens each project's .gitignore, scans it line by line with…

I add automatic OAuth token refreshing to my Google Drive syncer so I can stop manually reauthorizing every time an access token expires. I build a testAccess check around a tiny drive.files.list call with pageSize 1…

Before building the CLI for my Drive syncer, I spend this session reorganizing the codebase, moving everything out of main.go and sync.go into proper Go packages: internal/models for shared structs, auth for OAuth…

I set up a Cobra CLI for my Go Google Drive syncer so I can run commands like go run . sync instead of hard-coding uploads in main.go. I install Cobra, create a cmd package with a root command, define an Execute…

I make the DriveSyncer upload multiple Google Drive projects concurrently and add live per-project progress bars. I move each folder upload into a goroutine, use a sync.WaitGroup to run all projects simultaneously, and…

I start building a more efficient Google Drive sync algorithm that stops deleting and reuploading an entire project folder on every sync, and I fix the upload progress bars so they reliably reach 100%. I fix the…

To stop my Drive syncer from uploading duplicate files, I build the mapping between local project folders and their Google Drive counterparts. I write a walkProjectTree function in Go that recursively walks the entire…

I build a shouldUpload method into the DriveSyncer tracker so my Google Drive sync only uploads files whose local checksum differs from the remote checksum, and skips unchanged files entirely. I show how the sync…

I implement overwriting existing files in my Google Drive sync algorithm so modified local files update on Drive instead of creating duplicate uploads. In the uploadFile function in api/sync.go, I query Drive by file…

Ghost files are files you've deleted from your local project that still sit on Google Drive taking up space, and I fix that by collecting every local file and folder path during the upload walk, then comparing them…

I fix the bugs I introduced in the DriveSyncer project before moving on: projectExists now checks the folder name instead of matching any folder under the programming parent, I silence the noisy project-tree logs, and…

I build a custom .gitignore parser in Go for my DriveSyncer project so it can decide which files and folders to skip when uploading projects to Google Drive. I create ignore.go with a GitIgnore struct and an…

I build the shouldIgnore() function for my custom Gitignore parser in Go, which decides whether DriveSinker should upload a file, ignore a file, or skip an entire directory. I convert absolute paths to relative paths…

I connect my custom gitignore parser to the DriveSyncer sync algorithm, replacing the old string-based ignore list with a GitIgnore struct that exposes shouldIgnore. I refactor countTotalFiles and uploadFolder to stop…

I build a minimal temporary web server that handles Google OAuth callbacks on localhost:8998 so I can stop copying authorization codes from the broken localhost redirect page. I update the redirect URI in client.json…


Dude, you’re at the bottom of my landing page.
Just book a call already if you’re that interested.
You scrolled all the way here.