Stop copy-pasting dynamic values.
Devsyringe runs your command, extracts the value you need, and updates every file that needs it.
go install github.com/alchemmist/devsyringe/cmd/dsy@latest
One small config.
One repeatable update.
Some files cannot read environment variables at runtime. Tunnel URLs, tokens, IDs, and build values end up copied into them by hand. Devsyringe automates that update without introducing a template engine.
- Run
Start any shell command and read its output.
- Capture
Match the dynamic value with a regular expression.
- Locate
Find target lines using simple textual clues.
- Inject
Write the value into every target file.
See the whole operation.
A single run starts a tunnel, captures its live URL, and updates the files that reference it.
The config says exactly what happens.
A serum connects one source command to one or more target files. Run it with dsy inject -c devsyringe.yaml.
devsyringe.yaml
serums:
localtunnel:
source: lt --port 8080
mask: https://[a-z0-9\-]+\.loca\.lt
targets:
env:
path: ./.env
clues: ["API_BASE_URL"]
frontend:
path: ./src/config.js
clues: ["const", "API_URL"]
- source
- The command to run.
- mask
- The value to capture from its output.
- targets
- The files and lines to update.