____ ____ _
| _ \ __ _ ___ ___ | _ \ ___ ___ __| | ___ _ __
| | | / _` / __/ __| | |_) / _ \/ __/ _` |/ _ \ '__|
| |_| | (_| \__ \__ \ | _ < __/ (_| (_| | __/ |
|____/ \__,_|___/___/ |_| \_\___|\___\__,_|\___|_|
DriveDocs / gdocify — an open-source C# SDK and CLI tool for:
- uploading local files to Google Drive,
- converting
.docxto Google Docs, - assigning user permissions,
- generating shareable links.
- OAuth 2.0 authentication
- Upload
.docx→ Google Docs - Specify target folder on Google Drive
- Assign editor permissions to specific users
- Return a view/edit link
- Use as a library in any project or via CLI
git clone https://github.com/8981/DriveDocs.git
cd DriveDocs
dotnet restoredotnet add DriveDocs.Client package Google.Apis.Drive.v3 dotnet add DriveDocs.Client package Google.Apis.Auth
-
Create a project in Google Cloud Console
-
Enable the Google Drive API
-
Create an OAuth Client ID (Desktop App)
-
Download credentials.json and place it in the project root
dotnet run --project DriveDocs.Cli -- "C:\path\file.docx"
Example output: https://docs.google.com/document/d/1XxXxXxXxXx/edit
using DriveDocs.Client.Services;
var uploader = new DriveUploader();
var link = await uploader.UploadDocxAsync(
@"C:\Docs\Resume.docx",
"credentials.json",
"your-folder-id",
"example@email.com");
Console.WriteLine(link);
On first run, a browser window will open for OAuth authentication The token will be saved at: %APPDATA%\DriveDocsToken To re-authenticate, delete this folder
