No description
  • C# 90.4%
  • Shell 5.5%
  • Batchfile 4.1%
Find a file
Marvin Mees 781d5af836
All checks were successful
Continous Integration / build-and-test (push) Successful in 28s
Merge pull request 'feature/quick-select' (#3) from feature/quick-select into main
Reviewed-on: #3
2026-06-23 11:13:23 +00:00
.forgejo/workflows Added pipelines 2026-06-22 23:09:11 +02:00
src Added quick select feature 2026-06-23 12:38:47 +02:00
.gitignore Migrated to .NET 2026-06-22 18:49:30 +02:00
CLAUDE.md Migrated to .NET 2026-06-22 18:49:30 +02:00
install.bat Added install scripts 2026-06-23 13:00:45 +02:00
install.sh Added install scripts 2026-06-23 13:00:45 +02:00
LICENSE Adjusted author in LICENSE 2026-06-22 18:50:40 +02:00
README.md Updated README.md 2026-06-23 13:07:31 +02:00

GSCommand

Latest release Last commit .NET 10 Platforms License: MIT

GSCommand is an interactive terminal tool that turns a complicated CLI program's flags — currently Gamescope — into a guided form. Walk through sections, toggle/edit options, watch the resulting command line build up live, then copy it straight to your clipboard or print it for use in a script, terminal, or Steam launch options.

Built with .NET and Spectre.Console.

Features

  • Interactive, menu-driven form covering every documented Gamescope option, grouped into the same sections as gamescope --help
  • Live command preview as you edit
  • Save/load/delete named presets (only the fields you changed are stored, so presets stay readable)
  • Mark one preset as the default and reprint it instantly with gscommand quick — no menus, ideal for scripts and Steam launch options
  • Copies the finished command straight to your clipboard on exit (Windows, macOS, and Linux — including Wayland sessions via wl-copy, not just X11)
  • Extensible by design: adding a new app or a new version of Gamescope is a matter of dropping in a JSON spec file, not rewriting code

Installation

Published releases are self-contained single-file binaries — you do not need the .NET runtime installed to use them.

Linux / macOS:

curl -fsSL https://git.mmtsc.de/marvinmees/gscommand/raw/branch/main/install.sh | sh

Windows (Command Prompt):

curl -fsSLO https://git.mmtsc.de/marvinmees/gscommand/raw/branch/main/install.bat && install.bat

The installer detects your OS and CPU architecture, downloads the matching binary from the latest release, and installs it to a per-user location (no admin/sudo required):

  • Linux / macOS: ~/.local/bin/gscommand (marked executable automatically)
  • Windows: %LOCALAPPDATA%\Programs\gscommand\gscommand.exe

Set GSCOMMAND_INSTALL_DIR to install somewhere else. If the install directory isn't on your PATH, the script tells you how to add it (it never edits your shell profile or registry for you). Prefer to read the script before piping it to a shell? Download install.sh / install.bat from the repo and run it directly.

On Linux, optionally install one clipboard utility for your session type so the finished command can be copied automatically: wl-copy (Wayland) or xclip/xsel (X11). Without one, the tool still works and just prints the command.

Build from source

Requires the .NET 10 SDK.

Run directly:

dotnet run --project src/GSCommand.Cli

Or build a standalone binary:

dotnet publish src/GSCommand.Cli -c Release -r linux-x64 --self-contained

Replace linux-x64 with linux-arm64, win-x64, osx-x64, or osx-arm64 as needed. The published binary is placed under src/GSCommand.Cli/bin/Release/net10.0/<rid>/publish/.

Usage

Launch the tool, pick a section from the menu, and pick a field to edit. Boolean fields prompt for yes/no, numeric fields validate against their allowed range, and option fields show a selection list. The header panel always shows the command as it currently stands. When you're done, choose Print final command & quit — the command is printed to the terminal and copied to your clipboard.

Presets are stored as a single JSON file in your user config directory (~/.config/gscommand/presets.json on Linux/macOS, %APPDATA%\gscommand\presets.json on Windows, or under $XDG_CONFIG_HOME if set) so they survive across runs.

Quick command

Choose Set default preset from the builder menu to mark any saved preset as the global default. Once one is set, run:

gscommand quick

This prints the default preset's command and copies it to your clipboard without launching the interactive builder — handy for scripts or to grab a known-good command in one step. If no default has been set yet, it tells you to mark one first.

Development

dotnet build src/GSCommand.slnx     # build everything
dotnet test src/GSCommand.slnx      # run the test suite

The solution is split into three projects:

  • GSCommand.Core — the data model, the Gamescope option spec, and the engine that turns form state into a command line. No console/UI dependency, fully unit tested.
  • GSCommand.Cli — the Spectre.Console terminal UI and entry point.
  • GSCommand.Core.Tests — xunit tests for GSCommand.Core.

To add support for another app or Gamescope version, add a spec JSON under src/GSCommand.Core/Specs/ and register it in VersionRegistry.cs.

License

MIT