Skip to main content
Any Framework

CLI tool to retrieve settings from 1Password vaults and apply to given config file

Published
Sep 3, 2026
1mo ago
Total Downloads
46.2K
46,164

Install

dotnet add package gsg --version 2026.9.3.5

No framework information available.

README

Get Set Go

Global tool for transforming templated config files with 1Password. Made with :heart: from WCOM

Requirements

Installation on Windows

dotnet tool install --global gsg --version 0.0.25

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.25

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 (Windows only β€” uses PowerShell)

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

# From a specific repository path
gsg init --repository ./my-project

Options:

Option Short Description
--repository -r Repository path (defaults to current directory)
--extension -e Template file extension (default: .tpl)
--verbose -v Enable verbose logging

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"

# With specific account
gsg new --account my-account-uuid

Options:

Option Short Description
--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 (Windows only β€” uses PowerShell)

Supported Configuration Files

File Type Description
launchSettings.json Visual Studio launch settings
web.config .NET Framework XML configuration
*.json Generic JSON configuration files

Workflow Example

Initial Setup (One-time per repository)

  1. Have your configuration files ready (e.g., local.settings.json)
  2. Run gsg init to create template files
  3. Run gsg new to push values to 1Password
  4. Commit the .tpl files to source control
  5. Add original config files to .gitignore

Daily Development

  1. Clone repository
  2. Run gsg
  3. 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.json
  • renovate.json
  • .vscode/extensions.json

Tips & Tricks

  • To simplify authentication, allow 1Password desktop app to integrate with CLI (check box in settings)

CLI

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

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

See AGENTS.md for build instructions.

Changes from Previous Version

No structural changes between v2026.8.30.3 and v2026.9.3.5.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.