explaingit

astrada/google-drive-ocamlfuse

5,923OCamlAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

A Linux tool that mounts your Google Drive as a regular local folder so any program can read and write Drive files the same way it would use a hard drive, no browser required after the first login.

Mindmap

mindmap
  root((repo))
    What it does
      Mount Drive as folder
      Read and write files
      Linux FUSE filesystem
    File access
      Regular files
      Google Docs read-only
      Trash folder
    Setup
      Browser authorization
      Ubuntu PPA package
      Build from source
    Features
      Multiple accounts
      Team Drives
      Symbolic links
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Mount Google Drive on a Linux server so automated scripts can read and write files without a browser.

USE CASE 2

Access Google Drive from the Linux command line to move, copy, or process files with standard shell tools.

USE CASE 3

Set up two Google accounts as separate mount points and work with both simultaneously from the terminal.

Tech stack

OCamlFUSE

Getting it running

Difficulty · moderate Time to first run · 30min

First run opens a browser for Google account authorization, Drive changes may take up to 60 seconds to appear in the mounted folder.

In plain English

google-drive-ocamlfuse is a Linux tool that lets you mount your Google Drive account as a local folder, so you can browse and work with your Drive files the same way you would with any folder on your computer. Rather than opening a web browser or using a separate application to upload and download files, you get a regular directory that your other programs can read from and write to directly. FUSE stands for Filesystem in Userspace, a standard Linux mechanism for creating virtual filesystems without needing administrator-level kernel changes. This tool uses that mechanism to make Google Drive appear as a mounted volume, similar to how an external USB drive or a network share appears. It supports full read and write access to regular files and folders. Google Docs, Sheets, and Slides are available as read-only and are exported to configurable file formats when accessed. Other features include support for multiple Google accounts, symbolic links, access to your Drive trash folder, and compatibility with shared content and Team Drives. First-time setup involves running the tool without any arguments, which opens a web browser to authorize it with your Google account. After that, you create a local directory and mount Drive into it with a single command. Unmounting works with the standard Linux fusermount command. Multiple accounts can each have their own mount point and configuration directory. The tool is written in OCaml and is available as a pre-built package for Ubuntu through a PPA, or can be built from source. Google Drive changes are not reflected instantly in the mounted folder, as the tool checks for updates from the server roughly every 60 seconds.

Copy-paste prompts

Prompt 1
Walk me through mounting my Google Drive as a local folder on Ubuntu using google-drive-ocamlfuse, from installing the PPA to running the first mount command.
Prompt 2
I want to use google-drive-ocamlfuse in a Linux cron job that syncs files from Google Drive to a local folder every night, show me how to authorize it non-interactively and write the cron entry.
Prompt 3
How do I mount two different Google accounts as separate local folders at the same time using google-drive-ocamlfuse?
Open on GitHub → Explain another repo

← astrada on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.