Skip to content

Commit 2eb9fa0

Browse files
andyhtranclaude
andauthored
Document why cache dir uses ~/.cache/ instead of ~/Library/Caches/ (#4)
The cross-platform path is intentional — SSH paste types it into remote terminals where ~/Library/Caches/ doesn't exist. Add a FAQ entry and an inline comment explaining the invariant. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 63804e5 commit 2eb9fa0

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ SSH paste has to use `~/` because the remote home dir is unknown. Your remote us
9393

9494
Each screenshot is sent to every enabled host you've configured. With one host it's just SSH paste; with multiple it broadcasts (fans out) to all of them. Toggle individual hosts on/off in the menu bar to control which ones receive a given screenshot.
9595

96+
**Why does CopyCat use `~/.cache/copycat/` instead of `~/Library/Caches/`?**
97+
98+
So the same path resolves on both your Mac and remote Linux/NixOS hosts. SSH paste types `~/.cache/copycat/screenshot.jpg` into the terminal — that path needs to work on both sides without platform detection or separate configuration. The cache directory is configurable in Settings if you prefer a different location.
99+
96100
**What's the simplest setup?**
97101

98102
Leave SSH off. CopyCat then only intercepts ⌘V locally — no SSH, no remote hosts, no Tailscale needed. Turn SSH on when you want to paste into a remote shell.

Sources/CopyCat/Settings.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ enum SettingsDefaults {
3838
static let broadcastHotkey: BroadcastHotkey = .cmdV
3939
static let cacheKeepCount = 50
4040

41+
// ~/.cache/copycat/ on all platforms, not ~/Library/Caches/ on macOS.
42+
// SSH paste types this path into the terminal and it must resolve on
43+
// both the local Mac and remote Linux hosts. A single cross-platform
44+
// path keeps that invariant without platform detection or split config.
4145
static var cacheDir: URL {
4246
FileManager.default.homeDirectoryForCurrentUser
4347
.appendingPathComponent(".cache/copycat", isDirectory: true)

0 commit comments

Comments
 (0)