fxvcs

module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MPL-2.0

README

fxvcs

Version control for FiveM resources — including the large assets Git was not built to carry.

fxvcs lets resource creators and server teams keep scripts, configuration, and asset history together without filling a Git repository with maps, textures, models, audio, and other large binaries. Source and small metadata stay in Git; immutable asset content lives in a filesystem, S3, or S3-compatible store.

That means contributors can use familiar branches, commits, reviews, and tags while fxvcs handles downloading assets, reclaiming local disk space, checking integrity, and making sure required content is published before a Git push.

[!WARNING] fxvcs is pre-release software. It is not yet ready to manage a production server.

Why fxvcs?

  • Keep the whole resource versioned. Track code and large binary assets as one logical change instead of passing asset folders around separately.
  • Keep Git fast. Small deterministic placeholders are committed in place of binary content, so clones and normal Git operations stay lightweight.
  • Download only when needed. fxvcs load restores real files and fxvcs unload safely turns unchanged files back into placeholders.
  • Upload only what changed. Content-defined chunking reuses unchanged parts of large files and avoids uploading the same content twice.
  • Share storage on your terms. Use a shared directory, Amazon S3, or an S3-compatible service. Credentials stay on each contributor's computer.
  • Compose real projects. Stack repositories can pin multiple resource repositories into an immutable release with portable release metadata.
  • Automate without scraping terminal output. The fxvcs CLI offers stable JSON and the public Go SDK exposes typed requests, results, errors, and progress.

How it works

Your Git repository                 Shared asset storage
-------------------                 --------------------
scripts and configuration   ──────▶ normal Git remote
small fxvcs placeholders     ──────▶ normal Git remote
large immutable content      ──────▶ filesystem / S3-compatible storage

When Git stages a tracked asset, fxvcs records a compact pointer instead of the asset bytes. Your worktree can still contain the real file. On another machine, fxvcs load verifies the pointer, downloads the content, and restores the file. Dirty files are protected: unload, repair, and other destructive-looking operations refuse to overwrite local changes.

Quick start

Requirements
  • Git 2.36 or newer
  • mise for the pinned Go toolchain

Tagged releases attach archives for Linux, macOS, and Windows on AMD64 and ARM64, plus a SHA256SUMS file. Until the first release is published, build the current development version from source:

git clone <this-repository-url>
cd fxvcs
mise install
mise run install
fxvcs version

Verify a downloaded release archive before extracting it:

sha256sum --check SHA256SUMS

On macOS, use shasum -a 256 <archive> and compare the result with the matching line in SHA256SUMS.

Start a resource repository

Run these commands inside a Git repository containing your FiveM resources:

# Write repository configuration and Git integration; nothing is committed.
fxvcs init --profile fivem

# Choose shared asset storage.
fxvcs storage add --name primary --path /srv/fxvcs-storage

# Or use an S3-compatible bucket instead:
# fxvcs storage add --name primary \
#   --bucket fxvcs-assets \
#   --endpoint https://s3.example.com
# fxvcs storage login primary --access-key-id YOUR_KEY

# Start tracking large assets, then commit normally.
fxvcs track --glob "stream/**"
git add .
git commit -m "set up fxvcs asset tracking"

# Publish asset content before pushing its pointers.
fxvcs objects publish
git push

On another computer:

fxvcs clone <repository-url>
cd <repository-directory>
fxvcs load
fxvcs status

Run fxvcs --help to see the command groups and fxvcs <command> --help for examples. Add --json for the stable machine-readable interface or --verbose when diagnosing a problem.

Git launcher installation

Git filters and hooks must keep working when the terminal or fxvcs Desktop is closed, so setup installs a stable per-user fxvcs CLI/Engine launcher and records its absolute path in each repository:

Platform Launcher path
Linux ${XDG_DATA_HOME:-$HOME/.local/share}/fxvcs/bin/fxvcs
macOS $HOME/Library/Application Support/fxvcs/bin/fxvcs
Windows %LOCALAPPDATA%\fxvcs\bin\fxvcs.exe

The fxvcs CLI and fxvcs Desktop may both maintain this launcher. Updates are atomic and newest-version-wins: an older caller never downgrades a newer installed helper. Existing macOS installations using the former ~/.local/share/fxvcs/bin/fxvcs default are kept working while repositories are migrated to the native Application Support location. Run fxvcs launcher ensure to install or verify the shared helper explicitly.

From resources to releases

fxvcs separates a component repository from a stack repository:

  • A component repository owns one or more related resources and their assets.
  • A stack repository combines independently versioned components, validates how they fit together, and creates an immutable release.
mkdir my-server-stack && cd my-server-stack
git init
fxvcs stack init
fxvcs stack add <component-repository-url> --mount resources/my-resource
fxvcs stack sync
fxvcs stack validate
fxvcs release create v0.1.0

Use fxvcs release inspect, fxvcs release export, and fxvcs release import to review and move release metadata. Locked systemd target reconciliation and Apply are available for evaluation; production activation remains gated on Linux/txAdmin live evidence.

Project status

The current pre-release includes:

  • resource-repository setup, clone, upgrade, tracking, migration, and repair;
  • Git filter, diff, merge, and pre-push integration;
  • filesystem and S3-compatible asset storage;
  • differential chunked objects and a bounded, self-verifying local cache;
  • FiveM resource discovery and manifest inspection;
  • multi-repository stacks, immutable releases, and desired target/environment documents;
  • fail-closed target reconciliation with locked systemd Apply, bounded health checks, rollback, typed resource lifecycle operations, and deployment pruning;
  • a public v0 Go SDK and stable fxvcs --json output.

See the Stage 4 status for implemented evidence and remaining acceptance gates, and the Stage 4 plan for its implementation contract. Work still in progress includes a long-running pull agent and continuous monitoring, live txAdmin compatibility validation, signing and distribution hardening, and object garbage collection. Hosted services are optional future work; the standalone product is intended to remain useful on its own.

Contributing

fxvcs welcomes bug reports, documentation improvements, test cases, design feedback, and focused code contributions. Good first contributions include:

  • reproducing a problem on Linux, macOS, or Windows;
  • improving command examples and error messages;
  • adding malformed, compatibility, or crash-recovery fixtures;
  • extending S3-compatible provider coverage;
  • improving FiveM resource discovery and validation tests.

Before starting a large feature or format change, open an issue so the approach can be discussed before significant work is invested. Then read CONTRIBUTING.md for setup, repository rules, test commands, and the pull-request checklist.

For SDK consumers

The supported integration boundary is the fxvcs.dev/fxvcs/sdk Go package. Packages below internal/ are implementation details and cannot be imported by external modules. The v0 SDK is additive where possible, but fxvcs remains pre-release and does not yet promise v1 compatibility.

See examples/sdk-consumer for a minimal integration. The fxvcs Desktop packaging and launcher contract is documented in DESKTOP_LAUNCHER_INTEGRATION.md.

License

An external-distribution license has not yet been approved, so this repository does not currently include a LICENSE file. Do not redistribute the project until that changes.

Directories

Path Synopsis
cmd
fxvcs command
Command fxvcs is the FXVCS developer CLI, Git filter/diff/merge driver entry point, and target agent.
Command fxvcs is the FXVCS developer CLI, Git filter/diff/merge driver entry point, and target agent.
fxvcs-chunkbench command
Command fxvcs-chunkbench is the Stage 2 chunking measurement harness.
Command fxvcs-chunkbench is the Stage 2 chunking measurement harness.
examples
sdk-consumer command
Command sdk-consumer is a fixture third-party Go program that drives FXVCS exclusively through the public SDK (fxvcs.dev/fxvcs/sdk).
Command sdk-consumer is a fixture third-party Go program that drives FXVCS exclusively through the public SDK (fxvcs.dev/fxvcs/sdk).
internal
activation
Package activation owns observation and atomic replacement of a target's current realization indirection plus conservative journal recovery.
Package activation owns observation and atomic replacement of a target's current realization indirection plus conservative journal recovery.
activationwindow
Package activationwindow parses and evaluates the portable v1 target activation-window expression.
Package activationwindow parses and evaluates the portable v1 target activation-window expression.
app
Package app implements the FXVCS use cases behind the public SDK.
Package app implements the FXVCS use cases behind the public SDK.
cache
Package cache is the host-wide, immutable, content-addressed object cache.
Package cache is the host-wide, immutable, content-addressed object cache.
canonical
Package canonical implements the deterministic JSON encoding used for every FXVCS content identity: object manifests, asset indexes, the semantic release digest, and realization identity.
Package canonical implements the deterministic JSON encoding used for every FXVCS content identity: object manifests, asset indexes, the semantic release digest, and realization identity.
chunk
Package chunk implements the versioned content-defined chunking (CDC) that FXVCS uses to store large assets as reusable pieces.
Package chunk implements the versioned content-defined chunking (CDC) that FXVCS uses to store large assets as reusable pieces.
chunk/measure
Package measure is the Stage 2 chunking measurement spike (build plan §9, Stage 2): it compares whole-blob, fixed-size, and content-defined chunking over *version pairs* of representative assets and reports the numbers the go/no-go decision needs — transfer savings, stored bytes, CPU time, memory, and manifest overhead.
Package measure is the Stage 2 chunking measurement spike (build plan §9, Stage 2): it compares whole-blob, fixed-size, and content-defined chunking over *version pairs* of representative assets and reports the numbers the go/no-go decision needs — transfer savings, stored bytes, CPU time, memory, and manifest overhead.
cli
Package cli builds the fxvcs command tree.
Package cli builds the fxvcs command tree.
cli/drivers
Package drivers registers the Git process-boundary entry points (filter-process, diff-driver, merge-driver) and spike commands with the CLI.
Package drivers registers the Git process-boundary entry points (filter-process, diff-driver, merge-driver) and spike commands with the CLI.
cli/ui
Package ui is the presentation layer of the fxvcs CLI: headers, footers, aligned tables, item rows with a state word (and an optional symbol on a terminal), hints, byte formatting, and plural helpers.
Package ui is the presentation layer of the fxvcs CLI: headers, footers, aligned tables, item rows with a state word (and an optional symbol on a terminal), hints, byte formatting, and plural helpers.
cli/ui/live
Package live is the interactive progress view: a bounded, in-place display of an operation that touches many files.
Package live is the interactive progress view: a bounded, in-place display of an operation that touches many files.
controlplane
Package controlplane defines the backend-neutral coordination seam.
Package controlplane defines the backend-neutral coordination seam.
controlplane/gitops
Package gitops implements the coordination control plane over an ordinary Git repository (ADR 0004).
Package gitops implements the coordination control plane over an ordinary Git repository (ADR 0004).
credentials
Package credentials stores the object-store secrets `fxvcs storage login` records, outside the repository and outside Git's administrative directories.
Package credentials stores the object-store secrets `fxvcs storage login` records, outside the repository and outside Git's administrative directories.
deployment
Package deployment persists health-state transitions and last-known-good evidence around the pure health machine.
Package deployment persists health-state transitions and last-known-good evidence around the pure health machine.
domain
Package domain defines the Go representation of every FXVCS persisted format.
Package domain defines the Go representation of every FXVCS persisted format.
durablefs
Package durablefs contains platform-specific filesystem durability primitives shared by fxvcs' atomic writers.
Package durablefs contains platform-specific filesystem durability primitives shared by fxvcs' atomic writers.
fileprotect
Package fileprotect applies the platform confidentiality boundary to files whose bytes contain resolved secret material.
Package fileprotect applies the platform confidentiality boundary to files whose bytes contain resolved secret material.
filter
Package filter implements the Git process boundary of FXVCS: the long-running clean/smudge filter (Git filter protocol version 2), the pointer-aware diff and merge drivers, the pre-push publication barrier, and launcher installation into repository-local Git config.
Package filter implements the Git process boundary of FXVCS: the long-running clean/smudge filter (Git filter protocol version 2), the pointer-aware diff and merge drivers, the pre-push publication barrier, and launcher installation into repository-local Git config.
filter/wire
Package wire connects the Git process boundary (internal/filter) to the engine (internal/app) so that the clean filter ingests through the same path as every SDK operation, smudge honours the hydration intent recorded in state.db, and the pre-push barrier consults the publication ledger.
Package wire connects the Git process boundary (internal/filter) to the engine (internal/app) so that the clean filter ingests through the same path as every SDK operation, smudge honours the hydration intent recorded in state.db, and the pre-push barrier consults the publication ledger.
format
Package format owns FXVCS format-version negotiation: the committed document envelope (apiVersion/kind), semantic version comparison for minimumFXVCSVersion, pointer/object format identifiers, Git integration generations, and local SQLite schema versions.
Package format owns FXVCS format-version negotiation: the committed document envelope (apiVersion/kind), semantic version comparison for minimumFXVCSVersion, pointer/object format identifiers, Git integration generations, and local SQLite schema versions.
gitclient
Package gitclient is a small exec-based Git client used by the filter, diff/merge drivers, the pre-push hook, and setup/upgrade.
Package gitclient is a small exec-based Git client used by the filter, diff/merge drivers, the pre-push hook, and setup/upgrade.
gitclient/gittest
Package gittest creates throwaway Git repositories for tests.
Package gittest creates throwaway Git repositories for tests.
health
Package health implements the deployment phase / retry-suppression state machine from docs/spec/health-and-rollback.md as a pure function so the contract can be fixture-tested without a running agent.
Package health implements the deployment phase / retry-suppression state machine from docs/spec/health-and-rollback.md as a pure function so the contract can be fixture-tested without a running agent.
integrity
Package integrity computes FXVCS content identities from domain documents: object-manifest digests, asset roots, the semantic release digest, and sourceSetDigest.
Package integrity computes FXVCS content identities from domain documents: object-manifest digests, asset roots, the semantic release digest, and sourceSetDigest.
journal
Package journal defines the lock hierarchy every FXVCS mutation follows (docs/spec/checkout-consistency.md §3) and an in-process ordering guard.
Package journal defines the lock hierarchy every FXVCS mutation follows (docs/spec/checkout-consistency.md §3) and an in-process ordering guard.
layout
Package layout computes the normative target runtime layout (docs/spec/runtime-layout.md §1) and proves every path stays inside its root.
Package layout computes the normative target runtime layout (docs/spec/runtime-layout.md §1) and proves every path stays inside its root.
lock
Package lock provides the durable cross-process locks that serialize CLI, SDK consumers, the Git filter, and (later) the agent.
Package lock provides the durable cross-process locks that serialize CLI, SDK consumers, the Git filter, and (later) the agent.
materialize
Package materialize owns the verified digest-keyed file store beneath a target deployment root and safe placement into out-of-place realizations.
Package materialize owns the verified digest-keyed file store beneath a target deployment root and safe placement into out-of-place realizations.
migrate
Package migrate is the ordered migration model shared by every versioned FXVCS format that is upgraded in place (docs/spec/version-negotiation.md).
Package migrate is the ordered migration model shared by every versioned FXVCS format that is upgraded in place (docs/spec/version-negotiation.md).
objectstore
Package objectstore defines the immutable, content-addressed object store contract (build plan §6).
Package objectstore defines the immutable, content-addressed object store contract (build plan §6).
objectstore/filesystem
Package filesystem is the filesystem-backed object store: a directory tree (local disk, NFS/SMB share, or a synced folder) laid out as
Package filesystem is the filesystem-backed object store: a directory tree (local disk, NFS/SMB share, or a synced folder) laid out as
objectstore/s3
Package s3 is the S3-compatible object store backend (build plan §9, Stage 2).
Package s3 is the S3-compatible object store backend (build plan §9, Stage 2).
pathsafe
Package pathsafe normalizes repository-relative paths and proves that a materialization destination stays inside its root.
Package pathsafe normalizes repository-relative paths and proves that a materialization destination stays inside its root.
pointer
Package pointer encodes and decodes the FXVCS pointer stored in Git in place of a large asset.
Package pointer encodes and decodes the FXVCS pointer stored in Git in place of a large asset.
profile/fivem
Package fivem is the FiveM profile: default tracking presets, the managed .gitattributes block, and change classification.
Package fivem is the FiveM profile: default tracking presets, the managed .gitattributes block, and change classification.
profile/fivem/catalog
Package catalog maintains the FiveM component resource catalog (.fxvcs/resources.yaml): synchronizing it with discovered manifests while preserving operator-owned fields, validating it for release, and diffing a pinned catalog against a rescan so release creation fails closed.
Package catalog maintains the FiveM component resource catalog (.fxvcs/resources.yaml): synchronizing it with discovered manifests while preserving operator-owned fields, validating it for release, and diffing a pinned catalog against a rescan so release creation fails closed.
profile/fivem/discovery
Package discovery finds FiveM resources inside a component tree using the FXServer scanning rules and the component's accepted descriptor, and proposes a descriptor for an unconfigured tree.
Package discovery finds FiveM resources inside a component tree using the FXServer scanning rules and the component's accepted descriptor, and proposes a descriptor for an unconfigured tree.
profile/fivem/manifest
Package manifest evaluates FiveM resource manifests (fxmanifest.lua and the legacy __resource.lua) inside a deterministic, capability-free Lua sandbox and returns the recorded metadata as plain data.
Package manifest evaluates FiveM resource manifests (fxmanifest.lua and the legacy __resource.lua) inside a deterministic, capability-free Lua sandbox and returns the recorded metadata as plain data.
prune
Package prune plans and applies exact target-local realization pruning.
Package prune plans and applies exact target-local realization pruning.
rcon
Package rcon implements the FiveM UDP out-of-band RCON protocol exposed by the official citizen-server implementation.
Package rcon implements the FiveM UDP out-of-band RCON protocol exposed by the official citizen-server implementation.
readiness
Package readiness runs independently bounded typed checks and evaluates startup grace, consecutive thresholds, and soak without owning deployment lifecycle transitions.
Package readiness runs independently bounded typed checks and evaluates startup grace, consecutive thresholds, and soak without owning deployment lifecycle transitions.
reconcile
Package reconcile contains the pure Stage 4 target reconciliation planner.
Package reconcile contains the pure Stage 4 target reconciliation planner.
release
Package release builds immutable Release records from a pinned composition, compares two releases, and moves one release between coordination repositories as a portable document.
Package release builds immutable Release records from a pinned composition, compares two releases, and moves one release between coordination repositories as a portable document.
repository
Package repository locates and opens an FXVCS repository checkout and runs the mandatory open-preflight: envelope/version negotiation and the minimumFXVCSVersion / gitIntegrationVersion gate.
Package repository locates and opens an FXVCS repository checkout and runs the mandatory open-preflight: envelope/version negotiation and the minimumFXVCSVersion / gitIntegrationVersion gate.
rollback
Package rollback constructs the safe realization input tuple for automatic rollback.
Package rollback constructs the safe realization input tuple for automatic rollback.
runtimecheck
Package runtimecheck validates Release runtime-resource requirements against an agent-bound installed system-resources inventory without claiming those target-provided bytes are Release-owned.
Package runtimecheck validates Release runtime-resource requirements against an agent-bound installed system-resources inventory without claiming those target-provided bytes are Release-owned.
schema
Package schema validates FXVCS documents against the embedded JSON Schemas (spec/schemas) and the semantic rules a schema cannot express, then decodes them into internal/domain types.
Package schema validates FXVCS documents against the embedded JSON Schemas (spec/schemas) and the semantic rules a schema cannot express, then decodes them into internal/domain types.
secrets
Package secrets resolves Stage 4 host-local env and envfile providers while exposing only opaque keyed versions for realization identity and evidence.
Package secrets resolves Stage 4 host-local env and envfile providers while exposing only opaque keyed versions for realization identity and evidence.
stack
Package stack resolves a coordination composition: which component repositories participate, where each one mounts in the realization, which display name each one resolves to, and — with the runtime catalog and sparse overrides — the exact activation plan a Release snapshots.
Package stack resolves a coordination composition: which component repositories participate, where each one mounts in the realization, which display name each one resolves to, and — with the runtime catalog and sparse overrides — the exact activation plan a Release snapshots.
state
Package state owns the clone-local and target-local SQLite databases (docs/spec/local-state.md and docs/stage-4-plan.md):
Package state owns the clone-local and target-local SQLite databases (docs/spec/local-state.md and docs/stage-4-plan.md):
supervisor
Package supervisor defines the capability boundary between reconciliation and target-provided process supervisors.
Package supervisor defines the capability boundary between reconciliation and target-provided process supervisors.
templatehook
Package templatehook implements the built-in, in-process template.v1 hook.
Package templatehook implements the built-in, in-process template.v1 hook.
trust
Package trust implements the deterministic parts of docs/spec/trust-and-signing.md that need no Git or key material: promotion tag naming and monotonic sequence selection, coordination authority policy validation, and the detached-signature envelope for canonical Release digests.
Package trust implements the deterministic parts of docs/spec/trust-and-signing.md that need no Git or key material: promotion tag naming and monotonic sequence selection, coordination authority policy validation, and the detached-signature envelope for canonical Release digests.
verifier
Package verifier resolves portable external-resource contracts to explicit agent-local implementations.
Package verifier resolves portable external-resource contracts to explicit agent-local implementations.
sdk
Package sdk is the public, versioned Go facade for FXVCS.
Package sdk is the public, versioned Go facade for FXVCS.
driver
Package driver exposes the Git process-boundary entry points (filter-process, clean-filter, smudge-filter, diff-driver, merge-driver, pre-push) as an in-process function, so a downstream test binary can serve as its own driver launcher without building or re-execing cmd/fxvcs.
Package driver exposes the Git process-boundary entry points (filter-process, clean-filter, smudge-filter, diff-driver, merge-driver, pre-push) as an in-process function, so a downstream test binary can serve as its own driver launcher without building or re-execing cmd/fxvcs.
spec
schemas
Package schemas embeds the normative JSON Schema (draft 2020-12) documents and the pointer ABNF grammar so that the binary validates against exactly the files published under spec/schemas.
Package schemas embeds the normative JSON Schema (draft 2020-12) documents and the pointer ABNF grammar so that the binary validates against exactly the files published under spec/schemas.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL