@anymux/google-drive
v0.1.0
Published
Google Drive file system adapter for AnyMux
Maintainers
Readme
@anymux/google-drive
Google Drive file system provider for AnyMux.
Installation
pnpm add @anymux/google-driveUsage
import { GoogleDriveProvider } from "@anymux/google-drive";
const provider = new GoogleDriveProvider({
accessToken: "...",
rootFolderId: "root", // or a specific folder ID
});
await provider.initialize();
const fs = provider.getCapability("file-system");
const files = await fs.readdir("/");
const content = await fs.readFile("/Documents/notes.txt", "utf-8");
await fs.writeFile("/Documents/new-file.txt", "Hello from AnyMux!");API Overview
GoogleDriveProvider
Implements IProvider with file-system capability, mapping IFileSystem operations to Google Drive API v3.
- Read, write, copy, move, and delete files
- Create and list folders
- Path-based navigation (maps paths to Drive file IDs)
- File metadata via
stat()
Configuration
accessToken— OAuth 2.0 access token (use@anymux/middlewarefor the OAuth flow)rootFolderId— Drive folder ID to use as root (default:"root")teamDriveId— Shared drive ID (optional)
License
MIT
