{
    "componentChunkName": "component---src-templates-issues-tsx",
    "path": "/issues/623",
    "result": {"data":{"issuesJson":{"id":"77193e22-b056-5aff-824c-ef930929a41e","title":"mikefarah/yq: 款基于 go 语言编写类似 jq 的处理 yaml 文件的工具","number":623,"bodyHTML":"<div align=\"center\" dir=\"auto\">\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\"><img src=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\" width=\"100%\" height=\"3\" data-animated-image=\"\" data-canonical-src=\"https://cdn.jsdelivr.net/gh/eryajf/tu@main/img/image_20240420_214408.gif\" style=\"max-width: 100%; height: auto; max-height: 3px;\"></a><br><br></p>\n<markdown-accessiblity-table><table role=\"table\">\n<thead>\n<tr>\n<th align=\"right\">Repos</th>\n<th align=\"left\"><a href=\"https://github.com/mikefarah/yq\">mikefarah/yq</a></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"right\"><strong>Views</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/e3002b7c85d3fdb0f680f88c68f9c9e5370bcd948ef78c34fe59d5fbbabaffce/68747470733a2f2f76696577732e77686174696c656172656e65642e746f6461792f76696577732f6769746875622f6d696b6566617261682f79712e737667\" alt=\"views\" data-canonical-src=\"https://views.whatilearened.today/views/github/mikefarah/yq.svg\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>Stars</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/5b4bf4b8f0aceb79bc064154e6a8c1e0e4cd51c25d0ec3060e18498d292ec258/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d696b6566617261682f79713f636f6c6f723d663266303864266c6f676f3d556e64657274616c65266c6f676f436f6c6f723d656234363330\" alt=\"stars\" data-canonical-src=\"https://img.shields.io/github/stars/mikefarah/yq?color=f2f08d&amp;logo=Undertale&amp;logoColor=eb4630\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>Forks</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/5aaa6a28e1d1636897dd326bb09c72d2cc2950009fdfd49c6d5b93f13c8380a1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6d696b6566617261682f79713f636f6c6f723d626138366562266c6f676f3d48616e647368616b65266c6f676f436f6c6f723d656136616136\" alt=\"forks\" data-canonical-src=\"https://img.shields.io/github/forks/mikefarah/yq?color=ba86eb&amp;logo=Handshake&amp;logoColor=ea6aa6\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>License</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/846396f00a62506400c0cc14aa43592de509d92ac25a2fe999fc4656ea4db513/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d696b6566617261682f79713f6c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e53556845556741414144414141414177434159414141425841766d48414141414358424957584d41414173544141414c457745416d70775941414144336b6c45515652346e4f335953557a5555426748384a726f57567255474a66456d3773584e63534446784d544c327069347348456778654e526f77586770455742445552522532424e414e4f4b4f4b36366f6f4b4a4742586545475263574163455646475152484677516d483525324630774861655748493944554455354c356b6e6568644f62377a66652532423139636e434a47495243516945596c514237594a4979474c38616f73756c565a36695246516a69474b6b7564576735614c6c704f70704e586e665071773555304459524a6d56786a4367464633424c755a476d416f5655694b4541726d583744375553677351706f72674761336748664b34483663754262435644334771683141352532424c6745253242467749656e514d306a6f446f66714c6f48564e7742796d384370546e416d327a51713073676478624964515a556c416b7150415a3664676a303541446f59526f6f66792532466f5869726f376b3551586a4c6f70677a4b69514e6c4c4461716f4967754577426a7a7150355066446a45394479495879493633464d547751464d43567271774e61763451666f52673538514625324266724d485172454b3844546f434d714e4179574e4866786d54526f4c4f726d5352566747744466714345715a4f4851727a6f34706243557341333431365169364551394b476a6345465267484f724f4b6e5536574162396247455459656b4b7843766a546167394534706a653534446b3551503862624d4859762532464333756541654a6b50304f4778422532424a70426e4172595238455951516e6f4e31414e4661426e5050356c385372736559514c303641646b30464a5938484f5761424d6c6541486a683068506f73497a6c6f3876304125324633345a694f6548726130714b52504d5653493774762532423932747725324676687855654252713456454c674d376642714b354770526d6f514c584e7075625475367a6f4e52706754386e5051627138347764253246494375767978694b4871694e41664933774d367549684271476b4c696977414f734b44714f68743749747239567938536a52424557667941627225324668523142667056514664484a42253246423268683778376a36517077435665655951326b72554235436c636a3641326d3067576a25324244306d4c34397a573563517943484c4e37726a6c6d6d6174457958582532464372547a412532466f51785a6b576c39474a5443566f25324279546a3837253242346769504b6376307149486f344156344430565a727251493334706e70524d36357875652532467a417265453425324654253246536f676c664542794d7369517441546c4c3352414a355948725378365a44665337307337754d486842705225324659423573305057366f455270316236253246667252684b3353444c35546965364f515548516c5133735644752532427a50636b397657453973747225324236496a533967486d5750616861444a25324277434b364e494242587348423948796b587378774470686c436d416476706c6162554a4e6e5a504239342532464e7436784f6538587a4562503257684d335741673147756236744825324233513150673337365239713475716c6e6f36676448476a444f5139306562303141484d3672596975554a314f713472344656756a35765239427a4d3957674e764f7977446869495951467667626366774166774d764863615067425041253246447948476a50624e394138616d6562636477416444354e6633373574787165774e5552656f797677424958594c645170576c6877465771745061435044334173467541535636717171496c62304a766b564331464c39576b4c55556c55574b337a585a4c46432532423125324642726f46746f364f7358497545594a5034447a7a5732594656316f4a614141414141456c46546b5375516d4343\" alt=\"license\" data-canonical-src=\"https://img.shields.io/github/license/mikefarah/yq?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAD3klEQVR4nO3YSUzUUBgH8JroWVrUGJfEm7sXNcSDFxMTL2pi4sHEgxeNRowXgpEWBDURR%2BNANOKOK66ooKJGBXeEGRcWAcEVFGQRHFwQmH5%2F0wHaeWHI9DUDU5L5knehdOb7zfe%2B19cnCJGIRCQiEYlQB7YJIyGL8aosulVZ6iRFQjiGKkudWg5aLlpOppNXnfPqw5U0DYRJmVxjCgFF3BLuZGmAoVUiKEArmX7D7USgsQporgGa3gHfK4H6cuBbCVD3Gqh1A5%2BLgE%2BFwIenQM0joDofqLoHVNwBym8CpTnAm2zQq0sgdxbIdQZUlAkqPAZ6dgj05ADoYRoofy%2FoXiro7k5QXjLopgzKiQNlLDaqoIguEwBjzqP5PfDjE9DyIXyI63FMTwQFMCVrqwNav4QfoRg58QF%2BfrMHQrEK8DToCMqNAyWNHfxmTRoLOrmSRVgGtDfqCEqZOHQrzo4pbCUsA3416Qi6EQ9KGjcEFRgHOrOKnU6WAb9bGETYekKxCvjTag9E4pje54Dk5QP8bbMHYv%2FC3ueAeJkP0OGxB%2BJpBnArYR8EYQQnoN1ANFaBnPP5l8SrseYQL06Adk0FJY8HOWaBMleAHjh0hPosIzlo8v0A%2F34ZiOeHra0qKRPMVSI7tv%2B92tw%2FvhxUeBRq4VELgM7fBqK5GpRmoQLXNpubTu6zoNRpgT8nPQbq84wd%2FICuvyxiKHqiNAfI3wM6uIhBqGkLiiwAOsKDqOht7Itr9Vy8SjRBEWfyAbr%2FhR1BfpVQFdHJB%2FB2hh7x7j6QpwCVeeYQ2krUB5Clcj6A2m0gWj%2BD0mL49zW5cQyCHLN7rjlmmatEyXX%2FCrTzA%2FoQxZkWl9GJTCVo%2ByTj87%2B4giPKcv0qIHo4AV4D0VZrrQI34pnpRM65xue%2FzAreE4%2FT%2FSoglfEByMsiQtATlL3RAJ5YHrSx6ZDfS70s7uMHhBpR%2FYB5s0PW6oERp1b6%2FfrRhK3SDL5Tie6OQUHQlQ3sVDu%2BzPck9vWE9str%2B6IjS9gHmWPahaDJ%2BwCK6NIBBXsHB9HykXsxwDphlCmAdvplabUJNnZPB94%2FNt6xOe8XzEbP2WhM3WAg1Gub6tH%2B3Q1Pg376R9q4uqlno6gdHGjDOQ90eb01AHM6rYiuUJ1Oq4r4FVuj5vR9BzM9WgNvOywDhiIYQFvgbcfwAfwMvHcaPgBPA%2FDyHGjPbN9A8amebcdwAdD5Nf375txqewNUReoyvwBIXYLdQpWlhwFWqtPaCPD3AsFuASV6qqqIlb0JvkVC1FL9WkLUUlUWK3zXZLFC%2B1%2FBroFto6OsXIuEYJP4DzzW2YFV1oJaAAAAAElFTkSuQmCC\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>UpdatedAt</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/c3db834afa477be3cea322ced9b06f018903d8734c23c608dbeedfc9fec45cdb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6d696b6566617261682f79713f646973706c61795f74696d657374616d703d636f6d6d6974746572266c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e5355684555674141414234414141416543415941414141374d4b3669414141414358424957584d41414173544141414c457745416d7077594141414648556c45515652346e4c5658375539615678776d3236646c582532466468627825324232253246516e626b7655627264554151674a4a496655444e574454546d4f76314651554661504a346b7573725630314a7431734e70637453327533626f745a746d786439744a5346536f714b71494635625944464c436f76436c656673747a4a387758524c445a4c7a6e6b634f343535376e3364332532466e655a3472454f515a74315771462532423858467234253242664f4c4565326a6f59307a776638546f795a50766a45676b4c592532426b306d6d72584f36644b696e787a476b30666a5430782532425279723055716e6359637a4d317263347451253242497270324c4758646f344e4334567657715453373277716c632532427231334f527269364b6458646e624f484c6c776c7a4a70524b6e3657342532424b36706f4f434e6e494166486a253246253242776168495a4234764b6e715a6630714a704e49716c2532467638545530634e6c3572627963337730516e54703379324c54614a374d314e617844723266526e315370504736476961323174664533345463614f617931694d55564f5146624659714957536f31573854694156616e43306576584f4542375770313448466232327a453566714c4f433545524c515769644e614e49347545636339693768634a6c644868324e57725135674464624f6c7061756d49754c62326174415144506e7a3062384e6257636d785656524a33486d7870536377777a4f4a6d4b44524765384c6c435a444c4739673754496e5631516c376462586256316533675430574b697243466f6d6b5079767758466c5a474a4f6a563625324253743634757564445a4f55354555636f782532464d455144567674364d62634e3237593341797a687633737061557242365a3971724a534f3139657a6a387032704c426b4a792532426343484a7857493567573574636652527a31645531394766476b6f7539505a4f34736d52396a4746777065783444793362766e6d4b79706f74625531335669646a71595a68726a343972764d457425324625324659714c7a396430304e6a57253246637a67796f394f35317a7336614e6c6f354644747530445a675146686c47584a30644241446f4e6864367576703657686f617967374e394c564748386d443462253246486e667455516f4e4734764c51306769784d716c5725324234714f6a744e48446733723166365969525347785279375576714c62395534716b716e78504f4e7661356c447048723125324279794b524e4b57425a793565644d554842326d3572792532422532424551772532427a6766347a6f39253246306f634e3357527a4c4277344a2532424a7950574372716d4967475974554f735744346f785a46516f50556a4770564871493425324661666b51504336665a5165654d31253242764c7549516e6a754257514444437363726d485039656f4e5041744271664f6e5875614b25324268364a45624772732532427076764d6d78654962683836336162565065597953456f39464a48704e4d464a59253242503563575a6b6667374f3174537759436553514c54593345385130392532464256504a556c78516a7368543142736343593032723955445542667643484236367063665041336c794165336e6772332532463437584467614a7a736c7937787741364e5a746c555550437541487161536a5549502532427375653842525741432532464e6651374a5a505a35397330476a3756747049537a34685125324243706658474d4b685a63764c70554b7866574d386f68766637702532464f446a4842666356463849736b383267314648796b63564645253242555a414158343761452532464d6c34504f3530506e75683025324678346e6d637957507364774468427836436d6b4c562532466746446a594b784f4a4f4674623077517949684c39527943774b33414f664947703159464542686e4d4a634c525745624b644b516f55366e63545a6b494544696341792532463831645675454d3552775066657934784f7830496b25324649324e6e466b692532425761664f6f464959466367595a43797864376543556a626334416d46363566742532466b4d686b336f25324235686337734d4a79716a4a45477659466151464972375930775077384246415925324236253242766d6b3377367a7a5275444d6d5a5652736668385274413075455453443775434254364459514e36697665553066706b594c6a453671725672744f78654e4b553954484c5a4a396b4255324a427342685635416976422532466f4b61514e4b675043427744596149665a4334616454684f71463457454e56694c4a77566f586f62664c424b56773637414f6154734c6336355461564b32317651344c613939654b6359673576627873624f627a5451394e37554b4467554f3177446a6944494942736868357a746733396e514d4c535a4248344f7a424f55444551586d323036643366634c67737762585141345068634b336e6873775531427a3877765130395248472532466f597933656a6677424e6d746f59714c4130586741414141424a52553545726b4a676767253344253344266c6162656c3d557064617465644174\" alt=\"last-commit\" data-canonical-src=\"https://img.shields.io/github/last-commit/mikefarah/yq?display_timestamp=committer&amp;logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHUlEQVR4nLVX7U9aVxwm26dlX%2Fdhbx%2B2%2FQnbkvUbrdUAQgJJIfUDNWDTTmOv1FQUFaPJ4kusrV01Jt1sNpctS2u3botZtmxd9tJSFSoqKqIF5bYDFLCovClefstzJ8wXRLDZLznkcO4557n3d3%2FneZ4rEOQZt1WqF%2B8XFr4%2BfOLEe2joY0zwf8ToyZPvjEgkLY%2Bk0mmrXO6dKinxzGk0fjT0x%2BRyr0UqncYczM1rc4tQ%2BIrp2LGXdo4NC4VvWqTS72wqlc%2Br13ORri6KdXdnbOHLlwlzJpRKn6W4%2BK6poOCNnIAfHj%2F%2BwahIZB4vKnqZf0qJpNIql%2Fv8TU0cNl5rbyc3w0QnTp3y2LTaJ7M1NaxDr2fRn1SpPG6Gia21tfE34TcaOay1iMUVOQFbFYqIWSo1W8TiAVanC0evXOEB7Wp14HFb22zE5fqLOC5ERLQWidNaNI4uEcc9i7hcJldHh2NWrQ5gDdbOlpaumIuLb2atAQDPnz0b8NbWcmxVVRJ3HmxpScwwzOJmKDRGe8LlCZDLG9g7TInV1Ql7dbXbV1e3gT0WKirCFomkPyvwXFlZGJOjV6%2BSt64uudDZOU5EUcox%2FMEQDVvt6MbcN27Y3Ayzhv3spaUrB6Z9qrJSO19ezj8p2pLBkJy%2BcCHJxWI5gW5tcfRRz1dU19GfGkou9PZO4smR9jGFwpex4Dy3bvnmKypotbU13VidjqYZhrj49rvMEt%2F%2FYqLz9d00NjW%2Fczgyo9O51zs6aNlo5FDtu0DZgQFhlGXJ0dBADoNhd6uvp6Whoayg7N9LVGH8mD4b%2FHnftUQoNG4vLQ0gixMqlW%2B4qOjtNHDg3r1f6YiRSGxRy7UvqLb9U4qkqnxPONva5lDpHr1%2ByyKRNKWBZy5edMUHB2m5ry%2B%2BEQw%2Bzgf4zo9%2F0ocN3WRzLBw4J%2BJyPWCrqmIgGYtUOsWD4oxZFQoPUjGpVHqI4%2FafkQPC6fZQeeM1%2BvLuIQnjuBWQDDCscrmHP9eoNPAtBqfOnXuaK%2Bh6JEbGrs%2BpvvMmxeIbh863abVPeYySEo9FJHpNMFJY%2BP5cWZkfg7O1tSwYCeSQLTY3E8Q09%2FBVPJUlxQjshT1BscCY02r9UDUBfvCHB66pcfPA3lyAe3ngr3%2F47XDgaJzsly7xwA6NZtlUUPCuAHqaSjUIP%2Bsue8BRWAC%2FNfQ7JZPZ59s0Gj7VtpISz4hQ%2BCpfXGMKhZcvLpUKxfWM8ohvf7p%2FODjHBfcVF8Isk82g1FHykcVFE%2BUZAAX47aE%2FMl4PO50Pnuh0%2Fx4nmcyWPsdwDhBx6CmkLV%2FgFDjYKxOJOFtb0wQyIhL9RyCwK3AOfIGp1YFEBhnMJcLRWEbKdKQoU6ncTZkIEDicAy%2F81dVuEM5RwPfey4xOx0Ik%2FI2NnFki%2BWafOoFIYFcgYZCyxd7eCUjbc4AmF65ft%2FkMhk3o%2B5hc7sMJyqjJEGvYFaQFIr7Y0wPw8BFAY%2B6%2Bvmk3w6zzRuDMmZVRsfh8RtA0uETSD7uCBT6DYQN6iveU0fpkYLjE6qrVrtOxeNKU9THLZJ9kBU2JBsBhV5AivB%2FoKaQNKgPCBwDYaIfZC4adThOqF4WENViLJwVoXobfLBKVw67AOaTsLc65TaVK21vQ4La99eKcYg5vbxsbObzTQ9N7UKDgUO1wDjiDIIBshh5ztg39nQMLSZBH4OzBOUDEQXm206d3fcLgswbXQA4PhcK3nhswU1Bz8wvQ09RHG%2FoYy3ejfwBNmtoYqLA0XgAAAABJRU5ErkJggg%3D%3D&amp;label=UpdatedAt\" style=\"max-width: 100%;\"></a></td>\n</tr>\n<tr>\n<td align=\"right\"><strong>CreatedAt</strong></td>\n<td align=\"left\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/2528b26a80e3556bb23a462561995e123f66464e8b08458b2995285c2b22547a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f637265617465642d61742f6d696b6566617261682f79713f6c6f676f3d64617461253341696d616765253246706e672533426261736536342532436956424f5277304b47676f414141414e5355684555674141414234414141416543415941414141374d4b3669414141414358424957584d41414173544141414c457745416d7077594141414648556c45515652346e4c5658375539615678776d3236646c582532466468627825324232253246516e626b7655627264554151674a4a496655444e574454546d4f76314651554661504a346b7573725630314a7431734e70637453327533626f745a746d786439744a5346536f714b71494635625944464c436f76436c656673747a4a387758524c445a4c7a6e6b634f343535376e3364332532466e655a3472454f515a74315771462532423858467234253242664f4c4565326a6f59307a776638546f795a50766a45676b4c592532426b306d6d72584f36644b696e787a476b30666a5430782532425279723055716e6359637a4d317263347451253242497270324c4758646f344e4334567657715453373277716c632532427231334f527269364b6458646e624f484c6c776c7a4a70524b6e3657342532424b36706f4f434e6e494166486a253246253242776168495a4234764b6e715a6630714a704e49716c2532467638545530634e6c3572627963337730516e54703379324c54614a374d314e617844723266526e315370504736476961323174664533345463614f617931694d55564f5146624659714957536f31573854694156616e43306576584f4542375770313448466232327a453566714c4f433545524c515769644e614e49347545636339693768634a6c644868324e57725135674464624f6c7061756d49754c62326174415144506e7a3062384e6257636d785656524a33486d7870536377777a4f4a6d4b44524765384c6c435a444c4739673754496e5631516c376462586256316533675430574b697243466f6d6b5079767758466c5a474a4f6a563625324253743634757564445a4f55354555636f782532464d455144567674364d62634e3237593341797a687633737061557242365a3971724a534f3139657a6a387032704c426b4a792532426343484a7857493567573574636652527a31645531394766476b6f7539505a4f34736d52396a4746777065783444793362766e6d4b79706f74625531335669646a71595a68726a343972764d457425324625324659714c7a396430304e6a57253246637a67796f394f35317a7336614e6c6f354644747530445a675146686c47584a30644241446f4e6864367576703657686f617967374e394c564748386d443462253246486e667455516f4e4734764c51306769784d716c5725324234714f6a744e48446733723166365969525347785279375576714c62395534716b716e78504f4e7661356c447048723125324279794b524e4b57425a793565644d554842326d3572792532422532424551772532427a6766347a6f39253246306f634e3357527a4c4277344a2532424a7950574372716d4967475974554f735744346f785a46516f50556a4770564871493425324661666b51504336665a5165654d31253242764c7549516e6a754257514444437363726d485039656f4e5041744271664f6e5875614b25324268364a45624772732532427076764d6d78654962683836336162565065597953456f39464a48704e4d464a59253242503563575a6b6667374f3174537759436553514c54593345385130392532464256504a556c78516a7368543142736343593032723955445542667643484236367063665041336c794165336e6772332532463437584467614a7a736c7937787741364e5a746c555550437541487161536a5549502532427375653842525741432532464e6651374a5a505a35397330476a3756747049537a34685125324243706658474d4b685a63764c70554b7866574d386f68766637702532464f446a4842666356463849736b383267314648796b63564645253242555a414158343761452532464d6c34504f3530506e75683025324678346e6d637957507364774468427836436d6b4c562532466746446a594b784f4a4f4674623077517949684c39527943774b33414f664947703159464542686e4d4a634c525745624b644b516f55366e63545a6b494544696341792532463831645675454d3552775066657934784f7830496b25324649324e6e466b692532425761664f6f464959466367595a43797864376543556a626334416d46363566742532466b4d686b336f25324235686337734d4a79716a4a45477659466151464972375930775077384246415925324236253242766d6b3377367a7a5275444d6d5a5652736668385274413075455453443775434254364459514e36697665553066706b594c6a453671725672744f78654e4b553954484c5a4a396b4255324a427342685635416976422532466f4b61514e4b675043427744596149665a4334616454684f71463457454e56694c4a77566f586f62664c424b56773637414f6154734c6336355461564b32317651344c613939654b6359673576627873624f627a5451394e37554b4467554f3177446a6944494942736868357a746733396e514d4c535a4248344f7a424f55444551586d323036643366634c67737762585141345068634b336e6873775531427a3877765130395248472532466f597933656a6677424e6d746f59714c4130586741414141424a52553545726b4a676767253344253344266c6162656c3d437265617465644174\" alt=\"create-at\" data-canonical-src=\"https://img.shields.io/github/created-at/mikefarah/yq?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHUlEQVR4nLVX7U9aVxwm26dlX%2Fdhbx%2B2%2FQnbkvUbrdUAQgJJIfUDNWDTTmOv1FQUFaPJ4kusrV01Jt1sNpctS2u3botZtmxd9tJSFSoqKqIF5bYDFLCovClefstzJ8wXRLDZLznkcO4557n3d3%2FneZ4rEOQZt1WqF%2B8XFr4%2BfOLEe2joY0zwf8ToyZPvjEgkLY%2Bk0mmrXO6dKinxzGk0fjT0x%2BRyr0UqncYczM1rc4tQ%2BIrp2LGXdo4NC4VvWqTS72wqlc%2Br13ORri6KdXdnbOHLlwlzJpRKn6W4%2BK6poOCNnIAfHj%2F%2BwahIZB4vKnqZf0qJpNIql%2Fv8TU0cNl5rbyc3w0QnTp3y2LTaJ7M1NaxDr2fRn1SpPG6Gia21tfE34TcaOay1iMUVOQFbFYqIWSo1W8TiAVanC0evXOEB7Wp14HFb22zE5fqLOC5ERLQWidNaNI4uEcc9i7hcJldHh2NWrQ5gDdbOlpaumIuLb2atAQDPnz0b8NbWcmxVVRJ3HmxpScwwzOJmKDRGe8LlCZDLG9g7TInV1Ql7dbXbV1e3gT0WKirCFomkPyvwXFlZGJOjV6%2BSt64uudDZOU5EUcox%2FMEQDVvt6MbcN27Y3Ayzhv3spaUrB6Z9qrJSO19ezj8p2pLBkJy%2BcCHJxWI5gW5tcfRRz1dU19GfGkou9PZO4smR9jGFwpex4Dy3bvnmKypotbU13VidjqYZhrj49rvMEt%2F%2FYqLz9d00NjW%2Fczgyo9O51zs6aNlo5FDtu0DZgQFhlGXJ0dBADoNhd6uvp6Whoayg7N9LVGH8mD4b%2FHnftUQoNG4vLQ0gixMqlW%2B4qOjtNHDg3r1f6YiRSGxRy7UvqLb9U4qkqnxPONva5lDpHr1%2ByyKRNKWBZy5edMUHB2m5ry%2B%2BEQw%2Bzgf4zo9%2F0ocN3WRzLBw4J%2BJyPWCrqmIgGYtUOsWD4oxZFQoPUjGpVHqI4%2FafkQPC6fZQeeM1%2BvLuIQnjuBWQDDCscrmHP9eoNPAtBqfOnXuaK%2Bh6JEbGrs%2BpvvMmxeIbh863abVPeYySEo9FJHpNMFJY%2BP5cWZkfg7O1tSwYCeSQLTY3E8Q09%2FBVPJUlxQjshT1BscCY02r9UDUBfvCHB66pcfPA3lyAe3ngr3%2F47XDgaJzsly7xwA6NZtlUUPCuAHqaSjUIP%2Bsue8BRWAC%2FNfQ7JZPZ59s0Gj7VtpISz4hQ%2BCpfXGMKhZcvLpUKxfWM8ohvf7p%2FODjHBfcVF8Isk82g1FHykcVFE%2BUZAAX47aE%2FMl4PO50Pnuh0%2Fx4nmcyWPsdwDhBx6CmkLV%2FgFDjYKxOJOFtb0wQyIhL9RyCwK3AOfIGp1YFEBhnMJcLRWEbKdKQoU6ncTZkIEDicAy%2F81dVuEM5RwPfey4xOx0Ik%2FI2NnFki%2BWafOoFIYFcgYZCyxd7eCUjbc4AmF65ft%2FkMhk3o%2B5hc7sMJyqjJEGvYFaQFIr7Y0wPw8BFAY%2B6%2Bvmk3w6zzRuDMmZVRsfh8RtA0uETSD7uCBT6DYQN6iveU0fpkYLjE6qrVrtOxeNKU9THLZJ9kBU2JBsBhV5AivB%2FoKaQNKgPCBwDYaIfZC4adThOqF4WENViLJwVoXobfLBKVw67AOaTsLc65TaVK21vQ4La99eKcYg5vbxsbObzTQ9N7UKDgUO1wDjiDIIBshh5ztg39nQMLSZBH4OzBOUDEQXm206d3fcLgswbXQA4PhcK3nhswU1Bz8wvQ09RHG%2FoYy3ejfwBNmtoYqLA0XgAAAABJRU5ErkJggg%3D%3D&amp;label=CreatedAt\" style=\"max-width: 100%;\"></a></td>\n</tr>\n</tbody>\n</table></markdown-accessiblity-table>\n<a href=\"https://github.com/opsre/awesome-ops\">\n</a><p dir=\"auto\"><a href=\"https://github.com/opsre/awesome-ops\"><img src=\"https://camo.githubusercontent.com/b964a36ea4078c39f603d46a29436371c7541a2f26e0228d7b21b9d9805b43d3/68747470733a2f2f736f6369616c6966792e6769742e63692f6f707372652f617765736f6d652d6f70732f696d6167653f6465736372697074696f6e3d3126666f6e743d42697474657226666f726b733d31266973737565733d31266c616e67756167653d31266c6f676f3d6874747073253341253246253246617661746172732e67697468756275736572636f6e74656e742e636f6d25324675253246313838353638303230266e616d653d31266f776e65723d31267061747465726e3d436972637569742b426f6172642670756c6c733d31267374617267617a6572733d31267468656d653d4c69676874\" alt=\"\" data-canonical-src=\"https://socialify.git.ci/opsre/awesome-ops/image?description=1&amp;font=Bitter&amp;forks=1&amp;issues=1&amp;language=1&amp;logo=https%3A%2F%2Favatars.githubusercontent.com%2Fu%2F188568020&amp;name=1&amp;owner=1&amp;pattern=Circuit+Board&amp;pulls=1&amp;stargazers=1&amp;theme=Light\" style=\"max-width: 100%;\"></a></p>\n<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\"><img src=\"https://camo.githubusercontent.com/a15b413168923d02e21292705ceaf86b92675f98e250c5c896a02ba7504a6eae/68747470733a2f2f63646e2e6a7364656c6976722e6e65742f67682f657279616a662f7475406d61696e2f696d672f696d6167655f32303234303432305f3231343430382e676966\" width=\"100%\" height=\"3\" data-animated-image=\"\" data-canonical-src=\"https://cdn.jsdelivr.net/gh/eryajf/tu@main/img/image_20240420_214408.gif\" style=\"max-width: 100%; height: auto; max-height: 3px;\"></a>\n</div>\n<h1 dir=\"auto\">yq</h1>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/mikefarah/yq/workflows/Build/badge.svg\"><img src=\"https://github.com/mikefarah/yq/workflows/Build/badge.svg\" alt=\"Build\" style=\"max-width: 100%;\"></a>  <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/068066259ba6956a731f273ba6f9666a0667de517df55281f2938877d215de94/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f6d696b6566617261682f79712e737667\"><img src=\"https://camo.githubusercontent.com/068066259ba6956a731f273ba6f9666a0667de517df55281f2938877d215de94/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f6d696b6566617261682f79712e737667\" alt=\"Docker Pulls\" data-canonical-src=\"https://img.shields.io/docker/pulls/mikefarah/yq.svg\" style=\"max-width: 100%;\"></a> <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/fcbafaeb511953755728207132c82c8aee7c54d43f778798f059412f487fa92a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f6d696b6566617261682f79712f746f74616c2e737667\"><img src=\"https://camo.githubusercontent.com/fcbafaeb511953755728207132c82c8aee7c54d43f778798f059412f487fa92a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f6d696b6566617261682f79712f746f74616c2e737667\" alt=\"Github Releases (by Release)\" data-canonical-src=\"https://img.shields.io/github/downloads/mikefarah/yq/total.svg\" style=\"max-width: 100%;\"></a> <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/b58416cd7340bc4378fb8e8aad43df5046627eeff34b94376c737073f21214fd/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f6d696b6566617261682f7971\"><img src=\"https://camo.githubusercontent.com/b58416cd7340bc4378fb8e8aad43df5046627eeff34b94376c737073f21214fd/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f6d696b6566617261682f7971\" alt=\"Go Report\" data-canonical-src=\"https://goreportcard.com/badge/github.com/mikefarah/yq\" style=\"max-width: 100%;\"></a> <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/mikefarah/yq/workflows/CodeQL/badge.svg\"><img src=\"https://github.com/mikefarah/yq/workflows/CodeQL/badge.svg\" alt=\"CodeQL\" style=\"max-width: 100%;\"></a></p>\n<p dir=\"auto\">a lightweight and portable command-line YAML, JSON, INI and XML processor. <code class=\"notranslate\">yq</code> uses <a href=\"https://github.com/stedolan/jq\">jq</a> like syntax but works with yaml files as well as json, xml, ini, properties, csv and tsv. It doesn't yet support everything <code class=\"notranslate\">jq</code> does - but it does support the most common operations and functions, and more is being added continuously.</p>\n<p dir=\"auto\">yq is written in go - so you can download a dependency free binary for your platform and you are good to go! If you prefer there are a variety of package managers that can be used as well as Docker and Podman, all listed below.</p>\n<h2 dir=\"auto\">Quick Usage Guide</h2>\n<p dir=\"auto\">Read a value:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yq '.a.b[0].c' file.yaml\"><pre class=\"notranslate\">yq <span class=\"pl-s\"><span class=\"pl-pds\">'</span>.a.b[0].c<span class=\"pl-pds\">'</span></span> file.yaml</pre></div>\n<p dir=\"auto\">Pipe from STDIN:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yq '.a.b[0].c' &lt; file.yaml\"><pre class=\"notranslate\">yq <span class=\"pl-s\"><span class=\"pl-pds\">'</span>.a.b[0].c<span class=\"pl-pds\">'</span></span> <span class=\"pl-k\">&lt;</span> file.yaml</pre></div>\n<p dir=\"auto\">Update a yaml file, in place</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yq -i '.a.b[0].c = &quot;cool&quot;' file.yaml\"><pre class=\"notranslate\">yq -i <span class=\"pl-s\"><span class=\"pl-pds\">'</span>.a.b[0].c = \"cool\"<span class=\"pl-pds\">'</span></span> file.yaml</pre></div>\n<p dir=\"auto\">Update using environment variables</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"NAME=mike yq -i '.a.b[0].c = strenv(NAME)' file.yaml\"><pre class=\"notranslate\">NAME=mike yq -i <span class=\"pl-s\"><span class=\"pl-pds\">'</span>.a.b[0].c = strenv(NAME)<span class=\"pl-pds\">'</span></span> file.yaml</pre></div>\n<p dir=\"auto\">Merge multiple files</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# merge two files\nyq -n 'load(&quot;file1.yaml&quot;) * load(&quot;file2.yaml&quot;)'\n\n# merge using globs:\n# note the use of `ea` to evaluate all the files at once\n# instead of in sequence\nyq ea '. as $item ireduce ({}; . * $item )' path/to/*.yml\"><pre class=\"notranslate\"><span class=\"pl-c\"><span class=\"pl-c\">#</span> merge two files</span>\nyq -n <span class=\"pl-s\"><span class=\"pl-pds\">'</span>load(\"file1.yaml\") * load(\"file2.yaml\")<span class=\"pl-pds\">'</span></span>\n\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> merge using globs:</span>\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> note the use of `ea` to evaluate all the files at once</span>\n<span class=\"pl-c\"><span class=\"pl-c\">#</span> instead of in sequence</span>\nyq ea <span class=\"pl-s\"><span class=\"pl-pds\">'</span>. as $item ireduce ({}; . * $item )<span class=\"pl-pds\">'</span></span> path/to/<span class=\"pl-k\">*</span>.yml</pre></div>\n<p dir=\"auto\">Multiple updates to a yaml file</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yq -i '\n  .a.b[0].c = &quot;cool&quot; |\n  .x.y.z = &quot;foobar&quot; |\n  .person.name = strenv(NAME)\n' file.yaml\"><pre class=\"notranslate\">yq -i <span class=\"pl-s\"><span class=\"pl-pds\">'</span></span>\n<span class=\"pl-s\">  .a.b[0].c = \"cool\" |</span>\n<span class=\"pl-s\">  .x.y.z = \"foobar\" |</span>\n<span class=\"pl-s\">  .person.name = strenv(NAME)</span>\n<span class=\"pl-s\"><span class=\"pl-pds\">'</span></span> file.yaml</pre></div>\n<p dir=\"auto\">Find and update an item in an array:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yq '(.[] | select(.name == &quot;foo&quot;) | .address) = &quot;12 cat st&quot;'\"><pre class=\"notranslate\">yq <span class=\"pl-s\"><span class=\"pl-pds\">'</span>(.[] | select(.name == \"foo\") | .address) = \"12 cat st\"<span class=\"pl-pds\">'</span></span></pre></div>\n<p dir=\"auto\">Convert JSON to YAML</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yq -Poy sample.json\"><pre class=\"notranslate\">yq -Poy sample.json</pre></div>\n<p dir=\"auto\">See <a href=\"https://mikefarah.gitbook.io/yq/recipes\" rel=\"nofollow\">recipes</a> for more examples and the <a href=\"https://mikefarah.gitbook.io/yq/\" rel=\"nofollow\">documentation</a> for more information.</p>\n<p dir=\"auto\">Take a look at the discussions for <a href=\"https://github.com/mikefarah/yq/discussions/categories/q-a\">common questions</a>, and <a href=\"https://github.com/mikefarah/yq/discussions/categories/show-and-tell\">cool ideas</a></p>\n<h2 dir=\"auto\">Install</h2>\n<h3 dir=\"auto\"><a href=\"https://github.com/mikefarah/yq/releases/latest\">Download the latest binary</a></h3>\n<h3 dir=\"auto\">wget</h3>\n<p dir=\"auto\">Use wget to download, gzipped pre-compiled binaries:</p>\n<p dir=\"auto\">For instance, VERSION=v4.2.0 and BINARY=yq_linux_amd64</p>\n<h4 dir=\"auto\">Compressed via tar.gz</h4>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - |\\\n  tar xz &amp;&amp; mv ${BINARY} /usr/local/bin/yq\"><pre class=\"notranslate\">wget https://github.com/mikefarah/yq/releases/download/<span class=\"pl-smi\">${VERSION}</span>/<span class=\"pl-smi\">${BINARY}</span>.tar.gz -O - <span class=\"pl-k\">|</span>\\\n  tar xz <span class=\"pl-k\">&amp;&amp;</span> mv <span class=\"pl-smi\">${BINARY}</span> /usr/local/bin/yq</pre></div>\n<h4 dir=\"auto\">Plain binary</h4>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY} -O /usr/local/bin/yq &amp;&amp;\\\n    chmod +x /usr/local/bin/yq\"><pre class=\"notranslate\">wget https://github.com/mikefarah/yq/releases/download/<span class=\"pl-smi\">${VERSION}</span>/<span class=\"pl-smi\">${BINARY}</span> -O /usr/local/bin/yq <span class=\"pl-k\">&amp;&amp;</span>\\\n    chmod +x /usr/local/bin/yq</pre></div>\n<h4 dir=\"auto\">Latest version</h4>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq &amp;&amp;\\\n    chmod +x /usr/local/bin/yq\"><pre class=\"notranslate\">wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq <span class=\"pl-k\">&amp;&amp;</span>\\\n    chmod +x /usr/local/bin/yq</pre></div>\n<h3 dir=\"auto\">MacOS / Linux via Homebrew:</h3>\n<p dir=\"auto\">Using <a href=\"https://brew.sh/\" rel=\"nofollow\">Homebrew</a></p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"brew install yq\"><pre class=\"notranslate\"><code class=\"notranslate\">brew install yq\n</code></pre></div>\n<h3 dir=\"auto\">Linux via snap:</h3>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"snap install yq\"><pre class=\"notranslate\"><code class=\"notranslate\">snap install yq\n</code></pre></div>\n<h4 dir=\"auto\">Snap notes</h4>\n<p dir=\"auto\"><code class=\"notranslate\">yq</code> installs with <a href=\"https://docs.snapcraft.io/snap-confinement/6233\" rel=\"nofollow\"><em>strict confinement</em></a> in snap, this means it doesn't have direct access to root files. To read root files you can:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"sudo cat /etc/myfile | yq '.a.path'\"><pre class=\"notranslate\"><code class=\"notranslate\">sudo cat /etc/myfile | yq '.a.path'\n</code></pre></div>\n<p dir=\"auto\">And to write to a root file you can either use <a href=\"https://linux.die.net/man/1/sponge\" rel=\"nofollow\">sponge</a>:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"sudo cat /etc/myfile | yq '.a.path = &quot;value&quot;' | sudo sponge /etc/myfile\"><pre class=\"notranslate\"><code class=\"notranslate\">sudo cat /etc/myfile | yq '.a.path = \"value\"' | sudo sponge /etc/myfile\n</code></pre></div>\n<p dir=\"auto\">or write to a temporary file:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"sudo cat /etc/myfile | yq '.a.path = &quot;value&quot;' | sudo tee /etc/myfile.tmp\nsudo mv /etc/myfile.tmp /etc/myfile\nrm /etc/myfile.tmp\"><pre class=\"notranslate\"><code class=\"notranslate\">sudo cat /etc/myfile | yq '.a.path = \"value\"' | sudo tee /etc/myfile.tmp\nsudo mv /etc/myfile.tmp /etc/myfile\nrm /etc/myfile.tmp\n</code></pre></div>\n<h3 dir=\"auto\">Run with Docker or Podman</h3>\n<h4 dir=\"auto\">Oneshot use:</h4>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"docker run --rm -v &quot;${PWD}&quot;:/workdir mikefarah/yq [command] [flags] [expression ]FILE...\"><pre class=\"notranslate\">docker run --rm -v <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${PWD}</span><span class=\"pl-pds\">\"</span></span>:/workdir mikefarah/yq [command] [flags] [expression ]FILE...</pre></div>\n<p dir=\"auto\">Note that you can run <code class=\"notranslate\">yq</code> in docker without network access and other privileges if you desire,<br>\nnamely <code class=\"notranslate\">--security-opt=no-new-privileges --cap-drop all --network none</code>.</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"podman run --rm -v &quot;${PWD}&quot;:/workdir mikefarah/yq [command] [flags] [expression ]FILE...\"><pre class=\"notranslate\">podman run --rm -v <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${PWD}</span><span class=\"pl-pds\">\"</span></span>:/workdir mikefarah/yq [command] [flags] [expression ]FILE...</pre></div>\n<h4 dir=\"auto\">Pipe in via STDIN:</h4>\n<p dir=\"auto\">You'll need to pass the <code class=\"notranslate\">-i\\--interactive</code> flag to docker:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"docker run -i --rm mikefarah/yq '.this.thing' &lt; myfile.yml\"><pre class=\"notranslate\">docker run -i --rm mikefarah/yq <span class=\"pl-s\"><span class=\"pl-pds\">'</span>.this.thing<span class=\"pl-pds\">'</span></span> <span class=\"pl-k\">&lt;</span> myfile.yml</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"podman run -i --rm mikefarah/yq '.this.thing' &lt; myfile.yml\"><pre class=\"notranslate\">podman run -i --rm mikefarah/yq <span class=\"pl-s\"><span class=\"pl-pds\">'</span>.this.thing<span class=\"pl-pds\">'</span></span> <span class=\"pl-k\">&lt;</span> myfile.yml</pre></div>\n<h4 dir=\"auto\">Run commands interactively:</h4>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"docker run --rm -it -v &quot;${PWD}&quot;:/workdir --entrypoint sh mikefarah/yq\"><pre class=\"notranslate\">docker run --rm -it -v <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${PWD}</span><span class=\"pl-pds\">\"</span></span>:/workdir --entrypoint sh mikefarah/yq</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"podman run --rm -it -v &quot;${PWD}&quot;:/workdir --entrypoint sh mikefarah/yq\"><pre class=\"notranslate\">podman run --rm -it -v <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${PWD}</span><span class=\"pl-pds\">\"</span></span>:/workdir --entrypoint sh mikefarah/yq</pre></div>\n<p dir=\"auto\">It can be useful to have a bash function to avoid typing the whole docker command:</p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yq() {\n  docker run --rm -i -v &quot;${PWD}&quot;:/workdir mikefarah/yq &quot;$@&quot;\n}\"><pre class=\"notranslate\"><span class=\"pl-en\">yq</span>() {\n  docker run --rm -i -v <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${PWD}</span><span class=\"pl-pds\">\"</span></span>:/workdir mikefarah/yq <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">$@</span><span class=\"pl-pds\">\"</span></span>\n}</pre></div>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yq() {\n  podman run --rm -i -v &quot;${PWD}&quot;:/workdir mikefarah/yq &quot;$@&quot;\n}\"><pre class=\"notranslate\"><span class=\"pl-en\">yq</span>() {\n  podman run --rm -i -v <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">${PWD}</span><span class=\"pl-pds\">\"</span></span>:/workdir mikefarah/yq <span class=\"pl-s\"><span class=\"pl-pds\">\"</span><span class=\"pl-smi\">$@</span><span class=\"pl-pds\">\"</span></span>\n}</pre></div>\n<h4 dir=\"auto\">Running as root:</h4>\n<p dir=\"auto\"><code class=\"notranslate\">yq</code>'s container image no longer runs under root (<a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"922059913\" data-permission-text=\"Title is private\" data-url=\"https://github.com/mikefarah/yq/issues/860\" data-hovercard-type=\"pull_request\" data-hovercard-url=\"/mikefarah/yq/pull/860/hovercard\" href=\"https://github.com/mikefarah/yq/pull/860\">mikefarah/yq#860</a>). If you'd like to install more things in the container image, or you're having permissions issues when attempting to read/write files you'll need to either:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"docker run --user=&quot;root&quot; -it --entrypoint sh mikefarah/yq\"><pre class=\"notranslate\"><code class=\"notranslate\">docker run --user=\"root\" -it --entrypoint sh mikefarah/yq\n</code></pre></div>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"podman run --user=&quot;root&quot; -it --entrypoint sh mikefarah/yq\"><pre class=\"notranslate\"><code class=\"notranslate\">podman run --user=\"root\" -it --entrypoint sh mikefarah/yq\n</code></pre></div>\n<p dir=\"auto\">Or, in your Dockerfile:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"FROM mikefarah/yq\n\nUSER root\nRUN apk add --no-cache bash\nUSER yq\"><pre class=\"notranslate\"><code class=\"notranslate\">FROM mikefarah/yq\n\nUSER root\nRUN apk add --no-cache bash\nUSER yq\n</code></pre></div>\n<h4 dir=\"auto\">Missing timezone data</h4>\n<p dir=\"auto\">By default, the alpine image yq uses does not include timezone data. If you'd like to use the <code class=\"notranslate\">tz</code> operator, you'll need to include this data:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"FROM mikefarah/yq\n\nUSER root\nRUN apk add --no-cache tzdata\nUSER yq\"><pre class=\"notranslate\"><code class=\"notranslate\">FROM mikefarah/yq\n\nUSER root\nRUN apk add --no-cache tzdata\nUSER yq\n</code></pre></div>\n<h4 dir=\"auto\">Podman with SELinux</h4>\n<p dir=\"auto\">If you are using podman with SELinux, you will need to set the shared volume flag <code class=\"notranslate\">:z</code> on the volume mount:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"-v &quot;${PWD}&quot;:/workdir:z\"><pre class=\"notranslate\"><code class=\"notranslate\">-v \"${PWD}\":/workdir:z\n</code></pre></div>\n<h3 dir=\"auto\">GitHub Action</h3>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"  - name: Set foobar to cool\n    uses: mikefarah/yq@master\n    with:\n      cmd: yq -i '.foo.bar = &quot;cool&quot;' 'config.yml'\n  - name: Get an entry with a variable that might contain dots or spaces\n    id: get_username\n    uses: mikefarah/yq@master\n    with:\n      cmd: yq '.all.children.[&quot;${{ matrix.ip_address }}&quot;].username' ops/inventories/production.yml\n  - name: Reuse a variable obtained in another step\n    run: echo ${{ steps.get_username.outputs.result }}\"><pre class=\"notranslate\"><code class=\"notranslate\">  - name: Set foobar to cool\n    uses: mikefarah/yq@master\n    with:\n      cmd: yq -i '.foo.bar = \"cool\"' 'config.yml'\n  - name: Get an entry with a variable that might contain dots or spaces\n    id: get_username\n    uses: mikefarah/yq@master\n    with:\n      cmd: yq '.all.children.[\"${{ matrix.ip_address }}\"].username' ops/inventories/production.yml\n  - name: Reuse a variable obtained in another step\n    run: echo ${{ steps.get_username.outputs.result }}\n</code></pre></div>\n<p dir=\"auto\">See <a href=\"https://mikefarah.gitbook.io/yq/usage/github-action\" rel=\"nofollow\">https://mikefarah.gitbook.io/yq/usage/github-action</a> for more.</p>\n<h3 dir=\"auto\">Go Install:</h3>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"go install github.com/mikefarah/yq/v4@latest\"><pre class=\"notranslate\"><code class=\"notranslate\">go install github.com/mikefarah/yq/v4@latest\n</code></pre></div>\n<h2 dir=\"auto\">Community Supported Installation methods</h2>\n<p dir=\"auto\">As these are supported by the community ❤️ - however, they may be out of date with the officially supported releases.</p>\n<p dir=\"auto\"><em>Please note that the Debian package (previously supported by <a class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/rmescandon/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/rmescandon\">@rmescandon</a>) is no longer maintained. Please use an alternative installation method.</em></p>\n<h3 dir=\"auto\">X-CMD</h3>\n<p dir=\"auto\">Checkout <code class=\"notranslate\">yq</code> on x-cmd: <a href=\"https://x-cmd.com/mod/yq\" rel=\"nofollow\">https://x-cmd.com/mod/yq</a></p>\n<ul dir=\"auto\">\n<li>Instant Results: See the output of your yq filter in real-time.</li>\n<li>Error Handling: Encounter a syntax error? It will display the error message and the results of the closest valid filter</li>\n</ul>\n<p dir=\"auto\">Thanks <a class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/edwinjhlee/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/edwinjhlee\">@edwinjhlee</a>!</p>\n<h3 dir=\"auto\">Nix</h3>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"nix profile install nixpkgs#yq-go\"><pre class=\"notranslate\"><code class=\"notranslate\">nix profile install nixpkgs#yq-go\n</code></pre></div>\n<p dir=\"auto\">See <a href=\"https://search.nixos.org/packages?channel=unstable&amp;show=yq-go&amp;from=0&amp;size=50&amp;sort=relevance&amp;type=packages&amp;query=yq-go\" rel=\"nofollow\">here</a></p>\n<h3 dir=\"auto\">Webi</h3>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"webi yq\"><pre class=\"notranslate\"><code class=\"notranslate\">webi yq\n</code></pre></div>\n<p dir=\"auto\">See <a href=\"https://webinstall.dev/\" rel=\"nofollow\">webi</a><br>\nSupported by <a class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/adithyasunil26/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/adithyasunil26\">@adithyasunil26</a> (<a href=\"https://github.com/webinstall/webi-installers/tree/master/yq\">https://github.com/webinstall/webi-installers/tree/master/yq</a>)</p>\n<h3 dir=\"auto\">Arch Linux</h3>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"pacman -S go-yq\"><pre class=\"notranslate\"><code class=\"notranslate\">pacman -S go-yq\n</code></pre></div>\n<h3 dir=\"auto\">Windows:</h3>\n<p dir=\"auto\">Using <a href=\"https://chocolatey.org\" rel=\"nofollow\">Chocolatey</a></p>\n<p dir=\"auto\"><a href=\"https://chocolatey.org/packages/yq\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/f2355ec6623e389e55e39ed23b3cf0c3ead29aae3af3b3450e4a520de249157f/68747470733a2f2f696d672e736869656c64732e696f2f63686f636f6c617465792f762f79712e737667\" alt=\"Chocolatey\" data-canonical-src=\"https://img.shields.io/chocolatey/v/yq.svg\" style=\"max-width: 100%;\"></a><br>\n<a href=\"https://chocolatey.org/packages/yq\" rel=\"nofollow\"><img src=\"https://camo.githubusercontent.com/b03e759b34b50b06f9811ec36b5d861deba824756968745692e4d2da5a2f0710/68747470733a2f2f696d672e736869656c64732e696f2f63686f636f6c617465792f64742f79712e737667\" alt=\"Chocolatey\" data-canonical-src=\"https://img.shields.io/chocolatey/dt/yq.svg\" style=\"max-width: 100%;\"></a></p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"choco install yq\"><pre class=\"notranslate\"><code class=\"notranslate\">choco install yq\n</code></pre></div>\n<p dir=\"auto\">Supported by <a class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/chillum/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/chillum\">@chillum</a> (<a href=\"https://chocolatey.org/packages/yq\" rel=\"nofollow\">https://chocolatey.org/packages/yq</a>)</p>\n<p dir=\"auto\">Using <a href=\"https://scoop.sh/\" rel=\"nofollow\">scoop</a></p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"scoop install main/yq\"><pre class=\"notranslate\"><code class=\"notranslate\">scoop install main/yq\n</code></pre></div>\n<p dir=\"auto\">Using <a href=\"https://learn.microsoft.com/en-us/windows/package-manager/\" rel=\"nofollow\">winget</a></p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"winget install --id MikeFarah.yq\"><pre class=\"notranslate\"><code class=\"notranslate\">winget install --id MikeFarah.yq\n</code></pre></div>\n<h3 dir=\"auto\">Mac:</h3>\n<p dir=\"auto\">Using <a href=\"https://www.macports.org/\" rel=\"nofollow\">MacPorts</a></p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"sudo port selfupdate\nsudo port install yq\"><pre class=\"notranslate\"><code class=\"notranslate\">sudo port selfupdate\nsudo port install yq\n</code></pre></div>\n<p dir=\"auto\">Supported by <a class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/herbygillot/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/herbygillot\">@herbygillot</a> (<a href=\"https://ports.macports.org/maintainer/github/herbygillot\" rel=\"nofollow\">https://ports.macports.org/maintainer/github/herbygillot</a>)</p>\n<h3 dir=\"auto\">Alpine Linux</h3>\n<p dir=\"auto\">Alpine Linux v3.20+ (and Edge):</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"apk add yq-go\"><pre class=\"notranslate\"><code class=\"notranslate\">apk add yq-go\n</code></pre></div>\n<p dir=\"auto\">Alpine Linux up to v3.19:</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"apk add yq\"><pre class=\"notranslate\"><code class=\"notranslate\">apk add yq\n</code></pre></div>\n<p dir=\"auto\">Supported by Tuan Hoang (<a href=\"https://pkgs.alpinelinux.org/packages?name=yq-go\" rel=\"nofollow\">https://pkgs.alpinelinux.org/packages?name=yq-go</a>)</p>\n<h3 dir=\"auto\">Flox:</h3>\n<p dir=\"auto\">Flox can be used to install yq on Linux, MacOS, and Windows through WSL.</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"flox install yq\"><pre class=\"notranslate\"><code class=\"notranslate\">flox install yq\n</code></pre></div>\n<h2 dir=\"auto\">Features</h2>\n<ul dir=\"auto\">\n<li><a href=\"https://mikefarah.gitbook.io/yq/\" rel=\"nofollow\">Detailed documentation with many examples</a></li>\n<li>Written in portable go, so you can download a lovely dependency free binary</li>\n<li>Uses similar syntax as <code class=\"notranslate\">jq</code> but works with YAML, INI, <a href=\"https://mikefarah.gitbook.io/yq/usage/convert\" rel=\"nofollow\">JSON</a> and <a href=\"https://mikefarah.gitbook.io/yq/usage/xml\" rel=\"nofollow\">XML</a> files</li>\n<li>Fully supports multi document yaml files</li>\n<li>Supports yaml <a href=\"https://mikefarah.gitbook.io/yq/usage/front-matter\" rel=\"nofollow\">front matter</a> blocks (e.g. jekyll/assemble)</li>\n<li>Colorized yaml output</li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/operators/datetime\" rel=\"nofollow\">Date/Time manipulation and formatting with TZ</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/operators/traverse-read\" rel=\"nofollow\">Deeply data structures</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/operators/sort-keys\" rel=\"nofollow\">Sort keys</a></li>\n<li>Manipulate yaml <a href=\"https://mikefarah.gitbook.io/yq/operators/comment-operators\" rel=\"nofollow\">comments</a>, <a href=\"https://mikefarah.gitbook.io/yq/operators/style\" rel=\"nofollow\">styling</a>, <a href=\"https://mikefarah.gitbook.io/yq/operators/tag\" rel=\"nofollow\">tags</a> and <a href=\"https://mikefarah.gitbook.io/yq/operators/anchor-and-alias-operators\" rel=\"nofollow\">anchors and aliases</a>.</li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/v/v4.x/commands/evaluate#flags\" rel=\"nofollow\">Update in place</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/operators/select#select-and-update-matching-values-in-map\" rel=\"nofollow\">Complex expressions to select and update</a></li>\n<li>Keeps yaml formatting and comments when updating (though there are issues with whitespace)</li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/operators/encode-decode\" rel=\"nofollow\">Decode/Encode base64 data</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/operators/load\" rel=\"nofollow\">Load content from other files</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/v/v4.x/usage/convert\" rel=\"nofollow\">Convert to/from json/ndjson</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/v/v4.x/usage/xml\" rel=\"nofollow\">Convert to/from xml</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/v/v4.x/usage/properties\" rel=\"nofollow\">Convert to/from properties</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/usage/csv-tsv\" rel=\"nofollow\">Convert to/from csv/tsv</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/v/v4.x/commands/shell-completion\" rel=\"nofollow\">General shell completion scripts (bash/zsh/fish/powershell)</a></li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/operators/reduce\" rel=\"nofollow\">Reduce</a> to merge multiple files or sum an array or other fancy things.</li>\n<li><a href=\"https://mikefarah.gitbook.io/yq/usage/github-action\" rel=\"nofollow\">Github Action</a> to use in your automated pipeline (thanks <a class=\"user-mention notranslate\" data-hovercard-type=\"user\" data-hovercard-url=\"/users/devorbitus/hovercard\" data-octo-click=\"hovercard-link-click\" data-octo-dimensions=\"link_type:self\" href=\"https://github.com/devorbitus\">@devorbitus</a>)</li>\n</ul>\n<h2 dir=\"auto\"><a href=\"https://mikefarah.gitbook.io/yq/\" rel=\"nofollow\">Usage</a></h2>\n<p dir=\"auto\">Check out the <a href=\"https://mikefarah.gitbook.io/yq/\" rel=\"nofollow\">documentation</a> for more detailed and advanced usage.</p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"Usage:\n  yq [flags]\n  yq [command]\n\nExamples:\n\n# yq defaults to 'eval' command if no command is specified. See &quot;yq eval --help&quot; for more examples.\nyq '.stuff' &lt; myfile.yml # outputs the data at the &quot;stuff&quot; node from &quot;myfile.yml&quot;\n\nyq -i '.stuff = &quot;foo&quot;' myfile.yml # update myfile.yml in place\n\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  eval        (default) Apply the expression to each document in each yaml file in sequence\n  eval-all    Loads _all_ yaml documents of _all_ yaml files and runs expression once\n  help        Help about any command\n\nFlags:\n  -C, --colors                        force print with colors\n      --csv-auto-parse                parse CSV YAML/JSON values (default true)\n      --csv-separator char            CSV Separator character (default ,)\n  -e, --exit-status                   set exit status if there are no matches or null or false is returned\n      --expression string             forcibly set the expression argument. Useful when yq argument detection thinks your expression is a file.\n      --from-file string              Load expression from specified file.\n  -f, --front-matter string           (extract|process) first input as yaml front-matter. Extract will pull out the yaml content, process will run the expression against the yaml content, leaving the remaining data intact\n      --header-preprocess             Slurp any header comments and separators before processing expression. (default true)\n  -h, --help                          help for yq\n  -I, --indent int                    sets indent level for output (default 2)\n  -i, --inplace                       update the file in place of first file given.\n  -p, --input-format string           [auto|a|yaml|y|json|j|props|p|csv|c|tsv|t|xml|x|base64|uri|toml|lua|l|ini|i] parse format for input. (default &quot;auto&quot;)\n      --lua-globals                   output keys as top-level global variables\n      --lua-prefix string             prefix (default &quot;return &quot;)\n      --lua-suffix string             suffix (default &quot;;\\n&quot;)\n      --lua-unquoted                  output unquoted string keys (e.g. {foo=&quot;bar&quot;})\n  -M, --no-colors                     force print with no colors\n  -N, --no-doc                        Don't print document separators (---)\n  -0, --nul-output                    Use NUL char to separate values. If unwrap scalar is also set, fail if unwrapped scalar contains NUL char.\n  -n, --null-input                    Don't read input, simply evaluate the expression given. Useful for creating docs from scratch.\n  -o, --output-format string          [auto|a|yaml|y|json|j|props|p|csv|c|tsv|t|xml|x|base64|uri|toml|shell|s|lua|l|ini|i] output format type. (default &quot;auto&quot;)\n  -P, --prettyPrint                   pretty print, shorthand for '... style = &quot;&quot;'\n      --properties-array-brackets     use [x] in array paths (e.g. for SpringBoot)\n      --properties-separator string   separator to use between keys and values (default &quot; = &quot;)\n  -s, --split-exp string              print each result (or doc) into a file named (exp). [exp] argument must return a string. You can use $index in the expression as the result counter. The necessary directories will be created.\n      --split-exp-file string         Use a file to specify the split-exp expression.\n      --string-interpolation          Toggles strings interpolation of \\(exp) (default true)\n      --tsv-auto-parse                parse TSV YAML/JSON values (default true)\n  -r, --unwrapScalar                  unwrap scalar, print the value with no quotes, colors or comments. Defaults to true for yaml (default true)\n  -v, --verbose                       verbose mode\n  -V, --version                       Print version information and quit\n      --xml-attribute-prefix string   prefix for xml attributes (default &quot;+@&quot;)\n      --xml-content-name string       name for xml content (if no attribute name is present). (default &quot;+content&quot;)\n      --xml-directive-name string     name for xml directives (e.g. &lt;!DOCTYPE thing cat&gt;) (default &quot;+directive&quot;)\n      --xml-keep-namespace            enables keeping namespace after parsing attributes (default true)\n      --xml-proc-inst-prefix string   prefix for xml processing instructions (e.g. &lt;?xml version=&quot;1&quot;?&gt;) (default &quot;+p_&quot;)\n      --xml-raw-token                 enables using RawToken method instead Token. Commonly disables namespace translations. See https://pkg.go.dev/encoding/xml#Decoder.RawToken for details. (default true)\n      --xml-skip-directives           skip over directives (e.g. &lt;!DOCTYPE thing cat&gt;)\n      --xml-skip-proc-inst            skip over process instructions (e.g. &lt;?xml version=&quot;1&quot;?&gt;)\n      --xml-strict-mode               enables strict parsing of XML. See https://pkg.go.dev/encoding/xml for more details.\n\nUse &quot;yq [command] --help&quot; for more information about a command.\"><pre class=\"notranslate\"><code class=\"notranslate\">Usage:\n  yq [flags]\n  yq [command]\n\nExamples:\n\n# yq defaults to 'eval' command if no command is specified. See \"yq eval --help\" for more examples.\nyq '.stuff' &lt; myfile.yml # outputs the data at the \"stuff\" node from \"myfile.yml\"\n\nyq -i '.stuff = \"foo\"' myfile.yml # update myfile.yml in place\n\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  eval        (default) Apply the expression to each document in each yaml file in sequence\n  eval-all    Loads _all_ yaml documents of _all_ yaml files and runs expression once\n  help        Help about any command\n\nFlags:\n  -C, --colors                        force print with colors\n      --csv-auto-parse                parse CSV YAML/JSON values (default true)\n      --csv-separator char            CSV Separator character (default ,)\n  -e, --exit-status                   set exit status if there are no matches or null or false is returned\n      --expression string             forcibly set the expression argument. Useful when yq argument detection thinks your expression is a file.\n      --from-file string              Load expression from specified file.\n  -f, --front-matter string           (extract|process) first input as yaml front-matter. Extract will pull out the yaml content, process will run the expression against the yaml content, leaving the remaining data intact\n      --header-preprocess             Slurp any header comments and separators before processing expression. (default true)\n  -h, --help                          help for yq\n  -I, --indent int                    sets indent level for output (default 2)\n  -i, --inplace                       update the file in place of first file given.\n  -p, --input-format string           [auto|a|yaml|y|json|j|props|p|csv|c|tsv|t|xml|x|base64|uri|toml|lua|l|ini|i] parse format for input. (default \"auto\")\n      --lua-globals                   output keys as top-level global variables\n      --lua-prefix string             prefix (default \"return \")\n      --lua-suffix string             suffix (default \";\\n\")\n      --lua-unquoted                  output unquoted string keys (e.g. {foo=\"bar\"})\n  -M, --no-colors                     force print with no colors\n  -N, --no-doc                        Don't print document separators (---)\n  -0, --nul-output                    Use NUL char to separate values. If unwrap scalar is also set, fail if unwrapped scalar contains NUL char.\n  -n, --null-input                    Don't read input, simply evaluate the expression given. Useful for creating docs from scratch.\n  -o, --output-format string          [auto|a|yaml|y|json|j|props|p|csv|c|tsv|t|xml|x|base64|uri|toml|shell|s|lua|l|ini|i] output format type. (default \"auto\")\n  -P, --prettyPrint                   pretty print, shorthand for '... style = \"\"'\n      --properties-array-brackets     use [x] in array paths (e.g. for SpringBoot)\n      --properties-separator string   separator to use between keys and values (default \" = \")\n  -s, --split-exp string              print each result (or doc) into a file named (exp). [exp] argument must return a string. You can use $index in the expression as the result counter. The necessary directories will be created.\n      --split-exp-file string         Use a file to specify the split-exp expression.\n      --string-interpolation          Toggles strings interpolation of \\(exp) (default true)\n      --tsv-auto-parse                parse TSV YAML/JSON values (default true)\n  -r, --unwrapScalar                  unwrap scalar, print the value with no quotes, colors or comments. Defaults to true for yaml (default true)\n  -v, --verbose                       verbose mode\n  -V, --version                       Print version information and quit\n      --xml-attribute-prefix string   prefix for xml attributes (default \"+@\")\n      --xml-content-name string       name for xml content (if no attribute name is present). (default \"+content\")\n      --xml-directive-name string     name for xml directives (e.g. &lt;!DOCTYPE thing cat&gt;) (default \"+directive\")\n      --xml-keep-namespace            enables keeping namespace after parsing attributes (default true)\n      --xml-proc-inst-prefix string   prefix for xml processing instructions (e.g. &lt;?xml version=\"1\"?&gt;) (default \"+p_\")\n      --xml-raw-token                 enables using RawToken method instead Token. Commonly disables namespace translations. See https://pkg.go.dev/encoding/xml#Decoder.RawToken for details. (default true)\n      --xml-skip-directives           skip over directives (e.g. &lt;!DOCTYPE thing cat&gt;)\n      --xml-skip-proc-inst            skip over process instructions (e.g. &lt;?xml version=\"1\"?&gt;)\n      --xml-strict-mode               enables strict parsing of XML. See https://pkg.go.dev/encoding/xml for more details.\n\nUse \"yq [command] --help\" for more information about a command.\n</code></pre></div>\n<h2 dir=\"auto\">Known Issues / Missing Features</h2>\n<ul dir=\"auto\">\n<li><code class=\"notranslate\">yq</code> attempts to preserve comment positions and whitespace as much as possible, but it does not handle all scenarios (see <a href=\"https://github.com/go-yaml/yaml/tree/v3\">https://github.com/go-yaml/yaml/tree/v3</a> for details)</li>\n<li>Powershell has its own...<a href=\"https://mikefarah.gitbook.io/yq/usage/tips-and-tricks#quotes-in-windows-powershell\" rel=\"nofollow\">opinions on quoting yq</a></li>\n<li>\"yes\", \"no\" were dropped as boolean values in the yaml 1.2 standard - which is the standard yq assumes.</li>\n</ul>\n<p dir=\"auto\">See <a href=\"https://mikefarah.gitbook.io/yq/usage/tips-and-tricks\" rel=\"nofollow\">tips and tricks</a> for more common problems and solutions.</p>","updatedAt":"2025-05-22T01:54:01Z","upvoteCount":null,"author":{"login":"eryajf","avatarUrl":"https://avatars.githubusercontent.com/u/33259379?u=e4a4090a38ac2473aaed4ef9945233636776c6c3&v=4","url":"https://github.com/eryajf"},"category":null,"labels":{"edges":[{"node":{"name":"更多","color":"25B472"}},{"node":{"name":"命令行工具","color":"e05879"}},{"node":{"name":"mikefarah","color":"6188f8"}}]},"comments":{"edges":[]}}},"pageContext":{"number":623,"previous":{"title":"nerdswords/yet-another-cloudwatch-exporter: AWS CloudWatch 的 Prometheus 导出器 - 通过 AWS 标签发现服务，获取 CloudWatch 指标数据，并以 AWS 标签作为标签，将其作为 Prometheus 指标提供","number":622},"next":{"title":"koderover/zadig: 基于 Kubernetes 研发的自助式云原生 DevOps 平台","number":624}}},
    "staticQueryHashes": ["151096407","2861350382"]}