-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the sftp-cc-toomaster wiki!
A universal SFTP upload tool for Claude Code. Supports incremental upload, automatic private key binding, and permission correction.
Zero external dependencies — pure shell implementation, only requires system-built-in sftp, git, grep, sed.
When using PhpStorm, the built-in SFTP extension automatically syncs every file change to the dev server — create, modify, or delete, it just works seamlessly. After switching to Claude Code, that ability was lost. Every time Claude made changes to the code, I had to manually pull them on the test server. That friction really slowed things down. So I built this tool to bring that auto-sync experience into Claude Code — just say "sync code to server" and it's done.
# Add marketplace
/plugin marketplace add https://github.com/toohamster/sftp-cc-toomaster
# Install plugin
/plugin install sftp-cc-toomaster@sftp-cc-toomaster# Clone repository
git clone https://github.com/toohamster/sftp-cc-toomaster.git
# Install to your project
bash sftp-cc-toomaster/install.sh /path/to/your-projectbash ${CLAUDE_PLUGIN_ROOT}/scripts/sftp-init.sh \
--host your-server.com \
--username deploy \
--remote-path /var/www/htmlEdit .claude/sftp-cc/sftp-config.json:
{
"host": "your-server.com",
"port": 22,
"username": "deploy",
"remote_path": "/var/www/html",
"local_path": ".",
"private_key": "",
"excludes": [".git", ".claude", "node_modules", ".env", ".DS_Store"]
}cp ~/.ssh/id_rsa .claude/sftp-cc/The key will be auto-detected, auto-bound to the config, and permissions auto-corrected to 600.
Supported key formats: id_rsa, id_ed25519, id_ecdsa, *.pem, *.key
Trigger via natural language in Claude Code:
- "sync code to server"
- "upload files to server"
- "deploy code to server"
- "sftp upload"
- "sftp sync"
Note: "push" will NOT trigger this skill to avoid conflicts with git push.
You can also call scripts directly:
# Incremental upload (default, only changed files)
bash ${CLAUDE_PLUGIN_ROOT}/scripts/sftp-push.sh
# Incremental upload + delete remote files that were deleted locally
bash ${CLAUDE_PLUGIN_ROOT}/scripts/sftp-push.sh --delete
# Full upload (all files)
bash ${CLAUDE_PLUGIN_ROOT}/scripts/sftp-push.sh --full
# Upload specific files
bash ${CLAUDE_PLUGIN_ROOT}/scripts/sftp-push.sh src/index.php
# Upload a specific directory
bash ${CLAUDE_PLUGIN_ROOT}/scripts/sftp-push.sh -d src/
# Dry-run (preview only)
bash ${CLAUDE_PLUGIN_ROOT}/scripts/sftp-push.sh -n- After each successful upload, the current git commit hash is saved to
.claude/sftp-cc/.last-push - On the next upload,
git diffdetects changes since the last upload — only modified/new files are uploaded - Detects staged changes, unstaged changes, and untracked new files
- Falls back to full upload on first run or when the marker is missing
- Use
--fullto force a full upload - Use
--deleteto sync-delete remote files that were deleted locally (off by default to prevent accidents)
-
sftp— SSH file transfer (system built-in) -
git— project root detection and incremental change detection - No jq required — pure shell JSON parsing
-
.claude/sftp-cc/directory contains private keys and server info, automatically added to.gitignore - Private key permissions are auto-corrected to
600