A web application to edit text files from Google Drive with a powerful code editor - without giving full Drive access to third-party apps.
- 🔒 Minimal Permissions - Only accesses files you explicitly open (
drive.filescope) - ✨ Monaco Editor - Same editor as VS Code with syntax highlighting
- 📁 File Browser - Navigate your Google Drive folders
- 🔍 Search - Find files quickly
- ⌨️ Keyboard Shortcuts -
Cmd/Ctrl+Sto save - 🌙 Dark Theme - Easy on the eyes
txt, md, json, js, ts, py, html, css, xml, yaml, sh, sql, go, rust, java, and more
cd drive-text-editor
npm installCopy the example env file:
cp .env.example .envEdit .env with your credentials:
VITE_GOOGLE_CLIENT_ID=your_client_id_here
VITE_GOOGLE_API_KEY=your_api_key_here
-
Go to Google Cloud Console
-
Create a new project (or select existing)
-
Enable the Google Drive API:
- Go to APIs & Services > Library
- Search for "Google Drive API" and enable it
-
Create OAuth Credentials:
- Go to APIs & Services > Credentials
- Click "Create Credentials" > "OAuth client ID"
- Select "Web application"
- Add authorized JavaScript origin:
http://localhost:5173 - Copy the Client ID
-
Update the app with your Client ID:
Open
src/App.jsxand replace:const GOOGLE_CLIENT_ID = 'YOUR_CLIENT_ID.apps.googleusercontent.com';
with your actual Client ID.
npm run devOpen http://localhost:5173 in your browser.
- Click Sign in with Google
- Grant permission (only for files you open in this app)
- Browse or search for a text file
- Edit the file using the Monaco editor
- Click Save or press
Cmd/Ctrl+S
- React + Vite - Fast development
- Monaco Editor - Industry-standard code editing
- Google Identity Services - Secure OAuth 2.0
- Google Drive API v3 - File operations
# Start dev server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewMIT