Description
`run` replaces _tokens_ in a config file tempalte by values from the specific data sources, saves a new config file and executes a command.
It was designed to be used in _docker containers_ where a config file should receive values from the data sources before running the container's command.
run alternatives and similar packages
Based on the "Command Line" category.
Alternatively, view run alternatives based on common mentions on social networks and blogs.
-
Rich Interactive Widgets for Terminal UIs
Terminal UI library with rich, interactive widgets — written in Golang -
survey
DISCONTINUED. A golang library for building interactive and accessible prompts with full support for windows and posix terminals. -
tcell
Tcell is an alternate terminal package, similar in some ways to termbox, but better in others. -
cointop
DISCONTINUED. A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀 -
pterm
✨ #PTerm is a modern Go module to easily beautify console output. Featuring charts, progressbars, tables, trees, text input, select menus and much more 🚀 It's completely configurable and 100% cross-platform compatible. -
The Platinum Searcher
A code search tool similar to ack and the_silver_searcher(ag). It supports multi platforms and multi encodings. -
asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies. -
CLI Color
🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows. GO CLI 控制台颜色渲染工具库,支持16色,256色,RGB色彩渲染输出,使用类似于 Print/Sprintf,兼容并支持 Windows 环境的色彩渲染 -
go-size-analyzer
A tool for analyzing the size of compiled Go binaries, offering cross-platform support, detailed breakdowns, and multiple output formats.
CodeRabbit: AI Code Reviews for Developers

Do you think we are missing an alternative of run or a related project?
Popular Comparisons
README
run
run
replaces tokens in a config file tempalte by values from the specific data sources, saves a new config file and executes a command.
It was designed to be used in docker containers where a config file should receive values from the data sources before running the container's command.
Data sources
- Environment variables
- Local JSON file
- Remote JSON file
- AWS SecretManager
Options
--input value, -i value The config template with the tokens to be replaced [$RUN_INPUT]
--output value, -o value The output path for the compiled config file [$RUN_OUTPUT]
--delay value, -d value Number of seconds to wait before running the command (default: 0) [$RUN_DELAY]
--json value, -j value JSON data to be used by JSONLoader [$RUN_JSON]
--remote-json value, -r value URL to a JSON file to be used by RemoteJSONLoader [$RUN_REMOTE_JSON]
--json-file value, -f value Path to a JSON file to be used by JSONFileLoader [$RUN_JSON_FILE]
--aws-secret value The ARN or name of a secret with a JSON encoded value [$RUN_AWS_SECRET_ARN]
--env-file value A dotenv file template to be rendered and added to the environment [$RUN_ENV_FILE]
--env-output-var value Create a environment variable with the contents of the output file [$RUN_ENV_OUTPUT_VAR]
--help, -h show help
--version, -v print the version
Example
The example below is of a container with a webserver but before starting the server it will compile the config file template using the run
command.
Environment variables (.env)
MONGO_URL="mongodb://user:[email protected]/mydb"
JWT_SECRET="my$uper$ecret"
SERVER_BIND="0.0.0.0"
SERVER_PORT="8000"
Local JSON file (/mnt/shared/secrets/vars.json)
{
"server": {
"bind": "0.0.0.0"
}
}
Remote JSON file (http://config-service/app/config.json)
{
"server": {
"port": "1234"
}
}
AWS SecretManager
Secret name: jwtconfig
{
"jwt": {
"secret": "myjwtsecret"
}
}
Config template (config.toml.dist)
[database]
url = "{{MONGO_URL}}"
[jwt]
secret = "{{jwt.secret|JWT_SECRET}}"
[server]
bind = "{{server.bind|SERVER_BIND}}"
port = "{{server.port|SERVER_PORT}}"
Dockerfile
FROM busybox:1.25.1
MAINTAINER Tarcisio Gruppi <[email protected]>
ADD https://github.com/txgruppi/run/releases/download/0.0.1/run_linux_amd64 /app/run
ADD ./config.toml.dist /app/config.toml.dist
ADD ./server /app/server
RUN run \
-d 2 \
--json-file /mnt/shared/secrets/vars.json \
--remote-json http://config-service/app/config.json \
--aws-secret jwtconfig \
-i /app/config.toml.dist \
-o /app/config.toml \
/app/server -c /app/config.toml
Running the container
docker run -d --restart=always --env-file .env -p 1234 txgruppi/run-sample
Compiled config file (config.toml)
[database]
url = "mongodb://user:[email protected]/mydb"
[jwt]
secret = "myjwtsecret"
[server]
bind = "0.0.0.0"
port = "1234"