copy

A command for copying files between your local computer and a remote server. It uses rsync when available and falls back to scp, a standard SSH file-copy tool.

In plain words
What is it for?
Use it to upload files to a server or download files from one, using a local path on one side and a server path on the other.
Why use it?
It removes the need to construct separate transfer commands and prevents unsupported local-to-local or server-to-server copies.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/callmetechie/fleet-manager/copy
Clone the repo
git clone --depth 1 https://github.com/CallMeTechie/fleet-manager
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 997 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.00997
Opus 5 $0.00016 $0.00498
Sonnet 5 $0.00007 $0.00199
Haiku 4.5 $0.00003 $0.00100

Measured yesterday against content hash 3090acd94f03, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

copy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/commands/copy.md · 64 lines

What it actually says

Copy

set -euo pipefail
source "${CLAUDE_PLUGIN_ROOT:-plugin}/commands/_transfer-lib.sh"

SRC=""; DST=""; TOKEN=""
set -f
# shellcheck disable=SC2086  # intentional: split ARGUMENTS into positional params
set -- ${ARGUMENTS:-}
while [ $# -gt 0 ]; do
  case "$1" in
    --confirm=*) TOKEN="${1#*=}" ;;
    --*) echo "Unknown flag: $1" >&2; exit 1 ;;
    *) if [ -z "$SRC" ]; then SRC="$1"; elif [ -z "$DST" ]; then DST="$1"; else echo "Too many args" >&2; exit 1; fi ;;
  esac
  shift
done
if [ -z "$SRC" ] || [ -z "$DST" ]; then echo "Usage: /copy <src> <dst>  (one side is <server>:<path>)" >&2; exit 1; fi

parse_endpoint "$SRC"; SRC_KIND="$FM_EP_KIND"; SRC_SERVER="$FM_EP_SERVER"; SRC_PATH="$FM_EP_PATH"
parse_endpoint "$DST"; DST_KIND="$FM_EP_KIND"; DST_SERVER="$FM_EP_SERVER"; DST_PATH="$FM_EP_PATH"

if [ "$SRC_KIND" = remote ] && [ "$DST_KIND" = remote ]; then echo "ERROR: server↔server not supported in this phase." >&2; exit 1; fi
if [ "$SRC_KIND" = local ] && [ "$DST_KIND" = local ]; then echo "ERROR: both paths are local — use cp." >&2; exit 1; fi

if [ "$DST_KIND" = remote ]; then SERVER="$DST_SERVER"; else SERVER="$SRC_SERVER"; fi
load_profile "$SERVER"; echo_target "$SERVER"   # project convention: show target first
is_scope_authorized "$SERVER" file_transfer || { echo "REFUSED: scope 'file_transfer' not authorized for '$SERVER'." >&2; exit 1; }

# Protected-path gate: only when writing INTO a remote destination.
if [ "$DST_KIND" = remote ] && is_protected_path "$SERVER" "$DST_PATH"; then
  confirm_destructive "$SERVER" "$TOKEN" || exit 1
fi

build_rsync_rsh "$SERVER"
if [ "$SRC_KIND" = remote ]; then RS_SRC="$FM_REMOTE:$SRC_PATH"; else RS_SRC="$SRC_PATH"; fi
if [ "$DST_KIND" = remote ]; then RS_DST="$FM_REMOTE:$DST_PATH"; else RS_DST="$DST_PATH"; fi

if local_has_rsync && remote_has_rsync "$SERVER"; then
  rsync -a -s -e "$FM_RSYNC_RSH" "$RS_SRC" "$RS_DST" && echo "Verdict: copied (rsync)."
else
  # scp fallback — refuse paths with spaces/metacharacters (no --protect-args equivalent).
  remote_path="$DST_PATH"; [ "$SRC_KIND" = remote ] && remote_path="$SRC_PATH"
  case "$remote_path" in *[!A-Za-z0-9/._-]*) echo "ERROR: rsync unavailable and remote path has special chars — install rsync." >&2; exit 1;; esac
  # scp must honor the same extra ssh opts (ProxyJump / host-key bypass for tests).
  scp_extra=()
  [ -n "${FM_SSH_EXTRA_OPTS:-}" ] && read -ra scp_extra <<< "$FM_SSH_EXTRA_OPTS"
  if [ "$SRC_KIND" = remote ]; then
    scp -i "$FM_KEY_PATH" -o BatchMode=yes ${scp_extra[@]+"${scp_extra[@]}"} -P "$FM_PORT" -r "$FM_REMOTE:$SRC_PATH" "$DST_PATH" && echo "Verdict: copied (scp)."
  else
    scp -i "$FM_KEY_PATH" -o BatchMode=yes ${scp_extra[@]+"${scp_extra[@]}"} -P "$FM_PORT" -r "$SRC_PATH" "$FM_REMOTE:$DST_PATH" && echo "Verdict: copied (scp)."
  fi
fi

Protected destination (prose): if the destination is under a protected path, the gate requires --confirm=<server> (matching the server name) — confirm the user's intent before re-running with the token. confirm_destructive refuses without it.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 64 lines · 33 tokens per session scan A 3090acd94f03

Subscribe to this mod's changes

copy is a command published in the GitHub repository CallMeTechie/fleet-manager (1 stars, last pushed 29d ago), licensed MIT. It adds 33 tokens to every session and 997 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.