Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CS2 Config Manager

English | 简体中文

A Windows and PowerShell 7 tool for managing CS2 configuration files across Steam accounts. It also manages local practice-server cfg files as templates deployed to the CS2 game directory.

Features

  • Discovers local Steam accounts with CS2 configuration folders.
  • Maps numeric Steam IDs to readable account aliases.
  • Backs up, previews, copies, and restores account-level configuration.
  • Merges selected settings from external cfg files by Viewmodel, Video, Hud, Radar, and Audio categories.
  • Imports, updates, and deploys local practice-server cfg templates.
  • Supports --what-if, automatic backups, and SHA-256 verification for write operations.
  • Excludes non-portable Steam Cloud, inventory, and trustedlaunch.cfg state by default.

Script Languages

The scripts have identical functionality. Their help, prompts, and errors are localized:

  • Cs2Config.zh-CN.ps1: Simplified Chinese
  • Cs2Config.en-US.ps1: English

Both scripts store runtime state relative to their own location in .tmp. Account aliases, templates, backups, and logs are not committed to Git.

CliFramework.ps1 is the shared command-path parser and help framework. Keep it in the same directory as either entry script.

Command-Line Conventions

  • Use single-letter options for common inputs: -a account, -s source, -t target, -n name, -p preset path, -c sections, -b backup, -i include custom cfg, and -h help.
  • Use lowercase kebab-case long options: --account, --preset-path, --include-custom-cfg, and --what-if.
  • Less frequent inputs use their long form, such as --new-name, --source-path, --config-path, --video-path, and --force.

Requirements

  • Windows
  • PowerShell 7 or later
  • Steam and Counter-Strike 2 installed

Quick Start

List available accounts with the English script:

Cs2Config.en-US.ps1 account list

Set an account alias (the shorter account set form is also supported):

Cs2Config.en-US.ps1 `
  account set -a 123456789 -n primary

Back up an account configuration:

Cs2Config.en-US.ps1 `
  backup --account primary --include-custom-cfg

Preview and then copy common settings from one account to another:

Cs2Config.en-US.ps1 `
  apply -s primary -t secondary --what-if

Cs2Config.en-US.ps1 `
  apply -s primary -t secondary

Applying Selected Settings from an External cfg

External autoexec.cfg files commonly contain bindings, sensitivity, crosshair, and personal settings. Use apply-preset to merge only the categories you choose:

Cs2Config.en-US.ps1 `
  apply-preset `
  --account primary `
  --preset-path C:\Users\you\Downloads\autoexec.cfg `
  --sections Viewmodel,Video,Hud,Radar,Audio `
  --what-if

Review the preview, then remove --what-if to apply it. Unselected categories such as bindings, crosshair, and sensitivity are not changed.

If you have a separate cs2_video.txt, provide it with --video-path. Recognized video settings are merged without replacing GPU device IDs, monitor index, or refresh rate.

Practice Templates

Practice cfg files are not account-level files. When you run exec <name>, CS2 resolves cfg files from the game installation directory, so a deployed practice template is shared by local accounts.

# Import an existing cfg as a template
Cs2Config.en-US.ps1 `
  practice template import `
  -n practice `
  --source-path C:\Users\you\Downloads\practice.cfg

# Deploy it to the CS2 game directory
Cs2Config.en-US.ps1 `
  practice apply -n practice

On a local server, open the CS2 console and run:

exec practice

When importing a template from an account configuration, --config-path practice also matches practice.cfg; an explicitly supplied extension is preserved.

Safety

Commands that write settings refuse to run while cs2.exe is active. Before writing, the script creates a backup with manifest.json and SHA-256 hashes in .tmp\backups; operation summaries go to .tmp\logs.

The following are excluded from account copying by default:

  • trustedlaunch.cfg
  • *_lastclouded
  • remote\
  • remotecache.vdf
  • socache.dt

List backups and preview a restore before making a change:

Cs2Config.en-US.ps1 backup list -a primary
Cs2Config.en-US.ps1 restore -a primary -b <backup-directory-name> --what-if

Help

Run either script without arguments, or append --help, for a concise command overview:

Cs2Config.en-US.ps1
Cs2Config.en-US.ps1 --help

Help is available at every command level, including deep command paths:

Cs2Config.en-US.ps1 account set --help
Cs2Config.en-US.ps1 help practice template import

Use PowerShell help for the full reference and examples:

Get-Help Cs2Config.en-US.ps1 -Full
Get-Help Cs2Config.zh-CN.ps1 -Examples

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages