__ __
.--| .-----.----| |--.--.--.
| _ | _ | _| <| | |
|_____|_____|__| |__|__|___ |
|_____|
Manage sensitive project files like environment variables, configuration files, and API keys without committing them to public version control. dorky securely stores your sensitive files on AWS S3 or Google Drive, making them accessible to authorized team members.
npm install -g dorkyOr use with npx:
npx dorky --help- Create an S3 bucket in your AWS account
- Create an IAM user with programmatic access
- Attach the following IAM policy to the user (replace
your-bucket-namewith your actual bucket name):
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::your-bucket-name",
"arn:aws:s3:::your-bucket-name/*"
]
}
]
}- Generate AWS credentials (Access Key ID and Secret Access Key) for the IAM user
- Set up environment variables:
export AWS_ACCESS_KEY="your-access-key"
export AWS_SECRET_KEY="your-secret-key"
export AWS_REGION="us-east-1"
export BUCKET_NAME="your-bucket-name"- Create a Google Cloud Project
- Enable Google Drive API
- Download OAuth 2.0 credentials
- Save credentials as
google-drive-credentials.jsonin your project root
# Navigate to your project
cd your-project
# Initialize dorky with AWS
dorky --init aws
# List files that can be added
dorky --list
# Add sensitive files
dorky --add .env config.yml
# Push to S3
dorky --push# Navigate to your project
cd your-project
# Initialize dorky with Google Drive
dorky --init google-drive
# Authenticate (browser window will open)
# Follow the OAuth flow
# List files that can be added
dorky --list
# Add sensitive files
dorky --add .env secrets.json
# Push to Google Drive
dorky --push# For AWS S3
dorky --init aws
# For Google Drive
dorky --init google-driveThis creates:
.dorky/folder with metadata and credentials.dorkyignorefile for exclusion patterns- Updates
.gitignoreto protect credentials
# List local files (shows what can be added)
dorky --list
# List remote files (shows what's in storage)
dorky --list remote# Add single file
dorky --add .env
# Add multiple files
dorky --add .env config.yml secrets.json
# Add files with specific patterns
dorky --add .env.production .env.staging# Remove single file
dorky --rm .env
# Remove multiple files
dorky --rm .env config.yml# Push all staged files
dorky --pushThis command:
- Uploads new files
- Updates modified files (based on hash comparison)
- Removes files from remote storage that were unstaged using
dorky --rm - Skips unchanged files
- Skips push entirely if the staged state already matches the latest commit
# Pull all tracked files
dorky --pullThis command:
- Downloads all tracked files from storage
- Creates necessary directories
- Overwrites local files
dorky --logPrints all past push commits in reverse chronological order, showing the commit ID, timestamp, and list of files included in each snapshot.
# Restore files to a specific commit
dorky --checkout <commit-id>Downloads the files as they were at the given commit from remote storage and stages them locally. Run dorky --push afterward to publish the restored state as a new commit. The commit ID can be found with --log. Prefix matching is supported (e.g. dorky --checkout a1b2 if the full ID is a1b2c3d4).
# Destroy project locally and remotely
dorky --destroyThis command:
- Deletes all tracked files from remote storage
- Removes local
.dorky/directory and.dorkyignorefile - Warning: This action is irreversible for remote files.
Exclude files and directories from dorky scanning:
node_modules/
.git/
dist/
build/
*.log
coverage/
After initialization:
your-project/
βββ .dorky/
β βββ credentials.json # Storage credentials (auto-ignored by git)
β βββ metadata.json # Tracked files metadata
β βββ history.json # Push commit history
βββ .dorkyignore # Exclusion patterns
βββ .gitignore # Updated automatically
# Team lead initializes and pushes files
dorky --init aws
dorky --add .env config/secrets.yml
dorky --push
# Team members pull files
git clone <repository>
cd <repository>
# Set up AWS credentials in environment
dorky --pull# Modify your .env file locally
vim .env
# Add updated file
dorky --add .env
# Push changes
dorky --push# Remove from staging
dorky --rm old-config.yml
# Push to remove from remote
dorky --push# Initialize with AWS
dorky --init aws
# Add environment files for different stages
dorky --add .env.development .env.staging .env.production
# Check what will be uploaded
dorky --list
# Upload to S3
dorky --push
# View remote files
dorky --list remote# Initialize with Google Drive
dorky --init google-drive
# Add API key files
dorky --add config/api-keys.json secrets/tokens.yml
# Push to Google Drive
dorky --push
# On another machine, pull the files
dorky --pulldorky ships a Model Context Protocol (MCP) server so AI coding assistants (Claude, Cursor, VS Code Copilot, etc.) can invoke dorky commands directly from within AI-assisted workflows.
| Tool | Description |
|---|---|
init |
Initialize a dorky project (aws or google-drive) |
list |
List local untracked/staged files or remote files |
add |
Stage files for upload |
remove |
Unstage files from tracking |
push |
Push staged files to remote storage |
pull |
Pull tracked files from remote storage |
log |
Show push history |
checkout |
Restore files from a history commit |
destroy |
Destroy the project locally and remotely |
npx dorky-mcpOr, if installed globally:
dorky-mcpAdd the following to your claude_desktop_config.json (usually at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"dorky": {
"command": "npx",
"args": ["dorky-mcp"],
"env": {
"AWS_ACCESS_KEY": "your-access-key",
"AWS_SECRET_KEY": "your-secret-key",
"AWS_REGION": "us-east-1",
"BUCKET_NAME": "your-bucket-name"
}
}
}
}Add to your VS Code settings.json:
{
"mcp": {
"servers": {
"dorky": {
"type": "stdio",
"command": "npx",
"args": ["dorky-mcp"],
"env": {
"AWS_ACCESS_KEY": "your-access-key",
"AWS_SECRET_KEY": "your-secret-key",
"AWS_REGION": "us-east-1",
"BUCKET_NAME": "your-bucket-name"
}
}
}
}
}Add to your Cursor MCP config (.cursor/mcp.json in your project or ~/.cursor/mcp.json globally):
{
"mcpServers": {
"dorky": {
"command": "npx",
"args": ["dorky-mcp"],
"env": {
"AWS_ACCESS_KEY": "your-access-key",
"AWS_SECRET_KEY": "your-secret-key",
"AWS_REGION": "us-east-1",
"BUCKET_NAME": "your-bucket-name"
}
}
}
}A graphical interface for dorky is available as a VS Code extension β manage staged and uploaded files directly from the sidebar without leaving your editor.
- β AWS S3 storage integration
- β Google Drive storage integration
- β List remote files in dorky bucket
- β Auto detect .env and .config files
- β Automatic .gitignore updates to ignore credentials
- β Handle reauthentication for Google Drive
- β Token refresh for Google Drive authentication
- β Ignore dorky files in dorky itself
- β File hash validation to skip unchanged files
- β Mime-type detection for file uploads
- β Recursive folder creation on pull
- β Destroy project and clean up remote files
- β Auto-recovery of AWS credentials from environment variables
- β Push history with versioned remote snapshots
- β Restore files to any previous push commit
- β MCP server for AI agent integration (Claude, Cursor, VS Code Copilot)
- Initialization: Creates
.dorky/folder with metadata, credentials, and history - File Tracking: Maintains a hash-based registry of files in
metadata.json - Smart Uploads: Only uploads files that have changed (based on MD5 hash)
- Auto-detection: Highlights
.envand.configfiles during listing - Security: Automatically updates
.gitignoreto protect credentials - History: Each push saves a commit entry in
history.jsonand uploads a versioned snapshot to<project>/.dorky-history/<commit-id>/on remote storage, enabling point-in-time restore via--checkout
- β
Never commit
.dorky/credentials.jsonto version control - β Use environment variables for AWS credentials
- β Rotate access keys regularly
- β Use IAM roles with minimal required permissions
- β
Review
.dorkyignorebefore adding files - β
Keep
google-drive-credentials.jsonsecure
Error: Missing credentials
# Set environment variables
export AWS_ACCESS_KEY="your-key"
export AWS_SECRET_KEY="your-secret"
export AWS_REGION="us-east-1"
export BUCKET_NAME="your-bucket"Error: Invalid credentials
# Re-authenticate
dorky --init google-driveError: Token expired
- dorky automatically refreshes tokens
- If issues persist, delete
.dorky/credentials.jsonand re-authenticate
Contributions are welcome! Please feel free to submit a Pull Request.
ISC License - see LICENSE file for details.
- π¦ npm package
- π Report issues
- π Website
- Update README with AWS IAM policy (bug fix release)
- Handle invalid access token for Google Drive and AWS (edge cases)
- rm + push should delete file from remote storage (minor release)
- Uninitialize dorky setup (Bug fix release)
- dorky --list remote --update should sync metadata according to remote (Minor release)
- Extension for VS Code to list and highlight them like git (Major release)
- MCP server (Minor release)
- Encryption of files (Minor release)
- Add stages for variables (Major release)
- Migrate dorky project to another storage (partially implemented)
- Add more test cases
- Deletion of files
- Edge cases for failure when credentials are invalid
- Add coverage reports badges