This document summarizes the changes made to the Game Server Admin (GSA) configuration system to support user-configurable server IP/port settings and favorites management.
- File:
user-config.ncl.template - Purpose: Template for user-specific configuration
- Format: Nickel language (
.ncl) - Status: Gitignored (template only)
- File:
user-config.ncl - Purpose: User-specific settings including:
- Default server connection (host, port, profile_id, rcon_password)
- Favorite servers list
- UI preferences (theme, default panel, advanced options)
- Connection settings (timeout, retries, logging)
- VeriSimDB settings (URL, auto-submit)
- Status: Gitignored (contains sensitive data)
Added new config subcommands to the CLI:
- Creates
user-config.nclfrom the template - Prevents overwriting existing config
- Shows byte count and success message
- Displays current user configuration
- Shows full file contents
- Helps users verify their settings
- Updates the default server connection
- Modifies
user-config.nclin-place - Validates input parameters
- Adds a server to the favorites list
- Appends to the favorites array in config
- Supports named servers for easy identification
- Lists favorite servers
- Currently shows config file location
- Future: Parse and display formatted list
- USER-CONFIG.md: Comprehensive user guide
- README.adoc: Updated with configuration section
- CONFIG-CHANGES.md: This file
Updated .gitignore to exclude:
user-config.ncl(user configuration)- Ensures sensitive data is never committed
- File:
src/interface/ffi/src/cli.zig - Changes:
- Added config command parsing
- Implemented 5 new subcommands
- Added helper functions for file manipulation
- Updated usage message
Uses Nickel language for:
- Type safety
- Easy editing
- Future extensibility
- Integration with Gossamer panels
- Git Ignore: User config never committed
- Template: Safe default values only
- Permissions: File operations check permissions
- Error Handling: Graceful failure messages
./gsa config init./gsa config set-default mc.example.com 25565./gsa config add-favorite "My Minecraft" mc.example.com 25565
./gsa config add-favorite "CS2 Server" cs2.example.com 27015./gsa config showPlanned improvements:
- Profile Integration: Link favorites to game profiles
- Connection Testing: Validate servers from CLI
- Import/Export: Backup and restore config
- Encryption: Secure sensitive data
- GUI Editor: Visual configuration interface
- Run
./gsa config initto create template - Edit
user-config.nclmanually - Add your servers to the favorites list
- Set your preferred default server
- Configuration is optional
- Default values work out-of-the-box
- Use CLI commands to customize
- See
USER-CONFIG.mdfor details
The implementation includes:
- Basic file operation validation
- Input parameter checking
- Error handling for common cases
- Success/failure messages
- Backward Compatible: Existing functionality unchanged
- Optional: Configuration is not required
- Safe Defaults: Template provides sensible defaults
src/interface/ffi/src/cli.zig- Added config commands.gitignore- Added user-config.nclREADME.adoc- Added configuration sectionUSER-CONFIG.md- Created (new file)user-config.ncl.template- Created (new file)CONFIG-CHANGES.md- Created (this file)
user-config.ncl.templateUSER-CONFIG.mdCONFIG-CHANGES.md
user-config.ncl