Skip to content

Commit 6d1d618

Browse files
committed
initial release: install scripts, license, and README
0 parents  commit 6d1d618

6 files changed

Lines changed: 374 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
linux/
2+
darwin/
3+
windows/
4+
release/

LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ccv — Claude Code Vault
2+
Copyright (c) 2026 Taki Elias. All rights reserved.
3+
4+
This software is provided free of charge for personal and commercial use.
5+
You may use, copy, and distribute the compiled binary without modification.
6+
7+
You may NOT:
8+
- Reverse engineer, decompile, or disassemble the software
9+
- Modify, adapt, or create derivative works
10+
- Redistribute modified versions
11+
- Sell or sublicense the software
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM
17+
THE USE OF THIS SOFTWARE.

README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# ccv -- Claude Code Vault
2+
3+
A CLI tool that keeps private files (docs, prompts, notes) in a single private Git repo and symlinks them into your projects. Nothing leaks into public repos.
4+
5+
## Install
6+
7+
### Linux / macOS
8+
9+
```bash
10+
curl -fsSL https://raw.githubusercontent.com/takielias/claude-code-vault/main/install.sh | sh
11+
```
12+
13+
### Windows (PowerShell)
14+
15+
```powershell
16+
irm https://raw.githubusercontent.com/takielias/claude-code-vault/main/install.ps1 | iex
17+
```
18+
19+
## How it works
20+
21+
1. A private Git repo at `~/.ccv/` stores all your files
22+
2. `ccv add` moves files there and replaces them with symlinks
23+
3. `.gitignore` is updated so nothing gets committed to public repos
24+
4. `ccv push` / `ccv pull` syncs the vault across machines
25+
26+
## Usage
27+
28+
```bash
29+
cd ~/projects/my-app
30+
ccv init # register project (sets up vault on first run)
31+
ccv add CLAUDE.md docs/ # move files to vault, replace with symlinks
32+
ccv push # commit and push vault
33+
ccv status # check what changed
34+
ccv list # show all projects and files
35+
```
36+
37+
On a new machine:
38+
39+
```bash
40+
cd ~/projects/my-app
41+
ccv init # prompts for vault remote on first run
42+
ccv link # create symlinks for registered files
43+
```
44+
45+
## Commands
46+
47+
| Command | What it does |
48+
|---------|--------------|
49+
| `ccv init` | Register project. Sets up vault if missing. |
50+
| `ccv init --scan` | Register and pick files interactively |
51+
| `ccv add <path>...` | Move files/folders to vault, create symlinks |
52+
| `ccv remove <path>...` | Restore files from vault to project |
53+
| `ccv link` | Create symlinks for all registered files |
54+
| `ccv unlink` | Remove symlinks. Files stay in vault. |
55+
| `ccv push` | Commit and push vault changes |
56+
| `ccv push -m "msg"` | Push with a custom commit message |
57+
| `ccv pull` | Pull latest vault from remote |
58+
| `ccv list` | Show all projects and their files |
59+
| `ccv status` | Show what changed in the vault |
60+
| `ccv watch` | Auto-commit and push on file changes |
61+
| `ccv reset` | Remove vault, all symlinks, all .gitignore entries |
62+
| `ccv reset --force` | Same as above, skip confirmation |
63+
64+
## Platforms
65+
66+
Pre-built binaries for each release:
67+
68+
- Linux (amd64, arm64)
69+
- macOS (amd64, arm64)
70+
- Windows (amd64, arm64)
71+
72+
Download from the [releases page](https://github.com/takielias/claude-code-vault/releases).
73+
74+
## Uninstall
75+
76+
```bash
77+
curl -fsSL https://raw.githubusercontent.com/takielias/claude-code-vault/main/uninstall.sh | sh
78+
```
79+
80+
## License
81+
82+
Freeware -- free to use, no source code provided. See [LICENSE](./LICENSE) for details.

install.ps1

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# ccv installer for Windows — Claude Code Vault
2+
# Usage: irm https://raw.githubusercontent.com/takielias/ccv/main/install.ps1 | iex
3+
4+
$ErrorActionPreference = "Stop"
5+
6+
$Version = "0.1.0"
7+
$Repo = "takielias/claude-code-vault"
8+
$Binary = "ccv"
9+
$InstallDir = "$env:LOCALAPPDATA\ccv"
10+
11+
function Write-Info($msg) { Write-Host "[ccv] $msg" -ForegroundColor Cyan }
12+
function Write-Ok($msg) { Write-Host "[ccv] $msg" -ForegroundColor Green }
13+
function Write-Warn($msg) { Write-Host "[ccv] $msg" -ForegroundColor Yellow }
14+
function Write-Err($msg) { Write-Host "[ccv] $msg" -ForegroundColor Red; exit 1 }
15+
16+
# Detect architecture
17+
function Get-Arch {
18+
$arch = $env:PROCESSOR_ARCHITECTURE
19+
if ($env:PROCESSOR_ARCHITEW6432) {
20+
$arch = $env:PROCESSOR_ARCHITEW6432
21+
}
22+
switch ($arch) {
23+
"AMD64" { return "amd64" }
24+
"ARM64" { return "arm64" }
25+
default { Write-Err "Unsupported architecture: $arch" }
26+
}
27+
}
28+
29+
function Install-Ccv {
30+
Write-Host ""
31+
Write-Host "========================================" -ForegroundColor Cyan
32+
Write-Host " ccv - Claude Code Vault Installer " -ForegroundColor Cyan
33+
Write-Host "========================================" -ForegroundColor Cyan
34+
Write-Host ""
35+
36+
$arch = Get-Arch
37+
Write-Info "Detected: windows/$arch"
38+
39+
$archive = "$Binary-$Version-windows-$arch.tar.gz"
40+
$url = "https://github.com/$Repo/releases/download/v$Version/$archive"
41+
42+
Write-Info "Downloading ccv v$Version..."
43+
44+
$tmpDir = New-Item -ItemType Directory -Path "$env:TEMP\ccv-install-$(Get-Random)"
45+
$tmpFile = Join-Path $tmpDir $archive
46+
47+
try {
48+
Invoke-WebRequest -Uri $url -OutFile $tmpFile -UseBasicParsing
49+
} catch {
50+
Write-Err "Download failed. Check https://github.com/$Repo/releases"
51+
}
52+
53+
Write-Info "Extracting..."
54+
tar -xzf $tmpFile -C $tmpDir
55+
56+
# Create install directory
57+
if (-not (Test-Path $InstallDir)) {
58+
New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null
59+
}
60+
61+
$binaryPath = Join-Path $InstallDir "$Binary.exe"
62+
Move-Item -Path (Join-Path $tmpDir "$Binary.exe") -Destination $binaryPath -Force
63+
64+
# Add to PATH if not already there
65+
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
66+
if ($userPath -notlike "*$InstallDir*") {
67+
Write-Info "Adding $InstallDir to user PATH..."
68+
[Environment]::SetEnvironmentVariable("Path", "$userPath;$InstallDir", "User")
69+
$env:Path = "$env:Path;$InstallDir"
70+
}
71+
72+
# Cleanup
73+
Remove-Item -Recurse -Force $tmpDir
74+
75+
# Verify
76+
try {
77+
$ver = & $binaryPath --version 2>&1
78+
Write-Ok "Installed successfully: $ver"
79+
} catch {
80+
Write-Ok "Installed to $binaryPath"
81+
}
82+
83+
Write-Host ""
84+
Write-Host "Get started:" -ForegroundColor Green
85+
Write-Host " cd your-project"
86+
Write-Host " ccv init"
87+
Write-Host ""
88+
Write-Warn "Restart your terminal for PATH changes to take effect."
89+
}
90+
91+
Install-Ccv

install.sh

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# ccv installer — Claude Code Vault
5+
# Usage: curl -fsSL https://raw.githubusercontent.com/takielias/ccv/main/install.sh | sh
6+
7+
VERSION="0.1.0"
8+
REPO="takielias/claude-code-vault"
9+
BINARY="ccv"
10+
INSTALL_DIR="/usr/local/bin"
11+
12+
# Colors
13+
RED='\033[0;31m'
14+
GREEN='\033[0;32m'
15+
YELLOW='\033[1;33m'
16+
CYAN='\033[0;36m'
17+
NC='\033[0m'
18+
19+
info() { printf "${CYAN}[ccv]${NC} %s\n" "$1"; }
20+
ok() { printf "${GREEN}[ccv]${NC} %s\n" "$1"; }
21+
warn() { printf "${YELLOW}[ccv]${NC} %s\n" "$1"; }
22+
error() { printf "${RED}[ccv]${NC} %s\n" "$1" >&2; exit 1; }
23+
24+
# Detect OS
25+
detect_os() {
26+
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
27+
case "$OS" in
28+
linux*) OS="linux" ;;
29+
darwin*) OS="darwin" ;;
30+
*) error "Unsupported OS: $OS" ;;
31+
esac
32+
}
33+
34+
# Detect architecture
35+
detect_arch() {
36+
ARCH="$(uname -m)"
37+
case "$ARCH" in
38+
x86_64|amd64) ARCH="amd64" ;;
39+
aarch64|arm64) ARCH="arm64" ;;
40+
*) error "Unsupported architecture: $ARCH" ;;
41+
esac
42+
}
43+
44+
# Download and install
45+
install_binary() {
46+
ARCHIVE="${BINARY}-${VERSION}-${OS}-${ARCH}.tar.gz"
47+
URL="https://github.com/${REPO}/releases/download/v${VERSION}/${ARCHIVE}"
48+
49+
info "Downloading ccv v${VERSION} for ${OS}/${ARCH}..."
50+
51+
TMPDIR="$(mktemp -d)"
52+
trap 'rm -rf "$TMPDIR"' EXIT
53+
54+
if command -v curl >/dev/null 2>&1; then
55+
curl -fsSL "$URL" -o "${TMPDIR}/${ARCHIVE}" || error "Download failed. Check https://github.com/${REPO}/releases"
56+
elif command -v wget >/dev/null 2>&1; then
57+
wget -q "$URL" -O "${TMPDIR}/${ARCHIVE}" || error "Download failed. Check https://github.com/${REPO}/releases"
58+
else
59+
error "curl or wget required"
60+
fi
61+
62+
info "Extracting..."
63+
tar -xzf "${TMPDIR}/${ARCHIVE}" -C "$TMPDIR"
64+
65+
info "Installing to ${INSTALL_DIR}/${BINARY}..."
66+
if [ -w "$INSTALL_DIR" ]; then
67+
mv "${TMPDIR}/${BINARY}" "${INSTALL_DIR}/${BINARY}"
68+
else
69+
sudo mv "${TMPDIR}/${BINARY}" "${INSTALL_DIR}/${BINARY}"
70+
fi
71+
chmod +x "${INSTALL_DIR}/${BINARY}"
72+
73+
# Verify
74+
if command -v ccv >/dev/null 2>&1; then
75+
ok "Installed successfully: $(ccv --version 2>&1 | head -1)"
76+
else
77+
warn "Installed to ${INSTALL_DIR}/${BINARY}"
78+
warn "Make sure ${INSTALL_DIR} is in your PATH"
79+
fi
80+
}
81+
82+
# Build from source as fallback
83+
install_from_source() {
84+
if ! command -v go >/dev/null 2>&1; then
85+
error "Go is not installed. Install Go from https://go.dev/dl/ or download a pre-built binary from https://github.com/${REPO}/releases"
86+
fi
87+
88+
info "Building from source..."
89+
go install -ldflags "-s -w -X 'github.com/taki/ccv/cmd.Version=${VERSION}'" github.com/taki/ccv@latest
90+
91+
if command -v ccv >/dev/null 2>&1; then
92+
ok "Installed successfully: $(ccv --version 2>&1 | head -1)"
93+
else
94+
GOPATH="$(go env GOPATH)"
95+
warn "Installed to ${GOPATH}/bin/ccv"
96+
warn "Add this to your shell profile: export PATH=\$PATH:${GOPATH}/bin"
97+
fi
98+
}
99+
100+
main() {
101+
printf "\n${CYAN}╔══════════════════════════════════════╗${NC}\n"
102+
printf "${CYAN}║ ccv — Claude Code Vault Installer ║${NC}\n"
103+
printf "${CYAN}╚══════════════════════════════════════╝${NC}\n\n"
104+
105+
detect_os
106+
detect_arch
107+
info "Detected: ${OS}/${ARCH}"
108+
109+
# Try binary download first, fall back to source
110+
install_binary 2>/dev/null || {
111+
warn "Binary download failed, building from source..."
112+
install_from_source
113+
}
114+
115+
printf "\n${GREEN}Get started:${NC}\n"
116+
printf " cd your-project\n"
117+
printf " ccv init\n\n"
118+
}
119+
120+
main

uninstall.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# ccv uninstaller — Claude Code Vault
5+
6+
RED='\033[0;31m'
7+
GREEN='\033[0;32m'
8+
YELLOW='\033[1;33m'
9+
CYAN='\033[0;36m'
10+
NC='\033[0m'
11+
12+
info() { printf "${CYAN}[ccv]${NC} %s\n" "$1"; }
13+
ok() { printf "${GREEN}[ccv]${NC} %s\n" "$1"; }
14+
warn() { printf "${YELLOW}[ccv]${NC} %s\n" "$1"; }
15+
16+
BINARY="/usr/local/bin/ccv"
17+
VAULT="$HOME/.ccv"
18+
19+
printf "\n${CYAN}ccv Uninstaller${NC}\n\n"
20+
21+
# Remove binary
22+
if [ -f "$BINARY" ]; then
23+
info "Removing $BINARY..."
24+
if [ -w "$(dirname "$BINARY")" ]; then
25+
rm -f "$BINARY"
26+
else
27+
sudo rm -f "$BINARY"
28+
fi
29+
ok "Binary removed."
30+
else
31+
warn "Binary not found at $BINARY"
32+
fi
33+
34+
# Also check GOPATH
35+
GOPATH_BIN="$(go env GOPATH 2>/dev/null)/bin/ccv"
36+
if [ -f "$GOPATH_BIN" ] && [ "$GOPATH_BIN" != "$BINARY" ]; then
37+
info "Removing $GOPATH_BIN..."
38+
rm -f "$GOPATH_BIN"
39+
ok "Go-installed binary removed."
40+
fi
41+
42+
# Ask about vault
43+
if [ -d "$VAULT" ]; then
44+
printf "\n${YELLOW}Vault found at $VAULT${NC}\n"
45+
printf "Remove vault and all stored files? [y/N] "
46+
read -r response
47+
case "$response" in
48+
[yY]|[yY][eE][sS])
49+
rm -rf "$VAULT"
50+
ok "Vault removed."
51+
;;
52+
*)
53+
info "Vault kept at $VAULT"
54+
;;
55+
esac
56+
else
57+
info "No vault found."
58+
fi
59+
60+
printf "\n${GREEN}ccv uninstalled.${NC}\n\n"

0 commit comments

Comments
 (0)