whatisgithub

What is sigil?

gliderlabs/sigil — explained in plain English

Analysis updated 2026-08-08 · repo last pushed 2026-08-06

419GoAudience · ops devopsComplexity · 2/5ActiveLicenseSetup · easy

In one sentence

Sigil is a command-line tool that fills in placeholders in text files with values you provide, like a mail-merge for config files. It supports shell-style variables and Go templates with conditionals and loops.

Mindmap

mindmap
  root((repo))
    What it does
      Replaces placeholders in text
      Supports two syntax styles
      Edits files in place safely
    Inputs
      Command-line variables
      JSON YAML env files
      Environment variables
    Template features
      POSIX variable expansion
      Go template syntax
      Conditionals and loops
    Use cases
      Config for multiple environments
      Inject secrets into files
      Generate files from templates
    Tech stack
      Go language
      Go standard templates
      Command-line tool

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Generate environment-specific config files from a single template for dev, staging, and production.

USE CASE 2

Inject environment variables and secrets into config files without hardcoding them.

USE CASE 3

Build reusable templates that pull values from JSON or YAML files and apply formatting like capitalization.

What is it built with?

GoGo templates

How does it compare?

gliderlabs/sigiltj/triagebloom42/markdown-ninja
Stars419409401
LanguageGoGoGo
Last pushed2026-08-062020-05-29
MaintenanceActiveDormant
Setup difficultyeasymoderateeasy
Complexity2/52/52/5
Audienceops devopsdeveloperwriter

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Download the single Go binary and run it from the command line, no external dependencies required.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

Sigil is a command-line tool that takes text containing placeholders and replaces them with actual values you provide. Think of it like a mail-merge: you write a template once with blanks like ${name} or {{ $port }}, and it fills in the blanks to produce a finished file. It supports two styles of placeholders. The first is POSIX-style variable expansion, familiar to anyone who has written shell scripts, things like $name or ${count:-3} (which means "use the value of count, or 3 if it's not set"). The second is a richer templating syntax using {{ }} that supports conditionals, loops, and modifier pipelines, so you can capitalize text, pull values from JSON files, include other templates, or repeat sections. You can pass variables as simple command-line arguments (name=Jeff) or load them from JSON, YAML, or .env files. The typical user is someone managing configuration files across different environments. For example, if you have a config template for a web server and need to generate different versions for development, staging, and production with different ports and database hosts, this tool handles that. It can even edit files in place, safely swapping in the rendered output only if processing succeeds. It also reads your environment variables automatically, which makes it handy for injecting secrets or settings into config files without hardcoding them. One notable design choice is that the templating engine is built on Go's standard template package, so anyone familiar with Go templates will feel at home. You can also customize the delimiter characters, which matters when your template itself generates text that contains {{ }}, like Packer configuration files, so the tool doesn't get confused about which braces to process and which to leave alone.

Copy-paste prompts

Prompt 1
Write a sigil command that takes a template file called app.conf.sigil and fills in the variables port=8080 and db_host=localhost to produce a finished app.conf file.
Prompt 2
Create a Go template using sigil syntax that includes a conditional: if the environment is production, output one database URL, otherwise output a localhost URL.
Prompt 3
Show me how to use sigil to read variables from a .env file and render them into an nginx config template, editing the file in place.
Prompt 4
Write a sigil template that pulls a value from a JSON file and capitalizes it before inserting it into the output.

Frequently asked questions

What is sigil?

Sigil is a command-line tool that fills in placeholders in text files with values you provide, like a mail-merge for config files. It supports shell-style variables and Go templates with conditionals and loops.

What language is sigil written in?

Mainly Go. The stack also includes Go, Go templates.

Is sigil actively maintained?

Active — commit in last 30 days (last push 2026-08-06).

What license does sigil use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is sigil to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is sigil for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.