spectra

command module
v0.0.0-...-70c3fe6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 41 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Spectra

A powerful, feature-rich CS2 demo viewer and match analysis toolkit.

Features

  • Import .dem / .dem.zst demos (picker or drag-and-drop) with background parsing, progress, and duplicate detection — originals are never modified
  • Searchable match library: re-run imports, delete a match’s data (optionally the file too), per-match parser version and import warnings
  • Match overview, sortable scoreboard (K/D/A, ADR, HS%, K/D, KDA, entries, trades, openings, streaks, multi-kills, utility, MVPs…), round browser with economy + kill feed, player chat, raw game-event histogram + payload viewer
  • Universal event timeline with round/player/type filters and drill-down to the underlying event payloads
  • Interactive 2D tactical replay of entire matches — no CS2 install required
  • Comprehensive match, player, round, economy, and utility statistics
  • Voice and chat review synchronized with the replay (when available in the demo)
  • Fully offline: demos and their data stay on your machine

Download

Supported platforms: Linux and Windows (desktop only).

Grab the latest release for your platform from the Releases page:

  • spectra-linux-amd64 (run it directly, or chmod +x first)
  • spectra-windows-amd64.exe

The app checks GitHub Releases on launch and offers to install updates itself, verifying downloads against the release's SHA256SUMS.

Developers

Requires Go 1.27+, Node.js 22+, and — on Linux only — the GTK4 + WebKitGTK 6.0 dev packages:

make deps         # dev toolchain (wails3 CLI at the pinned version, Node check)
make linux-deps   # Linux only: apt install the GTK4/WebKitGTK build deps
make run          # build + run
make dev          # hot reload
make package      # distributable for this OS

See AGENTS.md for development details.

License

MIT — see LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
cs2find command
Command cs2find is the in-repo dev tool for searching and decoding the local CS2 install (READ-ONLY — see mappack.RunDevTool's package doc).
Command cs2find is the in-repo dev tool for searching and decoding the local CS2 install (READ-ONLY — see mappack.RunDevTool's package doc).
internal
analytics
Package analytics is the M3 computation core: pure functions that derive the stored analytics rows — round classifications, KAST player-rounds, clutch v2 records, engagements, utility pairings and the economy view — from extracted events/rounds plus the versioned rules config.
Package analytics is the M3 computation core: pure functions that derive the stored analytics rows — round classifications, KAST player-rounds, clutch v2 records, engagements, utility pairings and the economy view — from extracted events/rounds plus the versioned rules config.
data
Package data owns the on-disk locations for the app's durable state: the SQLite database, per-match sidecar directories and the managed demo copies (DemosDir).
Package data owns the on-disk locations for the app's durable state: the SQLite database, per-match sidecar directories and the managed demo copies (DemosDir).
extract
Package extract is the demoinfocs-based extraction engine: it reads ONE raw CS2 .dem stream (the caller handles .zstd decompression) and emits a normalized models.ExtractedMatch — no report/markdown generation, and no demoinfocs type ever appears in the output.
Package extract is the demoinfocs-based extraction engine: it reads ONE raw CS2 .dem stream (the caller handles .zstd decompression) and emits a normalized models.ExtractedMatch — no report/markdown generation, and no demoinfocs type ever appears in the output.
library
Package library is the presentation-free import pipeline: a single-worker job queue that hashes, dedupes (sha256), optionally copies the raw demo into the app's managed demo dir (copy-on-import, the default — the source file may later move or vanish; the copy_on_import pref skips it, see Options.CopyEnabled), decompresses (.dem.zst, streamed — never to a temp file) and parses demos via internal/extract, persisting through internal/store.
Package library is the presentation-free import pipeline: a single-worker job queue that hashes, dedupes (sha256), optionally copies the raw demo into the app's managed demo dir (copy-on-import, the default — the source file may later move or vanish; the copy_on_import pref skips it, see Options.CopyEnabled), decompresses (.dem.zst, streamed — never to a temp file) and parses demos via internal/extract, persisting through internal/store.
mappack
Package mappack extracts CS2 radar map packs (image + transform metadata) from a local Counter-Strike 2 installation.
Package mappack extracts CS2 radar map packs (image + transform metadata) from a local Counter-Strike 2 installation.
metrics
Package metrics is the M5 §2.1 custom-metric engine: a frozen v1 expression grammar, a whitelist-validating parser (identifiers never reach SQL unvalidated — no user SQL is ever interpolated), a SQL compiler producing parameterized statements, and the preview runner (compile → execute on the store's read-only session → group/label mapping).
Package metrics is the M5 §2.1 custom-metric engine: a frozen v1 expression grammar, a whitelist-validating parser (identifiers never reach SQL unvalidated — no user SQL is ever interpolated), a SQL compiler producing parameterized statements, and the preview runner (compile → execute on the store's read-only session → group/label mapping).
models
Package models is the normalized domain vocabulary shared by the extraction engine (internal/extract, which produces these values from a parsed demo), the store (internal/extract persists), and the frontend services (which return them over the Wails bindings as JSON).
Package models is the normalized domain vocabulary shared by the extraction engine (internal/extract, which produces these values from a parsed demo), the store (internal/extract persists), and the frontend services (which return them over the Wails bindings as JSON).
plugin
Package plugin implements the M5 §2.7 declarative plugin model v1: a bundle is spectra-plugin.json (optionally alongside data files) that registers metric definitions and report templates — NO scripting (the goja/gopher-lua sandbox and loopback API are descoped by the M5 status note).
Package plugin implements the M5 §2.7 declarative plugin model v1: a bundle is spectra-plugin.json (optionally alongside data files) that registers metric definitions and report templates — NO scripting (the goja/gopher-lua sandbox and loopback API are descoped by the M5 status note).
query
Package query is the read-only SQL console session (PRD §5.17 power-user escape hatch): statement validation + execution on the store's separate read-only connection, result mapping with row cap and timing, run history, and the schema browser with provenance notes.
Package query is the read-only SQL console session (PRD §5.17 power-user escape hatch): statement validation + execution on the store's separate read-only connection, result mapping with row cap and timing, run history, and the schema browser with provenance notes.
report
Package report implements M5 §2.5's templated report generation: Go text/template documents (markdown + HTML) rendered in-process from store getters — no frontend round-trip, printable, diffable.
Package report implements M5 §2.5's templated report generation: Go text/template documents (markdown + HTML) rendered in-process from store getters — no frontend round-trip, printable, diffable.
rules
Package rules holds canonical Counter-Strike 2 rule arithmetic that more than one layer needs.
Package rules holds canonical Counter-Strike 2 rule arithmetic that more than one layer needs.
sidecar
Package sidecar persists the per-match tactical position stream outside SQLite: a quantized per-frame player sample written during extraction, block-compressed so ranges can be fetched and decompressed server-side without the frontend ever owning a zstd decoder.
Package sidecar persists the per-match tactical position stream outside SQLite: a quantized per-frame player sample written during extraction, block-compressed so ranges can be fetched and decompressed server-side without the frontend ever owning a zstd decoder.
spatial
Package spatial computes the M5 §2.4 sidecar-derived time series that need no map-pack region polygons: teammate spacing and team spread over time buckets.
Package spatial computes the M5 §2.4 sidecar-derived time series that need no map-pack region polygons: teammate spacing and team spread over time buckets.
store
Package store persists extraction output in SQLite and serves the frontend-facing queries.
Package store persists extraction output in SQLite and serves the frontend-facing queries.

Jump to

Keyboard shortcuts

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