gsg 0.0.24
dotnet tool install --global gsg --version 0.0.24
dotnet new tool-manifest
dotnet tool install --local gsg --version 0.0.24
#tool dotnet:?package=gsg&version=0.0.24
nuke :add-package gsg --version 0.0.24
Get Set Go
Global tool for transforming templated config files with 1Password. Made with ❤️ from WCOM
Requirements
- .NET 10 or later
- 1Password CLI, winget install 1password-cli
- Git client, winget install --id Git.Git -e --source winget
- 1Password desktop app, https://support.1password.com/get-the-apps/
- Access to 1Password vault
Installation on Windows
dotnet tool install --global gsg --version 0.0.23
Installation on Mac
Install 1Password CLI with homebrew:
brew install 1password-cli
Copy the executable file op with this command:
cp /opt/homebrew/bin/op /usr/local/bin/op.exe
Install Get Set Go tool:
dotnet tool install --global gsg --version 0.0.23
Why / How
Developers should have an easy path to checkout any project and quickly get development environment up'n'running, even when sharing configuration between team members.
Gsg tries to solve this in a somewhat opinionated way by letting developers check-in template files with configurations pointing to 1Password secrets simply by executing gsg init and gsg new.
The tool makes it possible to checkout a project, run gsg and after that hit F5. All the time spent on finding how a local.settings.json (or other files) should look is simply gone!
Quick Start
| Step | Command | Description |
|---|---|---|
| 1 | gsg init |
Copy known config files to template files (.tpl) |
| 2 | gsg new |
Create vault item and transform templates with 1Password URLs |
| 3 | gsg |
Transform all template files with values from 1Password |
Commands Reference
gsg / gsg set - Inject Secrets
Fetches secrets from 1Password and injects them into configuration files.
# Basic usage - process all template files
gsg
# Explicit set command
gsg set
# With specific source and destination
gsg set --source ./config.json.tpl --destination ./config.json
# With specific account
gsg set --account my-account-uuid
Options:
| Option | Short | Description |
|---|---|---|
--source |
-s |
Path to template file to process |
--destination |
-d |
Path to output file |
--account |
-a |
1Password account UUID |
--vault |
-n |
1Password vault name |
--repository |
-r |
Repository path (defaults to current directory) |
--extension |
-e |
Template file extension (default: .tpl) |
--verbose |
-v |
Enable verbose logging |
--sign-in |
Force 1Password sign-in |
gsg init - Initialize Templates
Scans the repository for supported configuration files and creates template copies.
# Interactive selection of files to initialize
gsg init
# With verbose output
gsg init --verbose
gsg new - Push to 1Password
Reads configuration values and creates/updates items in 1Password vault.
# Interactive selection of files and vault
gsg new
# With specific vault
gsg new --vault "Development"
Supported Configuration Files
| File Type | Description |
|---|---|
launchSettings.json |
Visual Studio launch settings |
web.config / app.config |
.NET Framework XML configuration |
*.json |
Generic JSON configuration files |
Workflow Example
Initial Setup (One-time per repository)
- Have your configuration files ready (e.g.,
local.settings.json) - Run
gsg initto create template files - Run
gsg newto push values to 1Password - Commit the
.tplfiles to source control - Add original config files to
.gitignore
Daily Development
- Clone repository
- Run
gsg - Start developing!
File Structure Example
project/
├── local.settings.json # Generated (gitignored)
├── local.settings.json.tpl # Template with op:// references (committed)
├── Properties/
│ ├── launchSettings.json # Generated (gitignored)
│ └── launchSettings.json.tpl # Template (committed)
└── .gitignore
Template Format
Template files contain 1Password secret references in the format:
op://vault-name/item-name/field-name
Example local.settings.json.tpl:
{
"ConnectionStrings": {
"DefaultConnection": "op://Development/MyProject/ConnectionString"
},
"ApiKeys": {
"ServiceKey": "op://Development/MyProject/ApiKey"
}
}
Excluded Paths
The following paths are automatically excluded:
bin/obj/publish/node_modules/global.jsonrenovate.json.vscode/extensions.json
Tips & Tricks
- To simplify authentication, allow 1Password desktop app to integrate with CLI (check box in settings)
Troubleshooting
"No git repository was found"
Ensure you're running the command from within a git repository with a configured remote origin:
git remote -v
"No accounts listed"
Make sure 1Password CLI is installed and you're signed in:
op account list
Template files not being detected
Verify the template extension matches (default is .tpl):
gsg set --extension .tpl --verbose
Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Config File │────▶│ Template File │────▶│ 1Password │
│ (gitignored) │ │ (.tpl) │ │ Vault │
└─────────────────┘ └─────────────────┘ └─────────────────┘
▲ │ │
│ │ │
└───────────────────────┴───────────────────────┘
gsg set (inject)
License
MIT License - See LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
See AGENTS.md for build instructions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.