{"id":34221801,"url":"https://github.com/alchemmist/devsyringe","last_synced_at":"2026-03-13T19:05:15.606Z","repository":{"id":297690823,"uuid":"997528476","full_name":"alchemmist/devsyringe","owner":"alchemmist","description":"A CLI tool for injecting dynamic values into code or config files based on declarative rules.","archived":false,"fork":false,"pushed_at":"2026-03-04T09:10:43.000Z","size":61213,"stargazers_count":31,"open_issues_count":17,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T15:32:33.638Z","etag":null,"topics":["automation","cli","devops","golang","tui"],"latest_commit_sha":null,"homepage":"https://devsyringe.xyz","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alchemmist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-06T17:24:54.000Z","updated_at":"2026-03-04T09:09:52.000Z","dependencies_parsed_at":"2025-06-06T21:38:57.058Z","dependency_job_id":"dd6d3749-eab3-4521-80ba-d371e2ed4cfc","html_url":"https://github.com/alchemmist/devsyringe","commit_stats":null,"previous_names":["alchemmist/devsyringe"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/alchemmist/devsyringe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemmist%2Fdevsyringe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemmist%2Fdevsyringe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemmist%2Fdevsyringe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemmist%2Fdevsyringe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alchemmist","download_url":"https://codeload.github.com/alchemmist/devsyringe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemmist%2Fdevsyringe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30472989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T17:15:31.527Z","status":"ssl_error","status_checked_at":"2026-03-13T17:15:22.394Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","cli","devops","golang","tui"],"created_at":"2025-12-15T23:23:41.084Z","updated_at":"2026-03-13T19:05:15.593Z","avatar_url":"https://github.com/alchemmist.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2\u003e\u003cimg src=\"./media/logo.svg\" alt=\"Favicon Preview\" width=\"130\" align=\"center\"\u003e Devsyringe\u003c/h2\u003e\n\n[![Github](https://img.shields.io/badge/alchemmist%2Fdevsyringe-blue?logo=github\u0026label=github\u0026color=blue)](https://github.com/alchemmist/devsyringe)\n![Last commit](https://img.shields.io/github/last-commit/alchemmist/devsyringe?style=flat) ![Stars](https://img.shields.io/github/stars/alchemmist/devsyringe?style=flat)\n![Forks](https://img.shields.io/github/forks/alchemmist/devsyringe?style=flat)\n![License](https://img.shields.io/github/license/alchemmist/devsyringe?style=flat)\n![Contributors](https://img.shields.io/github/contributors/alchemmist/devsyringe?style=flat)\n![Go](https://img.shields.io/badge/1.24-default?label=Go)\n[![Build](https://github.com/alchemmist/devsyringe/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/alchemmist/devsyringe/actions/workflows/build.yaml)\n\nCLI for inject dynamic values into code/config files from external commands using a declarative YAML config. More about this tool in article: «[Devsyringe: Stop Copy-Pasting Dynamic Values](https://alchemmist.xyz/articles/the-devsyringe/)»\n\n## Why?\n\nIn many projects, you have parameters like web domains, API tokens, titles, passwords, or UUIDs.\nWhen working in a programming environment, we often use `.env` files and helper libraries:\n\n```python\nload_dotenv(find_dotenv())\nhost = get_env(\"HOST\")\n```\n\nThis works well when you have a compiler, package manager, or libraries.\nBut sometimes you need to work with simple HTML files, static configs, or scripts --- where such tools are not available.\n\nDevsyringe solves this problem: it can fetch values from any source and inject them into any target files, making your parameters dynamic without templates.\n\n## Demo\n\n\u003cp align=\"left\"\u003e\n    \u003cimg src=\"./media/demo2.gif\" alt=\"Demo GIF\" width=\"600\" style=\"border-radius: 15px; box-shadow: 0px 0px 40px rgba(0, 0, 0, 0.3)\"\u003e\n\u003c/p\u003e\n\nIn this demo we use this compose file:\n\n```yaml\nserums:\n  https_host:\n    source: ssh -R 80:localhost:3000 serveo.net\n    mask: https?://[^\\s]*?\\.serveo\\.net\\b\n    targets:\n      .env:\n        path: ./.env\n        clues: [\"HOST\"]\n```\n\nDevsryinge run command, cut vlue from ouput with mask and replace value in target `.env` file under the mask to new. Very simple!\n\n## Installation\n\n1. Install with **Go**:\n\n```sh\ngo install github.com/alchemmist/devsyringe/cmd/dsy@latest\n```\n\n2. Arch from **`AUR`**:\n```sh\nparu -S devsyringe\n# or: yay -S devsyringe\n```\n\n3. Mac with `brew`:\n```sh\nbrew tap alchemmist/homebrew-tap\nbrew install devsyringe\n```\n\n\u003ch2 id=\"usage\"\u003eUsage\u003c/h2\u003e\n\n- Commands for preocess cofnig and controll processes, which need to be got injectable values. See table bottom.\n\n- \u003cp\u003eUse \u003ccode\u003edsy [command] --help\u003c/code\u003e for more information about a command.\u003c/p\u003e\n\n- Use `dsy` without commands or flags for run TUI with table of processes.\n  - In TUI you can see table of processes, which devsyringe run. In table you can see status of process (`stoped` or `active`), command for running, `PID` and title.\n  - Here you can controll processes with hotkeys. Press `?` for see help. You can stop process, delete process, see full ouput of process and so on.\n  Available commands for process config and controll processes:\n  \u003ctable\u003e\n    \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth\u003eCommand\u003c/th\u003e\n        \u003cth\u003eDescription\u003c/th\u003e\n      \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n      \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003ecompletion\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eGenerate the autocompletion script for the specified shell\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003edelete\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eIf not stopped, stop. Then delete process with [title] from list and delete all logs.\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003ehelp\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eHelp about any command\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003einject\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eStart an injection based on some config\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003elist\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eShow dynamic list of running processes\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003elogs\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eShow logs from process with [title]\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd\u003e\u003ccode\u003estop\u003c/code\u003e\u003c/td\u003e\n        \u003ctd\u003eStop process with [title], but save logs and keep in list\u003c/td\u003e\n      \u003c/tr\u003e\n    \u003c/tbody\u003e\n  \u003c/table\u003e\n\n## Configuration\n\nDevsyringe uses a **YAML file** (usually named `devsyringe.yaml`) to describe what commands to run,\nhow to extract values from their output, and where to inject them.\n\n### Top-level structure\n\n```yaml\nserums:\n  \u003ctitle\u003e:\n    source: \u003ccommand\u003e\n    mask: \u003cregex\u003e\n    max-timeout: \u003cseconds\u003e\n    targets:\n      \u003calias\u003e:\n        path: \u003cfile-path\u003e\n        clues: [\u003cclue1\u003e, \u003cclue2\u003e, ...]\n```\n\n`serums` — the root section. Each child key under serums defines a serum (a dynamic value you want to manage).\n\n`\u003ctitle\u003e` — unique name of the serum (e.g. localtunnel, https_host, ping-test).\n\n| Option        | Type      | Description                                                                                         | Example                         |\n| ------------- | --------- | --------------------------------------------------------------------------------------------------- | ------------------------------- |\n| `source`      | string    | Command to run. Its output will be scanned to extract values.                                       | `lt --port 80`                  |\n| `mask`        | regex     | Regular expression to capture the desired part of the output. If omitted, the whole output is used. | `https://[a-z0-9\\-]+\\.loca\\.lt` |\n| `max-timeout` | int (sec) | Maximum time to wait for `source` output before failing.                                            | `5`                             |\n| `targets`     | map       | Where to inject the extracted value(s). Each target has its own settings.                           | see below                       |\n\n**Targets:**\nEach serum may inject values into one or multiple files.\n\n```yaml\ntargets:\n  \u003calias\u003e:\n    path: \u003cfile-path\u003e\n    clues: [\u003cclue1\u003e, \u003cclue2\u003e, ...]\n```\n\n`\u003calias\u003e` — arbitrary name for readability (e.g. env, js, config).\n\n`path` — relative or absolute path to the file to update.\n\n`clues` — list of words/markers that help Devsyringe find the right place in the file to replace.\n\n### Examples\n\n**Exampel 1** -- Localtunnel URL injection:\n\n```yaml\nserums:\n  localtunnel:\n    source: lt --port 80\n    mask: https://[a-z0-9\\-]+\\.loca\\.lt\n    targets:\n      .env:\n        path: test/.env\n        clues: [\"HOST\"]\n      js:\n        path: test/static.js\n        clues: [\"const\", \"url\"]\n```\n\n**Example 2** -- SSH serveo tunnel with timeout:\n\n```yaml\nserums:\n  https_host:\n    source: ssh -R 80:localhost:3000 serveo.net\n    mask: https?://[^\\s]*?\\.serveo\\.net\\b\n    max-timeout: 5\n    targets:\n      .env:\n        path: ./.env\n        clues: [\"HOST\"]\n      js:\n        path: ./static/scanner.js\n        clues: [\"const\", \"url\"]\n```\n\n## Contribution\n\nIf you run into any issues or have any suggestions, open a Pull Request that includes the updates and I'll review/comment/merge it as soon as I can. If you don't have enough time or don't know how to fix the issue, submit an Issue and provide as much detail as you can.\n\nFor any questions, mail at: \u003ca href=\"mailto:anton.ingrish@gmail.com\"\u003eanton.ingrish@gmail.com\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemmist%2Fdevsyringe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falchemmist%2Fdevsyringe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemmist%2Fdevsyringe/lists"}