{"id":13458117,"url":"https://github.com/dotnetcore/AgileConfig","last_synced_at":"2025-03-24T15:30:52.691Z","repository":{"id":37401477,"uuid":"169257534","full_name":"dotnetcore/AgileConfig","owner":"dotnetcore","description":"基于.NET Core开发的轻量级分布式配置中心 / .NET  Core lightweight configuration server","archived":false,"fork":false,"pushed_at":"2024-10-04T14:28:07.000Z","size":11002,"stargazers_count":1503,"open_issues_count":22,"forks_count":302,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-10-19T18:53:08.200Z","etag":null,"topics":["agileconfig","configuration","configuration-center","configuration-management","configuration-server","dotnet-core","microservice","websocket"],"latest_commit_sha":null,"homepage":"","language":"C#","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/dotnetcore.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"License.txt","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},"funding":{"open_collective":"AgileConfig"}},"created_at":"2019-02-05T14:51:57.000Z","updated_at":"2024-10-14T06:56:55.000Z","dependencies_parsed_at":"2024-03-02T10:28:59.229Z","dependency_job_id":"b101f53e-1fbe-4108-9b8e-1e2bebdf29d0","html_url":"https://github.com/dotnetcore/AgileConfig","commit_stats":{"total_commits":932,"total_committers":19,"mean_commits":49.05263157894737,"dds":"0.19420600858369097","last_synced_commit":"3a517c25577df7008791b83ef8d75ef5e6c365d8"},"previous_names":["kklldog/agileconfig"],"tags_count":143,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetcore%2FAgileConfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetcore%2FAgileConfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetcore%2FAgileConfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnetcore%2FAgileConfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnetcore","download_url":"https://codeload.github.com/dotnetcore/AgileConfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221981617,"owners_count":16911426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["agileconfig","configuration","configuration-center","configuration-management","configuration-server","dotnet-core","microservice","websocket"],"created_at":"2024-07-31T09:00:44.963Z","updated_at":"2025-03-24T15:30:52.682Z","avatar_url":"https://github.com/dotnetcore.png","language":"C#","funding_links":["https://opencollective.com/AgileConfig"],"categories":["C\\#","Configuration"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg height=\"130\" src=\"https://ftp.bmp.ovh/imgs/2021/04/5162f8595d9c6a99.png\" style=\"height: 130px\"\u003e\n\u003c/p\u003e\n    \n\u003ch1 align=\"center\"\u003eAgileConfig\u003c/h1\u003e\n\n\n\n[![Member project of .NET Core Community](https://img.shields.io/badge/member%20project%20of-NCC-9e20c9.svg)](https://github.com/dotnetcore)\n![GitHub stars](https://img.shields.io/github/stars/dotnetcore/AgileConfig)\n![Nuget](https://img.shields.io/nuget/v/agileconfig.client?label=agileconfig.client)\n![Nuget](https://img.shields.io/nuget/dt/agileconfig.client?label=client%20download)\n![Docker image](https://img.shields.io/docker/v/kklldog/agile_config?label=docker%20image)\n![GitHub license](https://img.shields.io/github/license/kklldog/AgileConfig)\n![build workflow](https://github.com/dotnetcore/AgileConfig/actions/workflows/master-ci.yml/badge.svg)\n[![package workflow](https://github.com/dotnetcore/AgileConfig/actions/workflows/release-xxx.yml/badge.svg)](https://github.com/dotnetcore/AgileConfig/actions/workflows/release-xxx.yml)\n![Commit Date](https://img.shields.io/github/last-commit/kklldog/AgileConfig/master.svg?logo=github\u0026logoColor=green\u0026label=commit)\n    \n\n\n# [English](https://github.com/kklldog/AgileConfig/blob/master/README_EN.md) | [中文看这里](https://github.com/kklldog/AgileConfig/blob/master/README_CN.md)\n\nThis is a lightweight configuration center based on .net core . It is easy to deploy , easy to learn , easy to use .\n## 😍Features\n1. easy to deploy (docker or IIS)\n2. support distributed deploy\n3. multiple environments support\n4. configuration changes takes effect in real time\n5. support IConfiguration , IOptions patten to read configurations\n6. restful api\n7. version management and easy to rollback\n8. client fault tolerance\n9. support OIDC/SSO\n10. support OpenTelemetry\n11. also can be use as a simple service register center\n    \n🔆🔆🔆Demo Project ：[AgileConfig Server Demo](http://agileconfig_server.xbaby.xyz)   name.pwd= admin/123456🔆🔆🔆   \nclient project ：[AgileConfig_Client](https://github.com/kklldog/AgileConfig_Client)   \nsamples ：    \n[AgileConfigMVCSample](https://github.com/kklldog/AgileConfig_Client/tree/master/AgileConfigMVCSample)   \n[AgileConfig WPFSample](https://github.com/kklldog/AgileConfig_Client/tree/master/AgileConfigWPFSample)    \n[AgileConfig ConsoleSample](https://github.com/kklldog/AgileConfig_Client/tree/master/AgileConfigConsoleSample)    \n\nQ\u0026A:   \nhttps://github.com/dotnetcore/AgileConfig/wiki\n \nAPI:   \n[restful api](https://github.com/dotnetcore/AgileConfig/wiki/Restful-API)\n## ChangeLog\n[Changelog](https://github.com/dotnetcore/AgileConfig/blob/master/CHANGELOG.md)\n## architecture\n![](https://s1.ax1x.com/2020/06/29/NRz1gO.png)\n### client\nA .net client to read configurations from server node .\n\n### node\nNode is just a .net core app . Client connect to the node in real time over websocket . Any node can be an admin console to manage configurations.\n### database\nAgileConfig support most popular databases.    \ndbprovider :   \nsqlserver = SqlServer   \nmysql = MySql   \nsqlite = Sqlite   \nnpgsql = PostgreSql   \noracle = Oracle  \nmongodb = Mongodb\n\n## ✅️How to use ? \n🎥[See video](https://www.bilibili.com/video/BV1FwqeYcEy9/?vd_source=767c7a8e20240041358ff961ab0cb9e5)\n### run node on docker\n``` shell\nsudo docker run \\\n--name agile_config \\\n-e TZ=Asia/Shanghai \\\n-e adminConsole=true \\\n-e db__provider=sqlite \\\n-e db__conn=\"Data Source=agile_config.db\" \\\n-p 5000:5000 \\\n-v /etc/localtime:/etc/localtime \\\n#-v /your_host_dir:/app/db \\\n-d kklldog/agile_config:latest\n```\n\nAfter the docker instance has successfully started you can visit http://localhost:5000 . \n\n## use client\ninstall client lib from nuget：\n```\nInstall-Package AgileConfig.Client\n```\nadd a section in appsettings.json of you application：\n``` json\n{\n  \"Logging\": {\n    \"LogLevel\": {\n      \"Default\": \"Information\",\n      \"Microsoft\": \"Warning\",\n      \"Microsoft.Hosting.Lifetime\": \"Information\"\n    }\n  },\n  \"AllowedHosts\": \"*\",\n\n  //agile_config\n  \"AgileConfig\": {\n    \"appId\": \"app\",\n    \"secret\": \"xxx\",\n    \"nodes\": \"http://localhost:5000,http://localhost:5001\",\n    \"name\": \"client_name\",\n    \"tag\": \"tag1\",\n    \"env\": \"dev\"\n  }\n}\n\n```\nin Main function add agileconfig client services:\n``` c#\n   public static IHostBuilder CreateHostBuilder(string[] args) =\u003e\n            Host.CreateDefaultBuilder(args)\n                .UseAgileConfig()\n                .ConfigureWebHostDefaults(webBuilder =\u003e\n                {\n                    webBuilder.UseStartup\u003cStartup\u003e();\n                });\n```\n\n## read configuration\nYou can still use `IConfiguration` or `IOption` patten to get the specific configuration value.\n``` c#\npublic class HomeController : Controller\n{\n    private readonly IConfiguration _IConfiguration;\n    private readonly IOptions\u003cDbConfigOptions\u003e _dbOptions;\n\n    public HomeController(IConfiguration configuration, IOptions\u003cDbConfigOptions\u003e dbOptions)\n    {\n        _IConfiguration = configuration;\n        _dbOptions = dbOptions;\n    }\n}\n```\n\nOr you can use `IConfigClient` interface to get the specific configuration value.\n\n``` c#\npublic class HomeController : Controller\n{\n    private readonly IConfigClient _configClient\n\n    public HomeController(IConfigClient configClient)\n    {\n        _configClient = configClient;\n    }\n\n    /// \u003csummary\u003e\n    /// By IConfigClient\n    /// \u003c/summary\u003e\n    /// \u003creturns\u003e\u003c/returns\u003e\n    public IActionResult ByIConfigClient()\n    {\n        var userId = _configClient[\"userId\"];\n        var dbConn = _configClient[\"db:connection\"];\n\n        foreach (var item in _configClient.Data)\n        {\n            Console.WriteLine($\"{item.Key} = {item.Value}\");\n        }\n\n        ViewBag.userId = userId;\n        ViewBag.dbConn = dbConn;\n\n        return View();\n    }\n}\n``` \nOr you can use a signleton instance without any injection.\n``` c#\nvar userid = ConfigClient.Instance[\"userid\"]\n```\n\n## donate\nIf this project is helpful to you, please scan the QR code below for a cup of coffee.    \n \u003cimg src=\"https://static.xbaby.xyz/alipay_qr.jpg|w30\" width=\"300\"\u003e\n     \n \u003cimg src=\"https://static.xbaby.xyz/wechatpay_qr.jpg|w30\" width=\"300\"\u003e\n   \n## thanks 💖💖💖    \n大鹏￥66.66 , 瘦草￥6.66 + 88 , ziana￥10.0 , Nullable￥9.99 , *三 ￥6.66 , HHM ￥6.66 , *。 ￥6.66 , 微笑刺客 ￥6.66 ,飞鸟与鱼 ￥38.88,  *航 ￥9.9, *啦 ￥6.66, *海 ￥6.66, Dyx 邓杨喜 ￥30 And more ...\n## contact me\nmail：minj.zhou@gmail.com   \n🐧 group：1022985150\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnetcore%2FAgileConfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnetcore%2FAgileConfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnetcore%2FAgileConfig/lists"}