Manage private assets in your project workspace without committing them to your main Git repository.
SPAS (pronounced "/spæz/") seamlessly connects your local workspace to a separate GitHub repository, keeping private files, environment configs, and test fixtures right where your tools expect them.
Quick Start · How It Works · Commands · Documentation · Discussions
Every project relies on files that don't belong in the public or shared Git repository: local .env secrets, developer overrides, test fixtures, API mocks, and internal team notes.
Moving these files elsewhere breaks build paths. Copying them manually across machines is slow and error-prone. Committing them risks secret leaks and repo bloat.
SPAS solves this by bridging the gap:
- Zero Path Rewiring: Your files remain in their expected workspace locations. Build scripts, tests, and IDEs work without modification.
- Clean Main History: Files are automatically ignored in the main project via
.git/info/exclude, leaving your.gitignoreuntouched. - Dedicated Version Control: Managed assets are versioned, committed, and synced to a dedicated, separate GitHub repository.
- Built-in Safety: Advisory file locking, atomic writes, dry-run previews, and fail-safe recovery protect your workspace from data loss.
| Challenge | Without SPAS | With SPAS |
|---|---|---|
| Asset Location | Stored outside project or requires symlinks | Kept directly at standard project paths |
| Main Git Cleanliness | Cluttered .gitignore or accidental commits |
Untracked in main repo via local .git/info/exclude |
| Team & Device Sync | Manual copy-pasting or ad-hoc scripts | One-command synchronization across machines |
| Version History | No audit trail for private changes | Full Git history in dedicated asset repository |
| Automation & CI | Brittle manual workflows | Script-friendly JSON output, dry-runs, and exit codes |
┌─────────────────────────────────────────────────────────────────┐
│ Project Workspace │
│ │
│ ┌────────────────────────┐ ┌─────────────────────────┐ │
│ │ Tracked Files │ │ Managed Assets │ │
│ │ (Main Git Repo) │ │ (SPAS Managed) │ │
│ └───────────▲────────────┘ └────────────▲────────────┘ │
│ │ │ │
│ │ Excluded from Main Repo │ │
│ │ ◄───────────────────────── │ │
│ │ (.git/info/exclude) │ │
└───────────────┼────────────────────────────────┼────────────────┘
│ │
Normal Git Ops SPAS Sync
(git push / git pull) (spas sync / checkout)
│ │
▼ ▼
Main Git Remote Linked GitHub Repository
(Public or Shared Repo) (Dedicated Asset Storage)
SPAS coordinates three distinct layers:
- Workspace Layer: Assets live directly at their standard project paths. SPAS manages an owned block in
.git/info/excludeso the main repository leaves them untracked. - Coordination & Safety Layer: SPAS acquires an OS-level advisory lock and stages updates via atomic same-filesystem renames (
/.spas-tmp/). - Dedicated Asset Storage: Assets are committed, merged, and pushed to a separate GitHub repository with independent history.
Download the pre-compiled binary for your system from the latest GitHub release, extract it, and place spas (or spas.exe) in your system PATH.
SPAS requires Git 2.43.1 or newer at runtime.
For complete verification and shell completion setup, see the Installation Guide.
go install -trimpath github.com/getspas/spas@latestCreate an empty repository on GitHub (e.g., your-org/project-assets).
Open a terminal in your project workspace and run:
# Link your workspace to the asset repository
spas link your-org/project-assets --transport ssh --branch main
# Add the private assets you want SPAS to manage
spas add config/dev.json testdata/mock-api.json docs/team-notes.md
# Synchronize assets to the linked repository
spas syncspas link— Connects your project workspace to the dedicated asset repository (offline).spas add— Tracks chosen files and creates local exclusion rules in.git/info/exclude(offline).spas sync— Validates, commits, merges, and synchronizes assets with GitHub.
Want to inspect what will happen before modifying files or committing?
spas sync --dry-run
spas diff --stat| Command | Description |
|---|---|
spas link |
Connect the project workspace to a GitHub repository |
spas add PATH... |
Track regular files under SPAS management |
spas remove PATH... |
Untrack selected assets on the next sync |
spas sync |
Synchronize assets between workspace and linked repository |
spas status |
Check link status, managed assets, collisions, and recovery state |
spas diff |
Compare workspace assets against the local managed checkout |
spas doctor |
Diagnose Git configuration, path exclusions, and recovery health |
spas unlink |
Remove the SPAS association while preserving workspace files |
spas completion |
Generate auto-completion scripts for Bash, Zsh, Fish, or PowerShell |
spas version |
Display version, commit hash, and build metadata |
SPAS is fully scriptable. Pass --json and explicit policies to run in automated pipelines without interactive prompts:
spas sync --json \
--message "Update CI environment assets" \
--conflict abort \
--existing-exclude preserve \
--merge-protection skipFor complete details on all flags, exit codes, and policies, consult the Command Reference.