From e92e75cba66673f0a3d9108b374f4a2f62ccd1cf Mon Sep 17 00:00:00 2001 From: ysthakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:29:41 -0400 Subject: [PATCH 1/4] Update Cargo.lock --- Cargo.lock | 420 +++++++++++++++++++---------------------------------- 1 file changed, 153 insertions(+), 267 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1df6253..b9464c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,67 +19,66 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "assert_cmd" -version = "2.0.12" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" +checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8" dependencies = [ "anstyle", "bstr", @@ -116,21 +115,15 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bstr" -version = "1.6.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", "regex-automata", @@ -160,12 +153,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.82" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" -dependencies = [ - "libc", -] +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -175,20 +165,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.3.19" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" +checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.19" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -198,21 +187,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.53", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" @@ -222,21 +211,21 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "console" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", - "windows-sys 0.45.0", + "windows-sys", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -259,12 +248,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - [[package]] name = "encode_unicode" version = "0.3.6" @@ -273,9 +256,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -292,36 +275,25 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", "libc", + "windows-sys", ] [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -370,21 +342,21 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e57fa0ae458eb99874f54c09f4f9174f8b45fb87e854536a4e608696247f0c23" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "humantime" @@ -394,9 +366,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", "hashbrown", @@ -410,9 +382,9 @@ checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" [[package]] name = "insta" -version = "1.34.0" +version = "1.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d64600be34b2fcfc267740a243fa7744441bb4947a619ac4e5bb6507f35fbfc" +checksum = "0a7c22c4d34ef4788c351e971c52bfdfe7ea2766f8c5466bc175dd46e52ac22e" dependencies = [ "console", "lazy_static", @@ -423,29 +395,20 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ "hermit-abi", - "rustix", - "windows-sys 0.48.0", + "libc", + "windows-sys", ] [[package]] name = "is_ci" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" - -[[package]] -name = "itertools" -version = "0.10.5" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" [[package]] name = "itoa" @@ -483,9 +446,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "linked-hash-map" @@ -495,21 +458,21 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "log" -version = "0.4.19" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "miette" @@ -540,7 +503,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.53", ] [[package]] @@ -551,9 +514,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -570,18 +533,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "owo-colors" @@ -635,9 +598,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "ppv-lite86" @@ -647,13 +610,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "predicates" -version = "3.0.3" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" dependencies = [ "anstyle", "difflib", - "itertools", "predicates-core", ] @@ -691,18 +653,18 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.32" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -758,20 +720,11 @@ dependencies = [ "rand_core", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "regex" -version = "1.9.3" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -781,9 +734,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -792,9 +745,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustc-demangle" @@ -804,48 +757,48 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.7" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "172891ebdceb05aa0005f533a6cbfca599ddd7d966f6f5d4d9b2e70478e70399" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.3.3", + "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.53", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -864,9 +817,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.29" +version = "0.9.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129" +checksum = "a0623d197252096520c6f2a5e1171ee436e5af99a5d7caa2891e55e61950e6d9" dependencies = [ "indexmap", "itoa", @@ -895,9 +848,9 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "supports-color" @@ -920,9 +873,9 @@ dependencies = [ [[package]] name = "supports-unicode" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" +checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a" dependencies = [ "is-terminal", ] @@ -940,9 +893,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" dependencies = [ "proc-macro2", "quote", @@ -951,22 +904,21 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.7.1" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -1000,29 +952,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.51" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.51" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.53", ] [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-linebreak" @@ -1038,9 +990,9 @@ checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "utf8parse" @@ -1081,9 +1033,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -1096,135 +1048,69 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.1", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" [[package]] name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.52.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" [[package]] name = "yaml-rust" From ad509b9f39388b0ff6ebadd70953ae9f4b4607d5 Mon Sep 17 00:00:00 2001 From: ysthakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:26:37 -0400 Subject: [PATCH 2/4] Port Fish's Darwin parser --- samples/darwin/bless.8 | 548 ++++ samples/darwin/brew.1 | 3659 +++++++++++++++++++++++ samples/darwin/htop.1 | 695 +++++ src/parse_man/darwin.rs | 46 + src/parse_man/mod.rs | 2 + src/parse_man/util.rs | 19 +- tests/man_integration_tests.rs | 5 + tests/resources/man/expected/bless.json | 1 + tests/resources/man/in/man8/bless.8 | 548 ++++ 9 files changed, 5514 insertions(+), 9 deletions(-) create mode 100644 samples/darwin/bless.8 create mode 100644 samples/darwin/brew.1 create mode 100644 samples/darwin/htop.1 create mode 100644 src/parse_man/darwin.rs create mode 100644 tests/resources/man/expected/bless.json create mode 100644 tests/resources/man/in/man8/bless.8 diff --git a/samples/darwin/bless.8 b/samples/darwin/bless.8 new file mode 100644 index 0000000..6fda7e0 --- /dev/null +++ b/samples/darwin/bless.8 @@ -0,0 +1,548 @@ +.Dd July 6, 2022 +.Os "Mac OS X" +.Dt BLESS 8 +.Sh NAME +.Nm bless +.Nd set volume bootability and startup disk options +.Sh SYNOPSIS +.Nm bless +.Fl -help +.Pp +.Nm bless +.Fl -folder Ar directory +.Op Fl -file Ar file +.Op Fl -bootefi Op Ar file +.Op Fl -label Ar name | Fl -labelfile Ar file +.Op Fl -setBoot +.Op Fl -nextonly +.Op Fl -shortform +.Op Fl -legacy +.Op Fl -legacydrivehint Ar device +.Op Fl -options Ar string +.Op Fl -personalize +.Op Fl -create-snapshot +.Op Fl -snapshot +.Op Fl -snapshotname +.Op Fl -last-sealed-snapshot +.Op Fl -quiet | -verbose +.Pp +.Nm bless +.Fl -mount Ar directory +.Op Fl -file Ar file +.Op Fl -setBoot +.Op Fl -nextonly +.Op Fl -shortform +.Op Fl -legacy +.Op Fl -legacydrivehint Ar device +.Op Fl -options Ar string +.Op Fl -personalize +.Op Fl -snapshot +.Op Fl -snapshotname +.Op Fl -create-snapshot +.Op Fl -last-sealed-snapshot +.Op Fl -quiet | -verbose +.Pp +.Nm bless +.Fl -device Ar device +.Op Fl -label Ar name | Fl -labelfile Ar file +.Op Fl -startupfile Ar file +.Op Fl -setBoot +.Op Fl -nextonly +.Op Fl -shortform +.Op Fl -legacy +.Op Fl -legacydrivehint Ar device +.Op Fl -options Ar string +.Op Fl -quiet | -verbose +.Pp +.Nm bless +.Fl -netboot +.Fl -server Ar url +.Op Fl -nextonly +.Op Fl -options Ar string +.Op Fl -quiet | -verbose +.Pp +.Nm bless +.Fl -info Op Ar directory +.Op Fl -getBoot +.Op Fl -plist +.Op Fl -quiet | -verbose +.Op Fl -version +.Pp +.Nm bless +.Fl -unbless Ar directory +.Sh DESCRIPTION +.Nm bless +is used to modify the volume bootability characteristics of filesystems, as well +as select the active boot device. +.Nm bless +has 6 modes of execution: Folder Mode, Mount Mode, Device Mode, NetBoot Mode, +Info Mode, and Unbless Mode. +.Pp +Folder Mode allows you to select a directory on a mounted +volume to act as the +.Do blessed Dc +directory, which causes the system firmware to look in that directory +for boot code. EFI-based systems also support a +.Do blessed Dc +system file, which is the primary mechanism of specifying the booter for +a volume for those systems. In Folder Mode, if you are operating on an HFS+ +volume, the HFS+ Volume Header is updated to reflect the files/directories +given, which persists even if the volume is moved to another system or NVRAM +is cleared. +.Pp +Mount Mode does not make permanent modifications to the filesystem, but rather +set the system firmware to boot from the +specified volume, assuming it has been properly blessed. This is a subset of +the functionality of Folder Mode with the +.Fl -setBoot +option, but is convenient when you don't want to change or interrogate +the filesystem for its blessed status. +.Pp +Device Mode is similar to Mount Mode, but allows selection of unmounted +filesystems, for instance while in single user mode. It can also perform +certain offline modifications to the filesystem, but is not generally recommended. +.Pp +NetBoot Mode sets the system firmware to boot from the network, using a +URL syntax to specify the protocol and server. +.Nm +only sets the local system to go into NetBoot mode, and does not communicate +to the server what image should be used, if there are multiple images. Some +other mechanism, such as using Startup Disk, should be used to select that. +.Pp +Info Mode will print +out the currently\-blessed directory of a volume, or if no mountpoint is +specified, the active boot device that the firmware is set to boot from. +.Pp +Unbless Mode complements Folder Mode, and clears the persistent blessed +folder and file information on HFS+ volumes. +.Pp +NOTE: +.Nm bless +must be run as the root user. +.Pp +Additionally, +.Fl -help +can be used to display the command-line usage summary. +.PP +.Sh OPTIONS FOR INTEL ARCHITECTURE BASED DEVICES: +.LP +.Ss FILE/FOLDER MODE +Folder Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -folder Ar directory +Set this directory to be the Mac OS X/Darwin blessed directory, containing a +.Pa BootX +secondary loader for New World machines. +.It Fl -file Ar file +Set this file to be the Mac OS X/Darwin blessed boot file, containing a booter +for EFI-based systems. If this option is not provided, a default boot file +is used based on the blessed directory. +Create a +.Pa BootX +file in the Mac OS X/Darwin system folder using +.Ar file +as a source. If +.Ar file +is not provided, a default is used (see FILES), using a path relative +to the mountpoint you are blessing. This attempts to ensure that a +.Pa BootX +is used that is compatible with the OS on the target volume. +.It Fl -bootefi Op Ar file +Create a +.Pa boot.efi +file in the Mac OS X/Darwin system folder using +.Ar file +as a source. If +.Ar file +is not provided, a default is used (see FILES), using a path relative +to the mountpoint you are blessing. This attempts to ensure that a +.Pa boot.efi +is used that is compatible with the OS on the target volume. If +.Fl -file +is also provided, the new file will be created at that path instead. +.It Fl -label Ar name +Render a text label used in the firmware-based OS picker +.It Fl -labelfile Ar file +Use a pre-rendered label used for the firmware-based OS picker +.It Fl -setBoot +Set the system to boot off the specified partition. This is implemented in +a platform-specific manner. On Open Firmware-based systems, the +.Em boot-device +variable is modified. On EFI-based systems, the +.Em efi-boot-device +variable is changed. This is not supported on Apple Silicon based systems. +.It Fl -nextonly +Only change the boot device selection for the next boot. This is only supported +on EFI-based systems. +.It Fl -shortform +Use an abbreviated device path form. This option can allow for booting from +new devices, at the expense of boot time performance. This is only supported +on EFI-based systems. +.It Fl -legacy +If +.Fl -setBoot +is given, set the firmware to boot a legacy BIOS-based operating system +from the specified disk. The active flag of an MBR-partitioned disk is not +modified, which can be done with +.Xr fdisk 8 +\&. This is only supported +on EFI-based systems. +.It Fl -legacydrivehint Ar device +Instruct the firmware to treat the specified whole disk as the primary, +master IDE drive. This is only supported +on EFI-based systems. +.It Fl -options +Set load options associated with the new boot option. This is only supported +on EFI-based systems, and in general should be avoided. Instead, use +.Xr nvram 8 +to set +.Qo boot-args Qc +, which will work with both Open Firmware- and EFI-based systems. +.It Fl -personalize +Attempts to do a personalization operation on the target, which validates the SecureBoot +bundle and ensures that the relevant boot files are signed and valid for this particular +machine. This may require network access, in order to check the signatures. +.It Only one of the following snapshot options can be activated at the same time: +.It Fl -create-snapshot +Attempts to create an APFS root snapshot of the target APFS system volume and set it as root snapshot +of the system volume. The target system will boot from this snapshot on its next boot. +.It Fl -snapshot +Set specific snapshot (uuid) as root snapshot of the system volume. +The target system will boot from this snapshot on its next boot. +.It Fl -snapshotname +Set specific snapshot (name) as root snapshot of the system volume. +The target system will boot from this snapshot on its next boot. +.It Fl -last-sealed-snapshot +Reverts back to using the previously signed APFS root snapshot reenabling Authenticated Root Volume. + The target system will boot from this sealed snapshot on its next boot. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss MOUNT MODE +Mount Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -mount Ar directory +Use the volume mounted at +.Ar directory +to change the active boot device, in conjunction with +.Fl -setBoot . +The volume must already be properly blessed. +.It Fl -file Ar file +Instead of allowing the firmware to discover the booter based on the blessed +directory or file, pass an explicit path to the firmware to boot from. This +can be used to run EFI applications or EFI booters for alternate OSes, but +should not be normally used. This is only supported on EFI-based systems. +.It Fl -setBoot +Same as for Folder Mode. +.It Fl -nextonly +Same as for Folder Mode. +.It Fl -shortform +Same as for Folder Mode. +.It Fl -legacy +Same as for Folder Mode. +.It Fl -legacydrivehint Ar device +Same as for Folder Mode. +.It Fl -options +Same as for Folder Mode. +.It Fl -personalize +Same as for Folder Mode. +.It Fl -create-snapshot +Same as for Folder Mode. +.It Fl -snapshot +Same as for Folder Mode. +.It Fl -snapshotname +Same as for Folder Mode. +.It Fl -last-sealed-snapshot +Same as for Folder Mode. +.It Fl -bootefi +This enables copying required boot objects when +.Fl -create-snapshot +or +.Fl -last-sealed-snapshot +is given. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss DEVICE MODE +Device Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -device Ar device +Use the block device +.Ar device +to change the active boot device. No volumes should be mounted from +.Ar device +\&, and the filesystem should already be properly blessed. +.It Fl -label Ar name +Set the firmware-based OS picker label for the unmounted filesystem, using +.Ar name +\&, which should be in UTF-8 encoding. +.It Fl -labelfile Ar file +Use a pre-rendered label used with the firmware-based OS picker. +.It Fl -setBoot +Set the system to boot off the specified partition, as with Folder and Mount +Modes. +.It Fl -startupfile Ar file +Add the +.Ar file +as the HFS+ StartupFile, and update other information on disk as appropriate +for the startup file type. +.It Fl -nextonly +Same as for Folder Mode. +.It Fl -shortform +Same as for Folder Mode. +.It Fl -options +Same as for Folder Mode. +.It Fl -legacy +Same as for Folder Mode. +.It Fl -legacydrivehint Ar device +Same as for Folder Mode. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss NETBOOT MODE +NetBoot Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -netboot +Instead of setting the active boot selection to a disk-based volume, set the system +to NetBoot. +.It Fl -server Ar protocol://[interface@]server +A URL specification of how to boot the system. Currently, the only +.Em protocol +supported is BSDP ("bsdp"), Apple's Boot Service Discovery Protocol. The +.Em interface +is optional, and the +.Em server +is the IPv4 address of the server in dotted-quad notation. If there is not +a specific server you'd like to use, pass "255.255.255.255" to have the +firmware broadcast for the first available server. Examples of this notation +would be "bsdp://255.255.255.255" and "bsdp://en1@17.203.12.203". +.It Fl -nextonly +Same as for Folder Mode. +.It Fl -options +Same as for Folder Mode. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss INFO MODE +Info Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -info Op Ar directory +Print out the blessed system folder for the volume mounted at +.Ar directory +\&. If +.Ar directory +is not specified, print information for the currently selected boot device +(which may not necessarily be +.So +/ +.Sc +\&). This is not supported on Apple Silicon based systems. +.It Fl -getBoot +Print out the logical boot device, based on what is currently selected. This +option will take into account the fact that the firmware may be pointing to an +auxiliary booter partition, and will print out the corresponding root partition +for those cases. If the system is configured to NetBoot, a URL matching the +format of the +.Fl -server +specification for NetBoot mode will be printed. +.It Fl -plist +Output all information in Property List (.plist) format, suitable +for parsing by CoreFoundation. This is most useful when +.Nm bless +is executed from another program and its standard output must be parsed. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.It Fl -version +Print bless version and exit immediately +.El +.Ss UNBLESS MODE +Unbless Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -unbless Ar directory +Use the HFS+ volume mounted at +.Ar directory +and unset any persistent blessed files/directories in the HFS+ Volume Header. +.PP +.Sh OPTIONS FOR APPLE SILICON DEVICES: +.LP +NOTE: Admin credentials may be prompted when running bless on an Apple silicon platform +(beyond running the tool as an admin user). However, if the volume has been previously +blessed by a different OS instance, then these credentials may not be necessary +or used to bless the target OS. +.Ss FOLDER MODE - Available only for external/removable devices +Folder Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -folder Ar directory +Set this directory to be the Mac OS X/Darwin blessed directory, containing a +booter for EFI-based systems. +.It Fl -file Ar file +Set this file to be the Mac OS X/Darwin blessed boot file, containing a booter +for EFI-based systems. If this option is not provided, a default boot file +is used based on the blessed directory. +.It Fl -personalize +Attempts to do a personalization operation on the target, which validates the SecureBoot +bundle and ensures that the relevant boot files are signed and valid for this particular +machine. This may require network access, in order to check the signatures. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss MOUNT MODE +Mount Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -mount Ar directory +Use the volume mounted at +.Ar directory +to change the active boot device, in conjunction with +.It Fl -setBoot . +The volume must already be properly blessed. +.It Fl -nextonly +Only change the boot device selection for the next boot. +.It Fl -create-snapshot +Attempts to create an APFS root snapshot of the target APFS system volume and set it as root snapshot +of the system volume. The target system will boot from this snapshot on its next boot. +.It Fl -snapshot +Set specific snapshot (uuid) as root snapshot of the system volume. +The target system will boot from this snapshot on its next boot. +.It Fl -snapshotname +Set specific snapshot (name) as root snapshot of the system volume. +The target system will boot from this snapshot on its next boot. +.It Fl -last-sealed-snapshot +Reverts back to using the previously signed APFS root snapshot reenabling Authenticated Root Volume. +The target system will boot from this sealed snapshot on its next boot. +.It Fl -user +Collect a local owner username to authorize boot policy modification. +.It Fl -stdinpass +Collect a local owner password from stdin without prompting. +.It Fl -passpromt +Explicitly ask to be prompted for the password. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss DEVICE MODE +Device Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -device Ar device +Use the block device +.Ar device +to change the active boot device. No volumes should be mounted from +.Ar device +\&, and the filesystem should already be properly blessed. +.It Fl -setBoot +Set the system to boot off the specified volume, as with Mount and Device mode +Modes. +for the startup file type. +.It Fl -nextonly +Same as for Mount Mode. +.It Fl -user +Collect a local owner username to authorize boot policy modification. +.It Fl -stdinpass +Collect a local owner password from stdin without prompting. +.It Fl -passpromt +Explicitly ask to be prompted for the password. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss INFO MODE +Info Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -info Op Ar directory +.Nm (Available only for external/removable devices) +Print out the blessed system folder for the volume mounted at +.Ar directory +\&. If +.Ar directory +is not specified, print information for the currently selected boot device +(which may not necessarily be +.So +/ +.Sc +\&). +.It Fl -getBoot +Print out the logical boot device, based on what is currently selected. This +option will take into account the fact that the firmware may be pointing to an +auxiliary booter partition, and will print out the corresponding root partition +for those cases. +.It Fl -plist +Output all information in Property List (.plist) format, suitable +for parsing by CoreFoundation. This is most useful when +.Nm bless +is executed from another program and its standard output must be parsed. +.It Fl -user +Collect a local owner username to authorize boot policy modification. +.It Fl -stdinpass +Collect a local owner password from stdin without prompting. +.It Fl -passpromt +Explicitly ask to be prompted for the password. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.It Fl -version +Print bless version and exit immediately +.El +.Sh FILES +.It Pa /usr/standalone/i386/boot.efi +Booter for EFI-based systems, used with the +.Fl -bootefi +flag. If the argument to +.Fl -bootefi +is ommitted, this file will be used as the default input. +.It Pa /System/Library/CoreServices +Typical blessed folder for Mac OS X and Darwin +.El +.Sh EXAMPLES +.Ss FOLDER MODE +To bless a volume with only Mac OS X or Darwin, and create the BootX and +boot.efi files as needed: +.Bd -ragged -offset indent +.Nm bless +.Fl -folder +.Qo /Volumes/Mac OS X/System/Library/CoreServices Qc +.Fl -bootefi +.Ed +.Ss MOUNT MODE +To set a volume containing either Mac OS 9 and Mac OS X to be +the active volume: +.Bd -ragged -offset indent +.Nm bless +.Fl -mount +.Qo /Volumes/Mac OS Qc +.Fl -setBoot +.Ed +.Ss NETBOOT MODE +To set the system to NetBoot and broadcast for an available server: +.Bd -ragged -offset indent +.Nm bless +.Fl -netboot +.Fl -server +.Ar bsdp://255.255.255.255 +.Ed +.Ss INFO MODE +To gather information about the currently selected volume (as +determined by the firmware), suitable for piping to a program capable +of parsing Property Lists: +.Bd -ragged -offset indent +.Nm bless +.Fl -info +.Fl -plist +.Ed +.Sh SEE ALSO +.Xr mount 8 , +.Xr newfs 8 , +.Xr nvram 8 diff --git a/samples/darwin/brew.1 b/samples/darwin/brew.1 new file mode 100644 index 0000000..b5cd56a --- /dev/null +++ b/samples/darwin/brew.1 @@ -0,0 +1,3659 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "BREW" "1" "September 2022" "Homebrew" "brew" +. +.SH "NAME" +\fBbrew\fR \- The Missing Package Manager for macOS (or Linux) +. +.SH "SYNOPSIS" +\fBbrew\fR \fB\-\-version\fR +. +.br +\fBbrew\fR \fIcommand\fR [\fB\-\-verbose\fR|\fB\-v\fR] [\fIoptions\fR] [\fIformula\fR] \.\.\. +. +.SH "DESCRIPTION" +Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn\'t include with macOS\. It can also install software not packaged for your Linux distribution without requiring \fBsudo\fR\. +. +.SH "TERMINOLOGY" +\fBformula\fR + Homebrew package definition that builds from upstream sources +. +.P +\fBcask\fR + Homebrew package definition that installs macOS native applications +. +.P +\fBprefix\fR + path in which Homebrew is installed, e\.g\. \fB/usr/local\fR +. +.P +\fBkeg\fR + installation destination directory of a given \fBformula\fR version, e\.g\. \fB/usr/local/Cellar/foo/0\.1\fR +. +.P +\fBrack\fR + directory containing one or more versioned \fBkegs\fR, e\.g\. \fB/usr/local/Cellar/foo\fR +. +.P +\fBkeg\-only\fR + a \fBformula\fR is \fIkeg\-only\fR if it is not symlinked into Homebrew\'s prefix +. +.P +\fBopt prefix\fR + a symlink to the active version of a \fBkeg\fR, e\.g\. \fB/usr/local/opt/foo\fR +. +.P +\fBCellar\fR + directory containing one or more named \fBracks\fR, e\.g\. \fB/usr/local/Cellar\fR +. +.P +\fBCaskroom\fR + directory containing one or more named \fBcasks\fR, e\.g\. \fB/usr/local/Caskroom\fR +. +.P +\fBexternal command\fR + \fBbrew\fR subcommand defined outside of the Homebrew/brew GitHub repository +. +.P +\fBtap\fR + directory (and usually Git repository) of \fBformulae\fR, \fBcasks\fR and/or \fBexternal commands\fR +. +.P +\fBbottle\fR + pre\-built \fBkeg\fR poured into a \fBrack\fR of the \fBCellar\fR instead of building from upstream sources +. +.SH "ESSENTIAL COMMANDS" +For the full command list, see the \fICOMMANDS\fR section\. +. +.P +With \fB\-\-verbose\fR or \fB\-\-debug\fR, many commands print extra debugging information\. Note that these options should only appear after a command\. +. +.P +Some command behaviour can be customised with environment variables; see the \fIENVIRONMENT\fR section\. +. +.SS "\fBinstall\fR \fIformula\fR" +Install \fIformula\fR\. +. +.P +\fIformula\fR is usually the name of the formula to install, but it has other syntaxes which are listed in the \fISPECIFYING FORMULAE\fR section\. +. +.SS "\fBuninstall\fR \fIformula\fR" +Uninstall \fIformula\fR\. +. +.SS "\fBlist\fR" +List all installed formulae\. +. +.SS "\fBsearch\fR [\fItext\fR|\fB/\fR\fItext\fR\fB/\fR]" +Perform a substring search of cask tokens and formula names for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. The search for \fItext\fR is extended online to \fBhomebrew/core\fR and \fBhomebrew/cask\fR\. If no search term is provided, all locally available formulae are listed\. +. +.SH "COMMANDS" +. +.SS "\fBanalytics\fR [\fIsubcommand\fR]" +Control Homebrew\'s anonymous aggregate user behaviour analytics\. Read more at \fIhttps://docs\.brew\.sh/Analytics\fR\. +. +.P +\fBbrew analytics\fR [\fBstate\fR] + Display the current state of Homebrew\'s analytics\. +. +.P +\fBbrew analytics\fR (\fBon\fR|\fBoff\fR) + Turn Homebrew\'s analytics on or off respectively\. +. +.SS "\fBautoremove\fR [\fB\-\-dry\-run\fR]" +Uninstall formulae that were only installed as a dependency of another formula and are now no longer needed\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +List what would be uninstalled, but do not actually uninstall anything\. +. +.SS "\fBcasks\fR" +List all locally installable casks including short names\. +. +.SS "\fBcleanup\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae\. If arguments are specified, only do this for the given formulae and casks\. Removes all downloads more than 120 days old\. This can be adjusted with \fBHOMEBREW_CLEANUP_MAX_AGE_DAYS\fR\. +. +.TP +\fB\-\-prune\fR +Remove all cache files older than specified \fIdays\fR\. If you want to remove everything, use \fB\-\-prune=all\fR\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Show what would be removed, but do not actually remove anything\. +. +.TP +\fB\-s\fR +Scrub the cache, including downloads for even the latest versions\. Note that downloads for any installed formulae or casks will still not be deleted\. If you want to delete those too: \fBrm \-rf "$(brew \-\-cache)"\fR +. +.TP +\fB\-\-prune\-prefix\fR +Only prune the symlinks and directories from the prefix and remove no other files\. +. +.SS "\fBcommands\fR [\fB\-\-quiet\fR] [\fB\-\-include\-aliases\fR]" +Show lists of built\-in and external commands\. +. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +List only the names of commands without category headers\. +. +.TP +\fB\-\-include\-aliases\fR +Include aliases of internal commands\. +. +.SS "\fBcompletions\fR [\fIsubcommand\fR]" +Control whether Homebrew automatically links external tap shell completion files\. Read more at \fIhttps://docs\.brew\.sh/Shell\-Completion\fR\. +. +.P +\fBbrew completions\fR [\fBstate\fR] + Display the current state of Homebrew\'s completions\. +. +.P +\fBbrew completions\fR (\fBlink\fR|\fBunlink\fR) + Link or unlink Homebrew\'s completions\. +. +.SS "\fBconfig\fR, \fB\-\-config\fR" +Show Homebrew and system configuration info useful for debugging\. If you file a bug report, you will be required to provide this information\. +. +.SS "\fBdeps\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +Show dependencies for \fIformula\fR\. When given multiple formula arguments, show the intersection of dependencies for each formula\. By default, \fBdeps\fR shows all required and recommended dependencies\. +. +.P +If any version of each formula argument is installed and no other options are passed, this command displays their actual runtime dependencies (similar to \fBbrew linkage\fR), which may differ from the current versions\' stated dependencies if the installed versions are outdated\. +. +.P +\fINote:\fR \fB\-\-missing\fR and \fB\-\-skip\-recommended\fR have precedence over \fB\-\-include\-*\fR\. +. +.TP +\fB\-n\fR, \fB\-\-topological\fR +Sort dependencies in topological order\. +. +.TP +\fB\-1\fR, \fB\-\-direct\fR +Show only the direct dependencies declared in the formula\. +. +.TP +\fB\-\-union\fR +Show the union of dependencies for multiple \fIformula\fR, instead of the intersection\. +. +.TP +\fB\-\-full\-name\fR +List dependencies by their full name\. +. +.TP +\fB\-\-include\-build\fR +Include \fB:build\fR dependencies for \fIformula\fR\. +. +.TP +\fB\-\-include\-optional\fR +Include \fB:optional\fR dependencies for \fIformula\fR\. +. +.TP +\fB\-\-include\-test\fR +Include \fB:test\fR dependencies for \fIformula\fR (non\-recursive)\. +. +.TP +\fB\-\-skip\-recommended\fR +Skip \fB:recommended\fR dependencies for \fIformula\fR\. +. +.TP +\fB\-\-include\-requirements\fR +Include requirements in addition to dependencies for \fIformula\fR\. +. +.TP +\fB\-\-tree\fR +Show dependencies as a tree\. When given multiple formula arguments, show individual trees for each formula\. +. +.TP +\fB\-\-graph\fR +Show dependencies as a directed graph\. +. +.TP +\fB\-\-dot\fR +Show text\-based graph description in DOT format\. +. +.TP +\fB\-\-annotate\fR +Mark any build, test, implicit, optional, or recommended dependencies as such in the output\. +. +.TP +\fB\-\-installed\fR +List dependencies for formulae that are currently installed\. If \fIformula\fR is specified, list only its dependencies that are currently installed\. +. +.TP +\fB\-\-missing\fR +Show only missing dependencies\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to list their dependencies\. +. +.TP +\fB\-\-for\-each\fR +Switch into the mode used by the \fB\-\-eval\-all\fR option, but only list dependencies for each provided \fIformula\fR, one formula per line\. This is used for debugging the \fB\-\-installed\fR/\fB\-\-eval\-all\fR display mode\. +. +.TP +\fB\-\-HEAD\fR +Show dependencies for HEAD version instead of stable version\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBdesc\fR [\fIoptions\fR] \fIformula\fR|\fIcask\fR|\fItext\fR|\fB/\fR\fIregex\fR\fB/\fR [\.\.\.]" +Display \fIformula\fR\'s name and one\-line description\. The cache is created on the first search, making that search slower than subsequent ones\. +. +.TP +\fB\-s\fR, \fB\-\-search\fR +Search both names and descriptions for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. +. +.TP +\fB\-n\fR, \fB\-\-name\fR +Search just names for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. +. +.TP +\fB\-d\fR, \fB\-\-description\fR +Search just descriptions for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to search their descriptions\. Implied if \fBHOMEBREW_EVAL_ALL\fR is set\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBdeveloper\fR [\fIsubcommand\fR]" +Control Homebrew\'s developer mode\. When developer mode is enabled, \fBbrew update\fR will update Homebrew to the latest commit on the \fBmaster\fR branch instead of the latest stable version along with some other behaviour changes\. +. +.P +\fBbrew developer\fR [\fBstate\fR] + Display the current state of Homebrew\'s developer mode\. +. +.P +\fBbrew developer\fR (\fBon\fR|\fBoff\fR) + Turn Homebrew\'s developer mode on or off respectively\. +. +.SS "\fBdocs\fR" +Open Homebrew\'s online documentation at \fIhttps://docs\.brew\.sh\fR in a browser\. +. +.SS "\fBdoctor\fR, \fBdr\fR [\fB\-\-list\-checks\fR] [\fB\-\-audit\-debug\fR] [\fIdiagnostic_check\fR \.\.\.]" +Check your system for potential problems\. Will exit with a non\-zero status if any potential problems are found\. +. +.P +Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue\. If everything you use Homebrew for is working fine: please don\'t worry or file an issue; just ignore this\. +. +.TP +\fB\-\-list\-checks\fR +List all audit methods, which can be run individually if provided as arguments\. +. +.TP +\fB\-D\fR, \fB\-\-audit\-debug\fR +Enable debugging and profiling of audit methods\. +. +.SS "\fBfetch\fR [\fIoptions\fR] \fIformula\fR|\fIcask\fR [\.\.\.]" +Download a bottle (if available) or source packages for \fIformula\fRe and binaries for \fIcask\fRs\. For files, also print SHA\-256 checksums\. +. +.TP +\fB\-\-os\fR +Download for the given operating system\. (Pass \fBall\fR to download for all operating systems\.) +. +.TP +\fB\-\-arch\fR +Download for the given CPU architecture\. (Pass \fBall\fR to download for all architectures\.) +. +.TP +\fB\-\-bottle\-tag\fR +Download a bottle for given tag\. +. +.TP +\fB\-\-HEAD\fR +Fetch HEAD version instead of stable version\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Remove a previously cached version and re\-fetch\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Do a verbose VCS checkout, if the URL represents a VCS\. This is useful for seeing if an existing VCS cache has been updated\. +. +.TP +\fB\-\-retry\fR +Retry if downloading fails or re\-download if the checksum of a previously cached version no longer matches\. Tries at most 5 times with exponential backoff\. +. +.TP +\fB\-\-deps\fR +Also download dependencies for any listed \fIformula\fR\. +. +.TP +\fB\-s\fR, \fB\-\-build\-from\-source\fR +Download source packages rather than a bottle\. +. +.TP +\fB\-\-build\-bottle\fR +Download source packages (for eventual bottling) rather than a bottle\. +. +.TP +\fB\-\-force\-bottle\fR +Download a bottle if it exists for the current or newest version of macOS, even if it would not be used during installation\. +. +.TP +\fB\-\-[no\-]quarantine\fR +Disable/enable quarantining of downloads (default: enabled)\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBformulae\fR" +List all locally installable formulae including short names\. +. +.SS "\fBgist\-logs\fR [\fIoptions\fR] \fIformula\fR" +Upload logs for a failed build of \fIformula\fR to a new Gist\. Presents an error message if no logs are found\. +. +.TP +\fB\-\-with\-hostname\fR +Include the hostname in the Gist\. +. +.TP +\fB\-n\fR, \fB\-\-new\-issue\fR +Automatically create a new issue in the appropriate GitHub repository after creating the Gist\. +. +.TP +\fB\-p\fR, \fB\-\-private\fR +The Gist will be marked private and will not appear in listings but will be accessible with its link\. +. +.SS "\fBhome\fR, \fBhomepage\fR [\fB\-\-formula\fR] [\fB\-\-cask\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +Open a \fIformula\fR or \fIcask\fR\'s homepage in a browser, or open Homebrew\'s own homepage if no argument is provided\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBinfo\fR, \fBabv\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +Display brief statistics for your Homebrew installation\. If a \fIformula\fR or \fIcask\fR is provided, show summary of information about it\. +. +.TP +\fB\-\-analytics\fR +List global Homebrew analytics data or, if specified, installation and build error data for \fIformula\fR (provided neither \fBHOMEBREW_NO_ANALYTICS\fR nor \fBHOMEBREW_NO_GITHUB_API\fR are set)\. +. +.TP +\fB\-\-days\fR +How many days of analytics data to retrieve\. The value for \fIdays\fR must be \fB30\fR, \fB90\fR or \fB365\fR\. The default is \fB30\fR\. +. +.TP +\fB\-\-category\fR +Which type of analytics data to retrieve\. The value for \fIcategory\fR must be \fBinstall\fR, \fBinstall\-on\-request\fR or \fBbuild\-error\fR; \fBcask\-install\fR or \fBos\-version\fR may be specified if \fIformula\fR is not\. The default is \fBinstall\fR\. +. +.TP +\fB\-\-github\fR +Open the GitHub source page for \fIformula\fR and \fIcask\fR in a browser\. To view the history locally: \fBbrew log \-p\fR \fIformula\fR or \fIcask\fR +. +.TP +\fB\-\-json\fR +Print a JSON representation\. Currently the default value for \fIversion\fR is \fBv1\fR for \fIformula\fR\. For \fIformula\fR and \fIcask\fR use \fBv2\fR\. See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Querying\-Brew\fR +. +.TP +\fB\-\-installed\fR +Print JSON of formulae that are currently installed\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to print their JSON\. Implied if \fBHOMEBREW_EVAL_ALL\fR is set\. +. +.TP +\fB\-\-variations\fR +Include the variations hash in each formula\'s JSON output\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Show more verbose analytics data for \fIformula\fR\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBinstall\fR [\fIoptions\fR] \fIformula\fR|\fIcask\fR [\.\.\.]" +Install a \fIformula\fR or \fIcask\fR\. Additional options specific to a \fIformula\fR may be appended to the command\. +. +.P +Unless \fBHOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK\fR is set, \fBbrew upgrade\fR or \fBbrew reinstall\fR will be run for outdated dependents and dependents with broken linkage, respectively\. +. +.P +Unless \fBHOMEBREW_NO_INSTALL_CLEANUP\fR is set, \fBbrew cleanup\fR will then be run for the installed formulae or, every 30 days, for all formulae\. +. +.P +Unless \fBHOMEBREW_NO_INSTALL_UPGRADE\fR is set, \fBbrew install\fR \fIformula\fR will upgrade \fIformula\fR if it is already installed but outdated\. +. +.TP +\fB\-d\fR, \fB\-\-debug\fR +If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Install formulae without checking for previously installed keg\-only or non\-migrated versions\. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Print the verification and post\-install steps\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Show what would be installed, but do not actually install anything\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-ignore\-dependencies\fR +An unsupported Homebrew development option to skip installing any dependencies of any kind\. If the dependencies are not already present, the formula will have issues\. If you\'re not developing Homebrew, consider adjusting your PATH rather than using this option\. +. +.TP +\fB\-\-only\-dependencies\fR +Install the dependencies with specified options but do not install the formula itself\. +. +.TP +\fB\-\-cc\fR +Attempt to compile using the specified \fIcompiler\fR, which should be the name of the compiler\'s executable, e\.g\. \fBgcc\-7\fR for GCC 7\. In order to use LLVM\'s clang, specify \fBllvm_clang\fR\. To use the Apple\-provided clang, specify \fBclang\fR\. This option will only accept compilers that are provided by Homebrew or bundled with macOS\. Please do not file issues if you encounter errors while using this option\. +. +.TP +\fB\-s\fR, \fB\-\-build\-from\-source\fR +Compile \fIformula\fR from source even if a bottle is provided\. Dependencies will still be installed from bottles if they are available\. +. +.TP +\fB\-\-force\-bottle\fR +Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation\. +. +.TP +\fB\-\-include\-test\fR +Install testing dependencies required to run \fBbrew test\fR \fIformula\fR\. +. +.TP +\fB\-\-HEAD\fR +If \fIformula\fR defines it, install the HEAD version, aka\. main, trunk, unstable, master\. +. +.TP +\fB\-\-fetch\-HEAD\fR +Fetch the upstream repository to detect if the HEAD installation of the formula is outdated\. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released\. +. +.TP +\fB\-\-keep\-tmp\fR +Retain the temporary files created during installation\. +. +.TP +\fB\-\-debug\-symbols\fR +Generate debug symbols on build\. Source will be retained in a cache directory\. +. +.TP +\fB\-\-build\-bottle\fR +Prepare the formula for eventual bottling during installation, skipping any post\-install steps\. +. +.TP +\fB\-\-skip\-post\-install\fR +Install but skip any post\-install steps\. +. +.TP +\fB\-\-bottle\-arch\fR +Optimise bottles for the specified architecture rather than the oldest architecture supported by the version of macOS the bottles are built on\. +. +.TP +\fB\-\-display\-times\fR +Print install times for each package at the end of the run\. +. +.TP +\fB\-i\fR, \fB\-\-interactive\fR +Download and patch \fIformula\fR, then open a shell\. This allows the user to run \fB\./configure \-\-help\fR and otherwise determine how to turn the software package into a Homebrew package\. +. +.TP +\fB\-g\fR, \fB\-\-git\fR +Create a Git repository, useful for creating patches to the software\. +. +.TP +\fB\-\-overwrite\fR +Delete files that already exist in the prefix while linking\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.TP +\fB\-\-[no\-]binaries\fR +Disable/enable linking of helper executables (default: enabled)\. +. +.TP +\fB\-\-require\-sha\fR +Require all casks to have a checksum\. +. +.TP +\fB\-\-[no\-]quarantine\fR +Disable/enable quarantining of downloads (default: enabled)\. +. +.TP +\fB\-\-adopt\fR +Adopt existing artifacts in the destination that are identical to those being installed\. Cannot be combined with \fB\-\-force\fR\. +. +.TP +\fB\-\-skip\-cask\-deps\fR +Skip installing cask dependencies\. +. +.TP +\fB\-\-zap\fR +For use with \fBbrew reinstall \-\-cask\fR\. Remove all files associated with a cask\. \fIMay remove files which are shared between applications\.\fR +. +.SS "\fBleaves\fR [\fB\-\-installed\-on\-request\fR] [\fB\-\-installed\-as\-dependency\fR]" +List installed formulae that are not dependencies of another installed formula or cask\. +. +.TP +\fB\-r\fR, \fB\-\-installed\-on\-request\fR +Only list leaves that were manually installed\. +. +.TP +\fB\-p\fR, \fB\-\-installed\-as\-dependency\fR +Only list leaves that were installed as dependencies\. +. +.SS "\fBlink\fR, \fBln\fR [\fIoptions\fR] \fIinstalled_formula\fR [\.\.\.]" +Symlink all of \fIformula\fR\'s installed files into Homebrew\'s prefix\. This is done automatically when you install formulae but can be useful for manual installations\. +. +.TP +\fB\-\-overwrite\fR +Delete files that already exist in the prefix while linking\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +List files which would be linked or deleted by \fBbrew link \-\-overwrite\fR without actually linking or deleting any files\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Allow keg\-only formulae to be linked\. +. +.TP +\fB\-\-HEAD\fR +Link the HEAD version of the formula if it is installed\. +. +.SS "\fBlist\fR, \fBls\fR [\fIoptions\fR] [\fIinstalled_formula\fR|\fIinstalled_cask\fR \.\.\.]" +List all installed formulae and casks\. If \fIformula\fR is provided, summarise the paths within its current keg\. If \fIcask\fR is provided, list its artifacts\. +. +.TP +\fB\-\-formula\fR +List only formulae, or treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +List only casks, or treat all named arguments as casks\. +. +.TP +\fB\-\-full\-name\fR +Print formulae with fully\-qualified names\. Unless \fB\-\-full\-name\fR, \fB\-\-versions\fR or \fB\-\-pinned\fR are passed, other options (i\.e\. \fB\-1\fR, \fB\-l\fR, \fB\-r\fR and \fB\-t\fR) are passed to \fBls\fR(1) which produces the actual output\. +. +.TP +\fB\-\-versions\fR +Show the version number for installed formulae, or only the specified formulae if \fIformula\fR are provided\. +. +.TP +\fB\-\-multiple\fR +Only show formulae with multiple versions installed\. +. +.TP +\fB\-\-pinned\fR +List only pinned formulae, or only the specified (pinned) formulae if \fIformula\fR are provided\. See also \fBpin\fR, \fBunpin\fR\. +. +.TP +\fB\-1\fR +Force output to be one entry per line\. This is the default when output is not to a terminal\. +. +.TP +\fB\-l\fR +List formulae and/or casks in long format\. Has no effect when a formula or cask name is passed as an argument\. +. +.TP +\fB\-r\fR +Reverse the order of the formulae and/or casks sort to list the oldest entries first\. Has no effect when a formula or cask name is passed as an argument\. +. +.TP +\fB\-t\fR +Sort formulae and/or casks by time modified, listing most recently modified first\. Has no effect when a formula or cask name is passed as an argument\. +. +.SS "\fBlog\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR]" +Show the \fBgit log\fR for \fIformula\fR or \fIcask\fR, or show the log for the Homebrew repository if no formula or cask is provided\. +. +.TP +\fB\-p\fR, \fB\-\-patch\fR +Also print patch from commit\. +. +.TP +\fB\-\-stat\fR +Also print diffstat from commit\. +. +.TP +\fB\-\-oneline\fR +Print only one line per commit\. +. +.TP +\fB\-1\fR +Print only one commit\. +. +.TP +\fB\-n\fR, \fB\-\-max\-count\fR +Print only a specified number of commits\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBmigrate\fR [\fIoptions\fR] \fIinstalled_formula\fR|\fIinstalled_cask\fR [\.\.\.]" +Migrate renamed packages to new names, where \fIformula\fR are old names of packages\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Treat installed \fIformula\fR and provided \fIformula\fR as if they are from the same taps and migrate them anyway\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Show what would be migrated, but do not actually migrate anything\. +. +.TP +\fB\-\-formula\fR +Only migrate formulae\. +. +.TP +\fB\-\-cask\fR +Only migrate casks\. +. +.SS "\fBmissing\fR [\fB\-\-hide=\fR] [\fIformula\fR \.\.\.]" +Check the given \fIformula\fR kegs for missing dependencies\. If no \fIformula\fR are provided, check all kegs\. Will exit with a non\-zero status if any kegs are found to be missing dependencies\. +. +.TP +\fB\-\-hide\fR +Act as if none of the specified \fIhidden\fR are installed\. \fIhidden\fR should be a comma\-separated list of formulae\. +. +.SS "\fBnodenv\-sync\fR" +Create symlinks for Homebrew\'s installed NodeJS versions in \fB~/\.nodenv/versions\fR\. +. +.P +Note that older version symlinks will also be created so e\.g\. NodeJS 19\.1\.0 will also be symlinked to 19\.0\.0\. +. +.SS "\fBoptions\fR [\fIoptions\fR] [\fIformula\fR \.\.\.]" +Show install options specific to \fIformula\fR\. +. +.TP +\fB\-\-compact\fR +Show all options on a single line separated by spaces\. +. +.TP +\fB\-\-installed\fR +Show options for formulae that are currently installed\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to show their options\. +. +.TP +\fB\-\-command\fR +Show options for the specified \fIcommand\fR\. +. +.SS "\fBoutdated\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +List installed casks and formulae that have an updated version available\. By default, version information is displayed in interactive shells, and suppressed otherwise\. +. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +List only the names of outdated kegs (takes precedence over \fB\-\-verbose\fR)\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Include detailed version information\. +. +.TP +\fB\-\-formula\fR +List only outdated formulae\. +. +.TP +\fB\-\-cask\fR +List only outdated casks\. +. +.TP +\fB\-\-json\fR +Print output in JSON format\. There are two versions: \fBv1\fR and \fBv2\fR\. \fBv1\fR is deprecated and is currently the default if no version is specified\. \fBv2\fR prints outdated formulae and casks\. +. +.TP +\fB\-\-fetch\-HEAD\fR +Fetch the upstream repository to detect if the HEAD installation of the formula is outdated\. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released\. +. +.TP +\fB\-g\fR, \fB\-\-greedy\fR +Also include outdated casks with \fBauto_updates true\fR or \fBversion :latest\fR\. +. +.TP +\fB\-\-greedy\-latest\fR +Also include outdated casks including those with \fBversion :latest\fR\. +. +.TP +\fB\-\-greedy\-auto\-updates\fR +Also include outdated casks including those with \fBauto_updates true\fR\. +. +.SS "\fBpin\fR \fIinstalled_formula\fR [\.\.\.]" +Pin the specified \fIformula\fR, preventing them from being upgraded when issuing the \fBbrew upgrade\fR \fIformula\fR command\. See also \fBunpin\fR\. +. +.P +\fINote:\fR Other packages which depend on newer versions of a pinned formula might not install or run correctly\. +. +.SS "\fBpostinstall\fR, \fBpost_install\fR \fIinstalled_formula\fR [\.\.\.]" +Rerun the post\-install steps for \fIformula\fR\. +. +.SS "\fBpyenv\-sync\fR" +Create symlinks for Homebrew\'s installed Python versions in \fB~/\.pyenv/versions\fR\. +. +.P +Note that older patch version symlinks will be created and linked to the minor version so e\.g\. Python 3\.11\.0 will also be symlinked to 3\.11\.3\. +. +.SS "\fBrbenv\-sync\fR" +Create symlinks for Homebrew\'s installed Ruby versions in \fB~/\.rbenv/versions\fR\. +. +.P +Note that older version symlinks will also be created so e\.g\. Ruby 3\.2\.1 will also be symlinked to 3\.2\.0\. +. +.SS "\fBreadall\fR [\fIoptions\fR] [\fItap\fR \.\.\.]" +Import all items from the specified \fItap\fR, or from all installed taps if none is provided\. This can be useful for debugging issues across all items when making significant changes to \fBformula\.rb\fR, testing the performance of loading all items or checking if any current formulae/casks have Ruby issues\. +. +.TP +\fB\-\-os\fR +Read using the given operating system\. (Pass \fBall\fR to simulate all operating systems\.) +. +.TP +\fB\-\-arch\fR +Read using the given CPU architecture\. (Pass \fBall\fR to simulate all architectures\.) +. +.TP +\fB\-\-aliases\fR +Verify any alias symlinks in each tap\. +. +.TP +\fB\-\-syntax\fR +Syntax\-check all of Homebrew\'s Ruby files (if no \fItap\fR is passed)\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not\. Implied if \fBHOMEBREW_EVAL_ALL\fR is set\. +. +.TP +\fB\-\-no\-simulate\fR +Don\'t simulate other system configurations when checking formulae and casks\. +. +.SS "\fBreinstall\fR [\fIoptions\fR] \fIformula\fR|\fIcask\fR [\.\.\.]" +Uninstall and then reinstall a \fIformula\fR or \fIcask\fR using the same options it was originally installed with, plus any appended options specific to a \fIformula\fR\. +. +.P +Unless \fBHOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK\fR is set, \fBbrew upgrade\fR or \fBbrew reinstall\fR will be run for outdated dependents and dependents with broken linkage, respectively\. +. +.P +Unless \fBHOMEBREW_NO_INSTALL_CLEANUP\fR is set, \fBbrew cleanup\fR will then be run for the reinstalled formulae or, every 30 days, for all formulae\. +. +.TP +\fB\-d\fR, \fB\-\-debug\fR +If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Install without checking for previously installed keg\-only or non\-migrated versions\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Print the verification and post\-install steps\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-s\fR, \fB\-\-build\-from\-source\fR +Compile \fIformula\fR from source even if a bottle is available\. +. +.TP +\fB\-i\fR, \fB\-\-interactive\fR +Download and patch \fIformula\fR, then open a shell\. This allows the user to run \fB\./configure \-\-help\fR and otherwise determine how to turn the software package into a Homebrew package\. +. +.TP +\fB\-\-force\-bottle\fR +Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation\. +. +.TP +\fB\-\-keep\-tmp\fR +Retain the temporary files created during installation\. +. +.TP +\fB\-\-debug\-symbols\fR +Generate debug symbols on build\. Source will be retained in a cache directory\. +. +.TP +\fB\-\-display\-times\fR +Print install times for each formula at the end of the run\. +. +.TP +\fB\-g\fR, \fB\-\-git\fR +Create a Git repository, useful for creating patches to the software\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.TP +\fB\-\-[no\-]binaries\fR +Disable/enable linking of helper executables (default: enabled)\. +. +.TP +\fB\-\-require\-sha\fR +Require all casks to have a checksum\. +. +.TP +\fB\-\-[no\-]quarantine\fR +Disable/enable quarantining of downloads (default: enabled)\. +. +.TP +\fB\-\-adopt\fR +Adopt existing artifacts in the destination that are identical to those being installed\. Cannot be combined with \fB\-\-force\fR\. +. +.TP +\fB\-\-skip\-cask\-deps\fR +Skip installing cask dependencies\. +. +.TP +\fB\-\-zap\fR +For use with \fBbrew reinstall \-\-cask\fR\. Remove all files associated with a cask\. \fIMay remove files which are shared between applications\.\fR +. +.SS "\fBsearch\fR, \fB\-S\fR [\fIoptions\fR] \fItext\fR|\fB/\fR\fIregex\fR\fB/\fR [\.\.\.]" +Perform a substring search of cask tokens and formula names for \fItext\fR\. If \fItext\fR is flanked by slashes, it is interpreted as a regular expression\. +. +.TP +\fB\-\-formula\fR +Search for formulae\. +. +.TP +\fB\-\-cask\fR +Search for casks\. +. +.TP +\fB\-\-desc\fR +Search for formulae with a description matching \fItext\fR and casks with a name or description matching \fItext\fR\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to search their descriptions\. Implied if \fBHOMEBREW_EVAL_ALL\fR is set\. +. +.TP +\fB\-\-pull\-request\fR +Search for GitHub pull requests containing \fItext\fR\. +. +.TP +\fB\-\-open\fR +Search for only open GitHub pull requests\. +. +.TP +\fB\-\-closed\fR +Search for only closed GitHub pull requests\. +. +.TP +\fB\-\-repology\fR +Search for \fItext\fR in the given database\. +. +.TP +\fB\-\-macports\fR +Search for \fItext\fR in the given database\. +. +.TP +\fB\-\-fink\fR +Search for \fItext\fR in the given database\. +. +.TP +\fB\-\-opensuse\fR +Search for \fItext\fR in the given database\. +. +.TP +\fB\-\-fedora\fR +Search for \fItext\fR in the given database\. +. +.TP +\fB\-\-archlinux\fR +Search for \fItext\fR in the given database\. +. +.TP +\fB\-\-debian\fR +Search for \fItext\fR in the given database\. +. +.TP +\fB\-\-ubuntu\fR +Search for \fItext\fR in the given database\. +. +.SS "\fBsetup\-ruby\fR" +Installs and configures Homebrew\'s Ruby\. +. +.SS "\fBshellenv [bash|csh|fish|pwsh|sh|tcsh|zsh]\fR" +Print export statements\. When run in a shell, this installation of Homebrew will be added to your \fBPATH\fR, \fBMANPATH\fR, and \fBINFOPATH\fR\. +. +.P +The variables \fBHOMEBREW_PREFIX\fR, \fBHOMEBREW_CELLAR\fR and \fBHOMEBREW_REPOSITORY\fR are also exported to avoid querying them multiple times\. To help guarantee idempotence, this command produces no output when Homebrew\'s \fBbin\fR and \fBsbin\fR directories are first and second respectively in your \fBPATH\fR\. Consider adding evaluation of this command\'s output to your dotfiles (e\.g\. \fB~/\.bash_profile\fR or \fB~/\.zprofile\fR on macOS and \fB~/\.bashrc\fR or \fB~/\.zshrc\fR on Linux) with: \fBeval "$(brew shellenv)"\fR +. +.P +The shell can be specified explicitly with a supported shell name parameter\. Unknown shells will output POSIX exports\. +. +.SS "\fBtap\fR [\fIoptions\fR] [\fIuser\fR\fB/\fR\fIrepo\fR] [\fIURL\fR]" +Tap a formula repository\. If no arguments are provided, list all installed taps\. +. +.P +With \fIURL\fR unspecified, tap a formula repository from GitHub using HTTPS\. Since so many taps are hosted on GitHub, this command is a shortcut for \fBbrew tap\fR \fIuser\fR\fB/\fR\fIrepo\fR \fBhttps://github\.com/\fR\fIuser\fR\fB/homebrew\-\fR\fIrepo\fR\. +. +.P +With \fIURL\fR specified, tap a formula repository from anywhere, using any transport protocol that \fBgit\fR(1) handles\. The one\-argument form of \fBtap\fR simplifies but also limits\. This two\-argument command makes no assumptions, so taps can be cloned from places other than GitHub and using protocols other than HTTPS, e\.g\. SSH, git, HTTP, FTP(S), rsync\. +. +.TP +\fB\-\-[no\-]force\-auto\-update\fR +Auto\-update tap even if it is not hosted on GitHub\. By default, only taps hosted on GitHub are auto\-updated (for performance reasons)\. +. +.TP +\fB\-\-custom\-remote\fR +Install or change a tap with a custom remote\. Useful for mirrors\. +. +.TP +\fB\-\-repair\fR +Migrate tapped formulae from symlink\-based to directory\-based structure\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all the formulae, casks and aliases in the new tap to check validity\. Implied if \fBHOMEBREW_EVAL_ALL\fR is set\. +. +.TP +\fB\-\-force\fR +Force install core taps even under API mode\. +. +.SS "\fBtap\-info\fR [\fB\-\-installed\fR] [\fB\-\-json\fR] [\fItap\fR \.\.\.]" +Show detailed information about one or more \fItap\fRs\. If no \fItap\fR names are provided, display brief statistics for all installed taps\. +. +.TP +\fB\-\-installed\fR +Show information on each installed tap\. +. +.TP +\fB\-\-json\fR +Print a JSON representation of \fItap\fR\. Currently the default and only accepted value for \fIversion\fR is \fBv1\fR\. See the docs for examples of using the JSON output: \fIhttps://docs\.brew\.sh/Querying\-Brew\fR +. +.SS "\fBuninstall\fR, \fBremove\fR, \fBrm\fR [\fIoptions\fR] \fIinstalled_formula\fR|\fIinstalled_cask\fR [\.\.\.]" +Uninstall a \fIformula\fR or \fIcask\fR\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Delete all installed versions of \fIformula\fR\. Uninstall even if \fIcask\fR is not installed, overwrite existing files and ignore errors when removing files\. +. +.TP +\fB\-\-zap\fR +Remove all files associated with a \fIcask\fR\. \fIMay remove files which are shared between applications\.\fR +. +.TP +\fB\-\-ignore\-dependencies\fR +Don\'t fail uninstall, even if \fIformula\fR is a dependency of any installed formulae\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBunlink\fR [\fB\-\-dry\-run\fR] \fIinstalled_formula\fR [\.\.\.]" +Remove symlinks for \fIformula\fR from Homebrew\'s prefix\. This can be useful for temporarily disabling a formula: \fBbrew unlink\fR \fIformula\fR \fB&&\fR \fIcommands\fR \fB&& brew link\fR \fIformula\fR +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +List files which would be unlinked without actually unlinking or deleting any files\. +. +.SS "\fBunpin\fR \fIinstalled_formula\fR [\.\.\.]" +Unpin \fIformula\fR, allowing them to be upgraded by \fBbrew upgrade\fR \fIformula\fR\. See also \fBpin\fR\. +. +.SS "\fBuntap\fR [\fB\-\-force\fR] \fItap\fR [\.\.\.]" +Remove a tapped formula repository\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Untap even if formulae or casks from this tap are currently installed\. +. +.SS "\fBupdate\fR [\fIoptions\fR]" +Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\fR(1) and perform any necessary migrations\. +. +.TP +\fB\-\-merge\fR +Use \fBgit merge\fR to apply updates (rather than \fBgit rebase\fR)\. +. +.TP +\fB\-\-auto\-update\fR +Run on auto\-updates (e\.g\. before \fBbrew install\fR)\. Skips some slower steps\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Always do a slower, full update check (even if unnecessary)\. +. +.SS "\fBupdate\-reset\fR [\fIpath\-to\-tap\-repository\fR \.\.\.]" +Fetch and reset Homebrew and all tap repositories (or any specified \fIrepository\fR) using \fBgit\fR(1) to their latest \fBorigin/HEAD\fR\. +. +.P +\fINote:\fR this will destroy all your uncommitted or committed changes\. +. +.SS "\fBupgrade\fR [\fIoptions\fR] [\fIinstalled_formula\fR|\fIinstalled_cask\fR \.\.\.]" +Upgrade outdated casks and outdated, unpinned formulae using the same options they were originally installed with, plus any appended brew formula options\. If \fIcask\fR or \fIformula\fR are specified, upgrade only the given \fIcask\fR or \fIformula\fR kegs (unless they are pinned; see \fBpin\fR, \fBunpin\fR)\. +. +.P +Unless \fBHOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK\fR is set, \fBbrew upgrade\fR or \fBbrew reinstall\fR will be run for outdated dependents and dependents with broken linkage, respectively\. +. +.P +Unless \fBHOMEBREW_NO_INSTALL_CLEANUP\fR is set, \fBbrew cleanup\fR will then be run for the upgraded formulae or, every 30 days, for all formulae\. +. +.TP +\fB\-d\fR, \fB\-\-debug\fR +If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Install formulae without checking for previously installed keg\-only or non\-migrated versions\. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Print the verification and post\-install steps\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Show what would be upgraded, but do not actually upgrade anything\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. If no named arguments are specified, upgrade only outdated formulae\. +. +.TP +\fB\-s\fR, \fB\-\-build\-from\-source\fR +Compile \fIformula\fR from source even if a bottle is available\. +. +.TP +\fB\-i\fR, \fB\-\-interactive\fR +Download and patch \fIformula\fR, then open a shell\. This allows the user to run \fB\./configure \-\-help\fR and otherwise determine how to turn the software package into a Homebrew package\. +. +.TP +\fB\-\-force\-bottle\fR +Install from a bottle if it exists for the current or newest version of macOS, even if it would not normally be used for installation\. +. +.TP +\fB\-\-fetch\-HEAD\fR +Fetch the upstream repository to detect if the HEAD installation of the formula is outdated\. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released\. +. +.TP +\fB\-\-keep\-tmp\fR +Retain the temporary files created during installation\. +. +.TP +\fB\-\-debug\-symbols\fR +Generate debug symbols on build\. Source will be retained in a cache directory\. +. +.TP +\fB\-\-display\-times\fR +Print install times for each package at the end of the run\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. If no named arguments are specified, upgrade only outdated casks\. +. +.TP +\fB\-\-skip\-cask\-deps\fR +Skip installing cask dependencies\. +. +.TP +\fB\-g\fR, \fB\-\-greedy\fR +Also include casks with \fBauto_updates true\fR or \fBversion :latest\fR\. +. +.TP +\fB\-\-greedy\-latest\fR +Also include casks with \fBversion :latest\fR\. +. +.TP +\fB\-\-greedy\-auto\-updates\fR +Also include casks with \fBauto_updates true\fR\. +. +.TP +\fB\-\-[no\-]binaries\fR +Disable/enable linking of helper executables (default: enabled)\. +. +.TP +\fB\-\-require\-sha\fR +Require all casks to have a checksum\. +. +.TP +\fB\-\-[no\-]quarantine\fR +Disable/enable quarantining of downloads (default: enabled)\. +. +.SS "\fBuses\fR [\fIoptions\fR] \fIformula\fR [\.\.\.]" +Show formulae and casks that specify \fIformula\fR as a dependency; that is, show dependents of \fIformula\fR\. When given multiple formula arguments, show the intersection of formulae that use \fIformula\fR\. By default, \fBuses\fR shows all formulae and casks that specify \fIformula\fR as a required or recommended dependency for their stable builds\. +. +.P +\fINote:\fR \fB\-\-missing\fR and \fB\-\-skip\-recommended\fR have precedence over \fB\-\-include\-*\fR\. +. +.TP +\fB\-\-recursive\fR +Resolve more than one level of dependencies\. +. +.TP +\fB\-\-installed\fR +Only list formulae and casks that are currently installed\. +. +.TP +\fB\-\-missing\fR +Only list formulae and casks that are not currently installed\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to show their dependents\. +. +.TP +\fB\-\-include\-build\fR +Include formulae that specify \fIformula\fR as a \fB:build\fR dependency\. +. +.TP +\fB\-\-include\-test\fR +Include formulae that specify \fIformula\fR as a \fB:test\fR dependency\. +. +.TP +\fB\-\-include\-optional\fR +Include formulae that specify \fIformula\fR as an \fB:optional\fR dependency\. +. +.TP +\fB\-\-skip\-recommended\fR +Skip all formulae that specify \fIformula\fR as a \fB:recommended\fR dependency\. +. +.TP +\fB\-\-formula\fR +Include only formulae\. +. +.TP +\fB\-\-cask\fR +Include only casks\. +. +.SS "\fB\-\-cache\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +Display Homebrew\'s download cache\. See also \fBHOMEBREW_CACHE\fR\. +. +.P +If \fIformula\fR is provided, display the file or directory used to cache \fIformula\fR\. +. +.TP +\fB\-\-os\fR +Show cache file for the given operating system\. (Pass \fBall\fR to show cache files for all operating systems\.) +. +.TP +\fB\-\-arch\fR +Show cache file for the given CPU architecture\. (Pass \fBall\fR to show cache files for all architectures\.) +. +.TP +\fB\-s\fR, \fB\-\-build\-from\-source\fR +Show the cache file used when building from source\. +. +.TP +\fB\-\-force\-bottle\fR +Show the cache file used when pouring a bottle\. +. +.TP +\fB\-\-bottle\-tag\fR +Show the cache file used when pouring a bottle for the given tag\. +. +.TP +\fB\-\-HEAD\fR +Show the cache file used when building from HEAD\. +. +.TP +\fB\-\-formula\fR +Only show cache files for formulae\. +. +.TP +\fB\-\-cask\fR +Only show cache files for casks\. +. +.SS "\fB\-\-caskroom\fR [\fIcask\fR \.\.\.]" +Display Homebrew\'s Caskroom path\. +. +.P +If \fIcask\fR is provided, display the location in the Caskroom where \fIcask\fR would be installed, without any sort of versioned directory as the last path\. +. +.SS "\fB\-\-cellar\fR [\fIformula\fR \.\.\.]" +Display Homebrew\'s Cellar path\. \fIDefault:\fR \fB$(brew \-\-prefix)/Cellar\fR, or if that directory doesn\'t exist, \fB$(brew \-\-repository)/Cellar\fR\. +. +.P +If \fIformula\fR is provided, display the location in the Cellar where \fIformula\fR would be installed, without any sort of versioned directory as the last path\. +. +.SS "\fB\-\-env\fR, \fBenvironment\fR [\fB\-\-shell=\fR] [\fB\-\-plain\fR] [\fIformula\fR \.\.\.]" +Summarise Homebrew\'s build environment as a plain list\. +. +.P +If the command\'s output is sent through a pipe and no shell is specified, the list is formatted for export to \fBbash\fR(1) unless \fB\-\-plain\fR is passed\. +. +.TP +\fB\-\-shell\fR +Generate a list of environment variables for the specified shell, or \fB\-\-shell=auto\fR to detect the current shell\. +. +.TP +\fB\-\-plain\fR +Generate plain output even when piped\. +. +.SS "\fB\-\-prefix\fR [\fB\-\-unbrewed\fR] [\fB\-\-installed\fR] [\fIformula\fR \.\.\.]" +Display Homebrew\'s install path\. \fIDefault:\fR +. +.IP "\(bu" 4 +macOS ARM: \fB/opt/homebrew\fR +. +.IP "\(bu" 4 +macOS Intel: \fB/usr/local\fR +. +.IP "\(bu" 4 +Linux: \fB/home/linuxbrew/\.linuxbrew\fR +. +.IP "" 0 +. +.P +If \fIformula\fR is provided, display the location where \fIformula\fR is or would be installed\. +. +.TP +\fB\-\-unbrewed\fR +List files in Homebrew\'s prefix not installed by Homebrew\. +. +.TP +\fB\-\-installed\fR +Outputs nothing and returns a failing status code if \fIformula\fR is not installed\. +. +.SS "\fB\-\-repository\fR, \fB\-\-repo\fR [\fItap\fR \.\.\.]" +Display where Homebrew\'s Git repository is located\. +. +.P +If \fIuser\fR\fB/\fR\fIrepo\fR are provided, display where tap \fIuser\fR\fB/\fR\fIrepo\fR\'s directory is located\. +. +.SS "\fB\-\-version\fR, \fB\-v\fR" +Print the version numbers of Homebrew, Homebrew/homebrew\-core and Homebrew/homebrew\-cask (if tapped) to standard output\. +. +.SH "DEVELOPER COMMANDS" +. +.SS "\fBaudit\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +Check \fIformula\fR for Homebrew coding style violations\. This should be run before submitting a new formula or cask\. If no \fIformula\fR|\fIcask\fR are provided, check all locally available formulae and casks and skip style checks\. Will exit with a non\-zero status if any errors are found\. +. +.TP +\fB\-\-os\fR +Audit the given operating system\. (Pass \fBall\fR to audit all operating systems\.) +. +.TP +\fB\-\-arch\fR +Audit the given CPU architecture\. (Pass \fBall\fR to audit all architectures\.) +. +.TP +\fB\-\-strict\fR +Run additional, stricter style checks\. +. +.TP +\fB\-\-git\fR +Run additional, slower style checks that navigate the Git repository\. +. +.TP +\fB\-\-online\fR +Run additional, slower style checks that require a network connection\. +. +.TP +\fB\-\-installed\fR +Only check formulae and casks that are currently installed\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to audit them\. Implied if \fBHOMEBREW_EVAL_ALL\fR is set\. +. +.TP +\fB\-\-new\fR +Run various additional style checks to determine if a new formula or cask is eligible for Homebrew\. This should be used when creating new formulae or casks and implies \fB\-\-strict\fR and \fB\-\-online\fR\. +. +.TP +\fB\-\-[no\-]signing\fR +Audit for signed apps, which are required on ARM +. +.TP +\fB\-\-token\-conflicts\fR +Audit for token conflicts\. +. +.TP +\fB\-\-tap\fR +Check the formulae within the given tap, specified as \fIuser\fR\fB/\fR\fIrepo\fR\. +. +.TP +\fB\-\-fix\fR +Fix style violations automatically using RuboCop\'s auto\-correct feature\. +. +.TP +\fB\-\-display\-filename\fR +Prefix every line of output with the file or formula name being audited, to make output easy to grep\. +. +.TP +\fB\-\-skip\-style\fR +Skip running non\-RuboCop style checks\. Useful if you plan on running \fBbrew style\fR separately\. Enabled by default unless a formula is specified by name\. +. +.TP +\fB\-D\fR, \fB\-\-audit\-debug\fR +Enable debugging and profiling of audit methods\. +. +.TP +\fB\-\-only\fR +Specify a comma\-separated \fImethod\fR list to only run the methods named \fBaudit_\fR\fImethod\fR\. +. +.TP +\fB\-\-except\fR +Specify a comma\-separated \fImethod\fR list to skip running the methods named \fBaudit_\fR\fImethod\fR\. +. +.TP +\fB\-\-only\-cops\fR +Specify a comma\-separated \fIcops\fR list to check for violations of only the listed RuboCop cops\. +. +.TP +\fB\-\-except\-cops\fR +Specify a comma\-separated \fIcops\fR list to skip checking for violations of the listed RuboCop cops\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBbottle\fR [\fIoptions\fR] \fIinstalled_formula\fR|\fIfile\fR [\.\.\.]" +Generate a bottle (binary package) from a formula that was installed with \fB\-\-build\-bottle\fR\. If the formula specifies a rebuild version, it will be incremented in the generated DSL\. Passing \fB\-\-keep\-old\fR will attempt to keep it at its original value, while \fB\-\-no\-rebuild\fR will remove it\. +. +.TP +\fB\-\-skip\-relocation\fR +Do not check if the bottle can be marked as relocatable\. +. +.TP +\fB\-\-force\-core\-tap\fR +Build a bottle even if \fIformula\fR is not in \fBhomebrew/core\fR or any installed taps\. +. +.TP +\fB\-\-no\-rebuild\fR +If the formula specifies a rebuild version, remove it from the generated DSL\. +. +.TP +\fB\-\-keep\-old\fR +If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL\. +. +.TP +\fB\-\-json\fR +Write bottle information to a JSON file, which can be used as the value for \fB\-\-merge\fR\. +. +.TP +\fB\-\-merge\fR +Generate an updated bottle block for a formula and optionally merge it into the formula file\. Instead of a formula name, requires the path to a JSON file generated with \fBbrew bottle \-\-json\fR \fIformula\fR\. +. +.TP +\fB\-\-write\fR +Write changes to the formula file\. A new commit will be generated unless \fB\-\-no\-commit\fR is passed\. +. +.TP +\fB\-\-no\-commit\fR +When passed with \fB\-\-write\fR, a new commit will not generated after writing changes to the formula file\. +. +.TP +\fB\-\-only\-json\-tab\fR +When passed with \fB\-\-json\fR, the tab will be written to the JSON file but not the bottle\. +. +.TP +\fB\-\-no\-all\-checks\fR +Don\'t try to create an \fBall\fR bottle or stop a no\-change upload\. +. +.TP +\fB\-\-committer\fR +Specify a committer name and email in \fBgit\fR\'s standard author format\. +. +.TP +\fB\-\-root\-url\fR +Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\. +. +.TP +\fB\-\-root\-url\-using\fR +Use the specified download strategy class for downloading the bottle\'s URL instead of Homebrew\'s default\. +. +.SS "\fBbump\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +Display out\-of\-date brew formulae and the latest version available\. If the returned current and livecheck versions differ or when querying specific formulae, also displays whether a pull request has been opened with the URL\. +. +.TP +\fB\-\-full\-name\fR +Print formulae/casks with fully\-qualified names\. +. +.TP +\fB\-\-no\-pull\-requests\fR +Do not retrieve pull requests from GitHub\. +. +.TP +\fB\-\-formula\fR +Check only formulae\. +. +.TP +\fB\-\-cask\fR +Check only casks\. +. +.TP +\fB\-\-installed\fR +Check formulae and casks that are currently installed\. +. +.TP +\fB\-\-open\-pr\fR +Open a pull request for the new version if none have been opened yet\. +. +.TP +\fB\-\-limit\fR +Limit number of package results returned\. +. +.TP +\fB\-\-start\-with\fR +Letter or word that the list of package results should alphabetically follow\. +. +.SS "\fBbump\-cask\-pr\fR [\fIoptions\fR] \fIcask\fR" +Create a pull request to update \fIcask\fR with a new version\. +. +.P +A best effort to determine the \fISHA\-256\fR will be made if the value is not supplied by the user\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Print what would be done rather than doing it\. +. +.TP +\fB\-\-write\-only\fR +Make the expected file modifications without taking any Git actions\. +. +.TP +\fB\-\-commit\fR +When passed with \fB\-\-write\-only\fR, generate a new commit after writing changes to the cask file\. +. +.TP +\fB\-\-no\-audit\fR +Don\'t run \fBbrew audit\fR before opening the PR\. +. +.TP +\fB\-\-no\-style\fR +Don\'t run \fBbrew style \-\-fix\fR before opening the PR\. +. +.TP +\fB\-\-no\-browse\fR +Print the pull request URL instead of opening in a browser\. +. +.TP +\fB\-\-no\-fork\fR +Don\'t try to fork the repository\. +. +.TP +\fB\-\-version\fR +Specify the new \fIversion\fR for the cask\. +. +.TP +\fB\-\-version\-arm\fR +Specify the new cask \fIversion\fR for the ARM architecture\. +. +.TP +\fB\-\-version\-intel\fR +Specify the new cask \fIversion\fR for the Intel architecture\. +. +.TP +\fB\-\-message\fR +Prepend \fImessage\fR to the default pull request message\. +. +.TP +\fB\-\-url\fR +Specify the \fIURL\fR for the new download\. +. +.TP +\fB\-\-sha256\fR +Specify the \fISHA\-256\fR checksum of the new download\. +. +.TP +\fB\-\-fork\-org\fR +Use the specified GitHub organization for forking\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Ignore duplicate open PRs\. +. +.SS "\fBbump\-formula\-pr\fR [\fIoptions\fR] [\fIformula\fR]" +Create a pull request to update \fIformula\fR with a new URL or a new tag\. +. +.P +If a \fIURL\fR is specified, the \fISHA\-256\fR checksum of the new download should also be specified\. A best effort to determine the \fISHA\-256\fR will be made if not supplied by the user\. +. +.P +If a \fItag\fR is specified, the Git commit \fIrevision\fR corresponding to that tag should also be specified\. A best effort to determine the \fIrevision\fR will be made if the value is not supplied by the user\. +. +.P +If a \fIversion\fR is specified, a best effort to determine the \fIURL\fR and \fISHA\-256\fR or the \fItag\fR and \fIrevision\fR will be made if both values are not supplied by the user\. +. +.P +\fINote:\fR this command cannot be used to transition a formula from a URL\-and\-SHA\-256 style specification into a tag\-and\-revision style specification, nor vice versa\. It must use whichever style specification the formula already uses\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Print what would be done rather than doing it\. +. +.TP +\fB\-\-write\-only\fR +Make the expected file modifications without taking any Git actions\. +. +.TP +\fB\-\-commit\fR +When passed with \fB\-\-write\-only\fR, generate a new commit after writing changes to the formula file\. +. +.TP +\fB\-\-no\-audit\fR +Don\'t run \fBbrew audit\fR before opening the PR\. +. +.TP +\fB\-\-strict\fR +Run \fBbrew audit \-\-strict\fR before opening the PR\. +. +.TP +\fB\-\-online\fR +Run \fBbrew audit \-\-online\fR before opening the PR\. +. +.TP +\fB\-\-no\-browse\fR +Print the pull request URL instead of opening in a browser\. +. +.TP +\fB\-\-no\-fork\fR +Don\'t try to fork the repository\. +. +.TP +\fB\-\-mirror\fR +Use the specified \fIURL\fR as a mirror URL\. If \fIURL\fR is a comma\-separated list of URLs, multiple mirrors will be added\. +. +.TP +\fB\-\-fork\-org\fR +Use the specified GitHub organization for forking\. +. +.TP +\fB\-\-version\fR +Use the specified \fIversion\fR to override the value parsed from the URL or tag\. Note that \fB\-\-version=0\fR can be used to delete an existing version override from a formula if it has become redundant\. +. +.TP +\fB\-\-message\fR +Prepend \fImessage\fR to the default pull request message\. +. +.TP +\fB\-\-url\fR +Specify the \fIURL\fR for the new download\. If a \fIURL\fR is specified, the \fISHA\-256\fR checksum of the new download should also be specified\. +. +.TP +\fB\-\-sha256\fR +Specify the \fISHA\-256\fR checksum of the new download\. +. +.TP +\fB\-\-tag\fR +Specify the new git commit \fItag\fR for the formula\. +. +.TP +\fB\-\-revision\fR +Specify the new commit \fIrevision\fR corresponding to the specified git \fItag\fR or specified \fIversion\fR\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Ignore duplicate open PRs\. Remove all mirrors if \fB\-\-mirror\fR was not specified\. +. +.TP +\fB\-\-python\-package\-name\fR +Use the specified \fIpackage\-name\fR when finding Python resources for \fIformula\fR\. If no package name is specified, it will be inferred from the formula\'s stable URL\. +. +.TP +\fB\-\-python\-extra\-packages\fR +Include these additional Python packages when finding resources\. +. +.TP +\fB\-\-python\-exclude\-packages\fR +Exclude these Python packages when finding resources\. +. +.SS "\fBbump\-revision\fR [\fIoptions\fR] \fIformula\fR [\.\.\.]" +Create a commit to increment the revision of \fIformula\fR\. If no revision is present, "revision 1" will be added\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Print what would be done rather than doing it\. +. +.TP +\fB\-\-remove\-bottle\-block\fR +Remove the bottle block in addition to bumping the revision\. +. +.TP +\fB\-\-write\-only\fR +Make the expected file modifications without taking any Git actions\. +. +.TP +\fB\-\-message\fR +Append \fImessage\fR to the default commit message\. +. +.SS "\fBbump\-unversioned\-casks\fR [\fIoptions\fR] \fIcask\fR|\fItap\fR [\.\.\.]" +Check all casks with unversioned URLs in a given \fItap\fR for updates\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Do everything except caching state and opening pull requests\. +. +.TP +\fB\-\-limit\fR +Maximum runtime in minutes\. +. +.TP +\fB\-\-state\-file\fR +File for caching state\. +. +.SS "\fBcat\fR [\fB\-\-formula\fR] [\fB\-\-cask\fR] \fIformula\fR|\fIcask\fR [\.\.\.]" +Display the source of a \fIformula\fR or \fIcask\fR\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.SS "\fBcommand\fR \fIcommand\fR [\.\.\.]" +Display the path to the file being used when invoking \fBbrew\fR \fIcmd\fR\. +. +.SS "\fBcontributions\fR [\-\-user=\fIemail|username\fR] [\fI\-\-repositories\fR\fB=\fR] [\fI\-\-csv\fR]" +Summarise contributions to Homebrew repositories\. +. +.TP +\fB\-\-repositories\fR +Specify a comma\-separated list of repositories to search\. Supported repositories: \fBbrew\fR, \fBcore\fR, \fBcask\fR, \fBaliases\fR, \fBautoupdate\fR, \fBbundle\fR, \fBcommand\-not\-found\fR, \fBtest\-bot\fR, \fBservices\fR, \fBcask\-fonts\fR and \fBcask\-versions\fR\. Omitting this flag, or specifying \fB\-\-repositories=primary\fR, searches only the main repositories: brew,core,cask\. Specifying \fB\-\-repositories=all\fR, searches all repositories\. +. +.TP +\fB\-\-from\fR +Date (ISO\-8601 format) to start searching contributions\. Omitting this flag searches the last year\. +. +.TP +\fB\-\-to\fR +Date (ISO\-8601 format) to stop searching contributions\. +. +.TP +\fB\-\-user\fR +Specify a comma\-separated list of GitHub usernames or email addresses to find contributions from\. Omitting this flag searches maintainers\. +. +.TP +\fB\-\-csv\fR +Print a CSV of contributions across repositories over the time period\. +. +.SS "\fBcreate\fR [\fIoptions\fR] \fIURL\fR" +Generate a formula or, with \fB\-\-cask\fR, a cask for the downloadable file at \fIURL\fR and open it in the editor\. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you\'ll have to make your own template\. The \fBwget\fR formula serves as a simple example\. For the complete API, see: \fIhttps://rubydoc\.brew\.sh/Formula\fR +. +.TP +\fB\-\-autotools\fR +Create a basic template for an Autotools\-style build\. +. +.TP +\fB\-\-cask\fR +Create a basic template for a cask\. +. +.TP +\fB\-\-cmake\fR +Create a basic template for a CMake\-style build\. +. +.TP +\fB\-\-crystal\fR +Create a basic template for a Crystal build\. +. +.TP +\fB\-\-go\fR +Create a basic template for a Go build\. +. +.TP +\fB\-\-meson\fR +Create a basic template for a Meson\-style build\. +. +.TP +\fB\-\-node\fR +Create a basic template for a Node build\. +. +.TP +\fB\-\-perl\fR +Create a basic template for a Perl build\. +. +.TP +\fB\-\-python\fR +Create a basic template for a Python build\. +. +.TP +\fB\-\-ruby\fR +Create a basic template for a Ruby build\. +. +.TP +\fB\-\-rust\fR +Create a basic template for a Rust build\. +. +.TP +\fB\-\-no\-fetch\fR +Homebrew will not download \fIURL\fR to the cache and will thus not add its SHA\-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage)\. +. +.TP +\fB\-\-HEAD\fR +Indicate that \fIURL\fR points to the package\'s repository rather than a file\. +. +.TP +\fB\-\-set\-name\fR +Explicitly set the \fIname\fR of the new formula or cask\. +. +.TP +\fB\-\-set\-version\fR +Explicitly set the \fIversion\fR of the new formula or cask\. +. +.TP +\fB\-\-set\-license\fR +Explicitly set the \fIlicense\fR of the new formula\. +. +.TP +\fB\-\-tap\fR +Generate the new formula within the given tap, specified as \fIuser\fR\fB/\fR\fIrepo\fR\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Ignore errors for disallowed formula names and names that shadow aliases\. +. +.SS "\fBdispatch\-build\-bottle\fR [\fIoptions\fR] \fIformula\fR [\.\.\.]" +Build bottles for these formulae with GitHub Actions\. +. +.TP +\fB\-\-tap\fR +Target tap repository (default: \fBhomebrew/core\fR)\. +. +.TP +\fB\-\-timeout\fR +Build timeout (in minutes, default: 60)\. +. +.TP +\fB\-\-issue\fR +If specified, post a comment to this issue number if the job fails\. +. +.TP +\fB\-\-macos\fR +macOS version (or comma\-separated list of versions) the bottle should be built for\. +. +.TP +\fB\-\-workflow\fR +Dispatch specified workflow (default: \fBdispatch\-build\-bottle\.yml\fR)\. +. +.TP +\fB\-\-upload\fR +Upload built bottles\. +. +.TP +\fB\-\-linux\fR +Dispatch bottle for Linux (using GitHub runners)\. +. +.TP +\fB\-\-linux\-self\-hosted\fR +Dispatch bottle for Linux (using self\-hosted runner)\. +. +.TP +\fB\-\-linux\-wheezy\fR +Use Debian Wheezy container for building the bottle on Linux\. +. +.SS "\fBedit\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR|\fItap\fR \.\.\.]" +Open a \fIformula\fR, \fIcask\fR or \fItap\fR in the editor set by \fBEDITOR\fR or \fBHOMEBREW_EDITOR\fR, or open the Homebrew repository for editing if no argument is provided\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.TP +\fB\-\-print\-path\fR +Print the file path to be edited, without opening an editor\. +. +.SS "\fBextract\fR [\fB\-\-version=\fR] [\fB\-\-force\fR] \fIformula\fR \fItap\fR" +Look through repository history to find the most recent version of \fIformula\fR and create a copy in \fItap\fR\. Specifically, the command will create the new formula file at \fItap\fR\fB/Formula/\fR\fIformula\fR\fB@\fR\fIversion\fR\fB\.rb\fR\. If the tap is not installed yet, attempt to install/clone the tap before continuing\. To extract a formula from a tap that is not \fBhomebrew/core\fR use its fully\-qualified form of \fIuser\fR\fB/\fR\fIrepo\fR\fB/\fR\fIformula\fR\. +. +.TP +\fB\-\-version\fR +Extract the specified \fIversion\fR of \fIformula\fR instead of the most recent\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Overwrite the destination formula if it already exists\. +. +.SS "\fBformula\fR \fIformula\fR [\.\.\.]" +Display the path where \fIformula\fR is located\. +. +.SS "\fBgenerate\-cask\-api\fR [\fB\-\-dry\-run\fR]" +Generate \fBhomebrew/cask\fR API data files for \fIhttps://formulae\.brew\.sh\fR\. The generated files are written to the current directory\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Generate API data without writing it to files\. +. +.SS "\fBgenerate\-formula\-api\fR [\fB\-\-dry\-run\fR]" +Generate \fBhomebrew/core\fR API data files for \fIhttps://formulae\.brew\.sh\fR\. The generated files are written to the current directory\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Generate API data without writing it to files\. +. +.SS "\fBgenerate\-man\-completions\fR" +Generate Homebrew\'s manpages and shell completions\. +. +.SS "\fBinstall\-bundler\-gems\fR [\fB\-\-groups=\fR] [\fB\-\-add\-groups=\fR]" +Install Homebrew\'s Bundler gems\. +. +.TP +\fB\-\-groups\fR +Installs the specified comma\-separated list of gem groups (default: last used)\. Replaces any previously installed groups\. +. +.TP +\fB\-\-add\-groups\fR +Installs the specified comma\-separated list of gem groups, in addition to those already installed\. +. +.SS "\fBirb\fR [\fB\-\-examples\fR] [\fB\-\-pry\fR]" +Enter the interactive Homebrew Ruby shell\. +. +.TP +\fB\-\-examples\fR +Show several examples\. +. +.TP +\fB\-\-pry\fR +Use Pry instead of IRB\. Implied if \fBHOMEBREW_PRY\fR is set\. +. +.SS "\fBlinkage\fR [\fIoptions\fR] [\fIinstalled_formula\fR \.\.\.]" +Check the library links from the given \fIformula\fR kegs\. If no \fIformula\fR are provided, check all kegs\. Raises an error if run on uninstalled formulae\. +. +.TP +\fB\-\-test\fR +Show only missing libraries and exit with a non\-zero status if any missing libraries are found\. +. +.TP +\fB\-\-strict\fR +Exit with a non\-zero status if any undeclared dependencies with linkage are found\. +. +.TP +\fB\-\-reverse\fR +For every library that a keg references, print its dylib path followed by the binaries that link to it\. +. +.TP +\fB\-\-cached\fR +Print the cached linkage values stored in \fBHOMEBREW_CACHE\fR, set by a previous \fBbrew linkage\fR run\. +. +.SS "\fBlivecheck\fR, \fBlc\fR [\fIoptions\fR] [\fIformula\fR|\fIcask\fR \.\.\.]" +Check for newer versions of formulae and/or casks from upstream\. If no formula or cask argument is passed, the list of formulae and casks to check is taken from \fBHOMEBREW_LIVECHECK_WATCHLIST\fR or \fB~/\.homebrew/livecheck_watchlist\.txt\fR\. +. +.TP +\fB\-\-full\-name\fR +Print formulae and casks with fully\-qualified names\. +. +.TP +\fB\-\-tap\fR +Check formulae and casks within the given tap, specified as \fIuser\fR\fB/\fR\fIrepo\fR\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to check them\. +. +.TP +\fB\-\-installed\fR +Check formulae and casks that are currently installed\. +. +.TP +\fB\-\-newer\-only\fR +Show the latest version only if it\'s newer than the formula/cask\. +. +.TP +\fB\-\-json\fR +Output information in JSON format\. +. +.TP +\fB\-r\fR, \fB\-\-resources\fR +Also check resources for formulae\. +. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Suppress warnings, don\'t print a progress bar for JSON output\. +. +.TP +\fB\-\-formula\fR +Only check formulae\. +. +.TP +\fB\-\-cask\fR +Only check casks\. +. +.SS "\fBpr\-automerge\fR [\fIoptions\fR]" +Find pull requests that can be automatically merged using \fBbrew pr\-publish\fR\. +. +.TP +\fB\-\-tap\fR +Target tap repository (default: \fBhomebrew/core\fR)\. +. +.TP +\fB\-\-workflow\fR +Workflow file to use with \fBbrew pr\-publish\fR\. +. +.TP +\fB\-\-with\-label\fR +Pull requests must have this label\. +. +.TP +\fB\-\-without\-labels\fR +Pull requests must not have these labels (default: \fBdo not merge\fR, \fBnew formula\fR, \fBautomerge\-skip\fR, \fBpre\-release\fR, \fBCI\-published\-bottle\-commits\fR)\. +. +.TP +\fB\-\-without\-approval\fR +Pull requests do not require approval to be merged\. +. +.TP +\fB\-\-publish\fR +Run \fBbrew pr\-publish\fR on matching pull requests\. +. +.TP +\fB\-\-autosquash\fR +Instruct \fBbrew pr\-publish\fR to automatically reformat and reword commits in the pull request to the preferred format\. +. +.TP +\fB\-\-ignore\-failures\fR +Include pull requests that have failing status checks\. +. +.SS "\fBpr\-publish\fR [\fIoptions\fR] \fIpull_request\fR [\.\.\.]" +Publish bottles for a pull request with GitHub Actions\. Requires write access to the repository\. +. +.TP +\fB\-\-autosquash\fR +If supported on the target tap, automatically reformat and reword commits to our preferred format\. +. +.TP +\fB\-\-large\-runner\fR +Run the upload job on a large runner\. +. +.TP +\fB\-\-branch\fR +Branch to use the workflow from (default: \fBmaster\fR)\. +. +.TP +\fB\-\-message\fR +Message to include when autosquashing revision bumps, deletions, and rebuilds\. +. +.TP +\fB\-\-tap\fR +Target tap repository (default: \fBhomebrew/core\fR)\. +. +.TP +\fB\-\-workflow\fR +Target workflow filename (default: \fBpublish\-commit\-bottles\.yml\fR)\. +. +.SS "\fBpr\-pull\fR [\fIoptions\fR] \fIpull_request\fR [\.\.\.]" +Download and publish bottles, and apply the bottle commit from a pull request with artifacts generated by GitHub Actions\. Requires write access to the repository\. +. +.TP +\fB\-\-no\-upload\fR +Download the bottles but don\'t upload them\. +. +.TP +\fB\-\-no\-commit\fR +Do not generate a new commit before uploading\. +. +.TP +\fB\-\-no\-cherry\-pick\fR +Do not cherry\-pick commits from the pull request branch\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Print what would be done rather than doing it\. +. +.TP +\fB\-\-clean\fR +Do not amend the commits from pull requests\. +. +.TP +\fB\-\-keep\-old\fR +If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL\. +. +.TP +\fB\-\-autosquash\fR +Automatically reformat and reword commits in the pull request to our preferred format\. +. +.TP +\fB\-\-branch\-okay\fR +Do not warn if pulling to a branch besides the repository default (useful for testing)\. +. +.TP +\fB\-\-resolve\fR +When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting\. +. +.TP +\fB\-\-warn\-on\-upload\-failure\fR +Warn instead of raising an error if the bottle upload fails\. Useful for repairing bottle uploads that previously failed\. +. +.TP +\fB\-\-retain\-bottle\-dir\fR +Does not clean up the tmp directory for the bottle so it can be used later\. +. +.TP +\fB\-\-committer\fR +Specify a committer name and email in \fBgit\fR\'s standard author format\. +. +.TP +\fB\-\-message\fR +Message to include when autosquashing revision bumps, deletions, and rebuilds\. +. +.TP +\fB\-\-artifact\fR +Download artifacts with the specified name (default: \fBbottles\fR)\. +. +.TP +\fB\-\-tap\fR +Target tap repository (default: \fBhomebrew/core\fR)\. +. +.TP +\fB\-\-root\-url\fR +Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\. +. +.TP +\fB\-\-root\-url\-using\fR +Use the specified download strategy class for downloading the bottle\'s URL instead of Homebrew\'s default\. +. +.TP +\fB\-\-workflows\fR +Retrieve artifacts from the specified workflow (default: \fBtests\.yml\fR)\. Can be a comma\-separated list to include multiple workflows\. +. +.TP +\fB\-\-ignore\-missing\-artifacts\fR +Comma\-separated list of workflows which can be ignored if they have not been run\. +. +.SS "\fBpr\-upload\fR [\fIoptions\fR]" +Apply the bottle commit and publish bottles to a host\. +. +.TP +\fB\-\-keep\-old\fR +If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL\. +. +.TP +\fB\-n\fR, \fB\-\-dry\-run\fR +Print what would be done rather than doing it\. +. +.TP +\fB\-\-no\-commit\fR +Do not generate a new commit before uploading\. +. +.TP +\fB\-\-warn\-on\-upload\-failure\fR +Warn instead of raising an error if the bottle upload fails\. Useful for repairing bottle uploads that previously failed\. +. +.TP +\fB\-\-upload\-only\fR +Skip running \fBbrew bottle\fR before uploading\. +. +.TP +\fB\-\-committer\fR +Specify a committer name and email in \fBgit\fR\'s standard author format\. +. +.TP +\fB\-\-root\-url\fR +Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\. +. +.TP +\fB\-\-root\-url\-using\fR +Use the specified download strategy class for downloading the bottle\'s URL instead of Homebrew\'s default\. +. +.SS "\fBprof\fR [\fB\-\-stackprof\fR] \fIcommand\fR [\.\.\.]" +Run Homebrew with a Ruby profiler\. For example, \fBbrew prof readall\fR\. +. +.TP +\fB\-\-stackprof\fR +Use \fBstackprof\fR instead of \fBruby\-prof\fR (the default)\. +. +.SS "\fBrelease\fR [\fB\-\-major\fR] [\fB\-\-minor\fR]" +Create a new draft Homebrew/brew release with the appropriate version number and release notes\. +. +.P +By default, \fBbrew release\fR will bump the patch version number\. Pass \fB\-\-major\fR or \fB\-\-minor\fR to bump the major or minor version numbers, respectively\. The command will fail if the previous major or minor release was made less than one month ago\. +. +.P +\fINote:\fR Requires write access to the Homebrew/brew repository\. +. +.TP +\fB\-\-major\fR +Create a major release\. +. +.TP +\fB\-\-minor\fR +Create a minor release\. +. +.SS "\fBrubocop\fR" +Installs, configures and runs Homebrew\'s \fBrubocop\fR\. +. +.SS "\fBruby\fR [\fIoptions\fR] (\fB\-e\fR \fItext\fR|\fIfile\fR)" +Run a Ruby instance with Homebrew\'s libraries loaded\. For example, \fBbrew ruby \-e "puts :gcc\.f\.deps"\fR or \fBbrew ruby script\.rb\fR\. +. +.P +Run e\.g\. \fBbrew ruby \-\- \-\-version\fR to pass arbitrary arguments to \fBruby\fR\. +. +.TP +\fB\-r\fR +Load a library using \fBrequire\fR\. +. +.TP +\fB\-e\fR +Execute the given text string as a script\. +. +.SS "\fBsh\fR [\fB\-\-env=\fR] [\fB\-\-cmd=\fR] [\fIfile\fR]" +Enter an interactive shell for Homebrew\'s build environment\. Use years\-battle\-hardened build logic to help your \fB\./configure && make && make install\fR and even your \fBgem install\fR succeed\. Especially handy if you run Homebrew in an Xcode\-only configuration since it adds tools like \fBmake\fR to your \fBPATH\fR which build systems would not find otherwise\. +. +.TP +\fB\-\-env\fR +Use the standard \fBPATH\fR instead of superenv\'s when \fBstd\fR is passed\. +. +.TP +\fB\-c\fR, \fB\-\-cmd\fR +Execute commands in a non\-interactive shell\. +. +.SS "\fBstyle\fR [\fIoptions\fR] [\fIfile\fR|\fItap\fR|\fIformula\fR|\fIcask\fR \.\.\.]" +Check formulae or files for conformance to Homebrew style guidelines\. +. +.P +Lists of \fIfile\fR, \fItap\fR and \fIformula\fR may not be combined\. If none are provided, \fBstyle\fR will run style checks on the whole Homebrew library, including core code and all formulae\. +. +.TP +\fB\-\-fix\fR +Fix style violations automatically using RuboCop\'s auto\-correct feature\. +. +.TP +\fB\-\-reset\-cache\fR +Reset the RuboCop cache\. +. +.TP +\fB\-\-formula\fR +Treat all named arguments as formulae\. +. +.TP +\fB\-\-cask\fR +Treat all named arguments as casks\. +. +.TP +\fB\-\-only\-cops\fR +Specify a comma\-separated \fIcops\fR list to check for violations of only the listed RuboCop cops\. +. +.TP +\fB\-\-except\-cops\fR +Specify a comma\-separated \fIcops\fR list to skip checking for violations of the listed RuboCop cops\. +. +.SS "\fBtap\-new\fR [\fIoptions\fR] \fIuser\fR\fB/\fR\fIrepo\fR" +Generate the template files for a new tap\. +. +.TP +\fB\-\-no\-git\fR +Don\'t initialize a Git repository for the tap\. +. +.TP +\fB\-\-pull\-label\fR +Label name for pull requests ready to be pulled (default: \fBpr\-pull\fR)\. +. +.TP +\fB\-\-branch\fR +Initialize Git repository and setup GitHub Actions workflows with the specified branch name (default: \fBmain\fR)\. +. +.TP +\fB\-\-github\-packages\fR +Upload bottles to GitHub Packages\. +. +.SS "\fBtest\fR [\fIoptions\fR] \fIinstalled_formula\fR [\.\.\.]" +Run the test method provided by an installed formula\. There is no standard output or return code, but generally it should notify the user if something is wrong with the installed formula\. +. +.P +\fIExample:\fR \fBbrew install jruby && brew test jruby\fR +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Test formulae even if they are unlinked\. +. +.TP +\fB\-\-HEAD\fR +Test the HEAD version of a formula\. +. +.TP +\fB\-\-keep\-tmp\fR +Retain the temporary files created for the test\. +. +.TP +\fB\-\-retry\fR +Retry if a testing fails\. +. +.SS "\fBtests\fR [\fIoptions\fR]" +Run Homebrew\'s unit and integration tests\. +. +.TP +\fB\-\-coverage\fR +Generate code coverage reports\. +. +.TP +\fB\-\-generic\fR +Run only OS\-agnostic tests\. +. +.TP +\fB\-\-online\fR +Include tests that use the GitHub API and tests that use any of the taps for official external commands\. +. +.TP +\fB\-\-byebug\fR +Enable debugging using byebug\. +. +.TP +\fB\-\-changed\fR +Only runs tests on files that were changed from the master branch\. +. +.TP +\fB\-\-fail\-fast\fR +Exit early on the first failing test\. +. +.TP +\fB\-\-only\fR +Run only \fItest_script\fR\fB_spec\.rb\fR\. Appending \fB:\fR\fIline_number\fR will start at a specific line\. +. +.TP +\fB\-\-profile\fR +Run the test suite serially to find the \fIn\fR slowest tests\. +. +.TP +\fB\-\-seed\fR +Randomise tests with the specified \fIvalue\fR instead of a random seed\. +. +.SS "\fBtypecheck\fR, \fBtc\fR [\fIoptions\fR]" +Check for typechecking errors using Sorbet\. +. +.TP +\fB\-\-fix\fR +Automatically fix type errors\. +. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Silence all non\-critical errors\. +. +.TP +\fB\-\-update\fR +Update RBI files\. +. +.TP +\fB\-\-update\-all\fR +Update all RBI files rather than just updated gems\. +. +.TP +\fB\-\-suggest\-typed\fR +Try upgrading \fBtyped\fR sigils\. +. +.TP +\fB\-\-dir\fR +Typecheck all files in a specific directory\. +. +.TP +\fB\-\-file\fR +Typecheck a single file\. +. +.TP +\fB\-\-ignore\fR +Ignores input files that contain the given string in their paths (relative to the input path passed to Sorbet)\. +. +.SS "\fBunbottled\fR [\fIoptions\fR] [\fIformula\fR \.\.\.]" +Show the unbottled dependents of formulae\. +. +.TP +\fB\-\-tag\fR +Use the specified bottle tag (e\.g\. \fBbig_sur\fR) instead of the current OS\. +. +.TP +\fB\-\-dependents\fR +Skip getting analytics data and sort by number of dependents instead\. +. +.TP +\fB\-\-total\fR +Print the number of unbottled and total formulae\. +. +.TP +\fB\-\-lost\fR +Print the \fBhomebrew/core\fR commits where bottles were lost in the last week\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all available formulae and casks, whether installed or not, to check them\. Implied if \fBHOMEBREW_EVAL_ALL\fR is set\. +. +.SS "\fBunpack\fR [\fIoptions\fR] \fIformula\fR [\.\.\.]" +Unpack the source files for \fIformula\fR into subdirectories of the current working directory\. +. +.TP +\fB\-\-destdir\fR +Create subdirectories in the directory named by \fIpath\fR instead\. +. +.TP +\fB\-\-patch\fR +Patches for \fIformula\fR will be applied to the unpacked source\. +. +.TP +\fB\-g\fR, \fB\-\-git\fR +Initialise a Git repository in the unpacked source\. This is useful for creating patches for the software\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +Overwrite the destination directory if it already exists\. +. +.SS "\fBupdate\-license\-data\fR" +Update SPDX license data in the Homebrew repository\. +. +.SS "\fBupdate\-maintainers\fR" +Update the list of maintainers in the \fBHomebrew/brew\fR README\. +. +.SS "\fBupdate\-python\-resources\fR [\fIoptions\fR] \fIformula\fR [\.\.\.]" +Update versions for PyPI resource blocks in \fIformula\fR\. +. +.TP +\fB\-p\fR, \fB\-\-print\-only\fR +Print the updated resource blocks instead of changing \fIformula\fR\. +. +.TP +\fB\-s\fR, \fB\-\-silent\fR +Suppress any output\. +. +.TP +\fB\-\-ignore\-non\-pypi\-packages\fR +Don\'t fail if \fIformula\fR is not a PyPI package\. +. +.TP +\fB\-\-version\fR +Use the specified \fIversion\fR when finding resources for \fIformula\fR\. If no version is specified, the current version for \fIformula\fR will be used\. +. +.TP +\fB\-\-package\-name\fR +Use the specified \fIpackage\-name\fR when finding resources for \fIformula\fR\. If no package name is specified, it will be inferred from the formula\'s stable URL\. +. +.TP +\fB\-\-extra\-packages\fR +Include these additional packages when finding resources\. +. +.TP +\fB\-\-exclude\-packages\fR +Exclude these packages when finding resources\. +. +.SS "\fBupdate\-sponsors\fR" +Update the list of GitHub Sponsors in the \fBHomebrew/brew\fR README\. +. +.SS "\fBupdate\-test\fR [\fIoptions\fR]" +Run a test of \fBbrew update\fR with a new repository clone\. If no options are passed, use \fBorigin/master\fR as the start commit\. +. +.TP +\fB\-\-to\-tag\fR +Set \fBHOMEBREW_UPDATE_TO_TAG\fR to test updating between tags\. +. +.TP +\fB\-\-keep\-tmp\fR +Retain the temporary directory containing the new repository clone\. +. +.TP +\fB\-\-commit\fR +Use the specified \fIcommit\fR as the start commit\. +. +.TP +\fB\-\-before\fR +Use the commit at the specified \fIdate\fR as the start commit\. +. +.SS "\fBvendor\-gems\fR [\fB\-\-update=\fR] [\fB\-\-no\-commit\fR]" +Install and commit Homebrew\'s vendored gems\. +. +.TP +\fB\-\-update\fR +Update the specified list of vendored gems to the latest version\. +. +.TP +\fB\-\-no\-commit\fR +Do not generate a new commit upon completion\. +. +.SH "GLOBAL CASK OPTIONS" +These options are applicable to the \fBinstall\fR, \fBreinstall\fR, and \fBupgrade\fR subcommands with the \fB\-\-cask\fR switch\. +. +.TP +\fB\-\-appdir\fR +Target location for Applications (default: \fB/Applications\fR)\. +. +.TP +\fB\-\-keyboard\-layoutdir\fR +Target location for Keyboard Layouts (default: \fB/Library/Keyboard Layouts\fR)\. +. +.TP +\fB\-\-colorpickerdir\fR +Target location for Color Pickers (default: \fB~/Library/ColorPickers\fR)\. +. +.TP +\fB\-\-prefpanedir\fR +Target location for Preference Panes (default: \fB~/Library/PreferencePanes\fR)\. +. +.TP +\fB\-\-qlplugindir\fR +Target location for Quick Look Plugins (default: \fB~/Library/QuickLook\fR)\. +. +.TP +\fB\-\-mdimporterdir\fR +Target location for Spotlight Plugins (default: \fB~/Library/Spotlight\fR)\. +. +.TP +\fB\-\-dictionarydir\fR +Target location for Dictionaries (default: \fB~/Library/Dictionaries\fR)\. +. +.TP +\fB\-\-fontdir\fR +Target location for Fonts (default: \fB~/Library/Fonts\fR)\. +. +.TP +\fB\-\-servicedir\fR +Target location for Services (default: \fB~/Library/Services\fR)\. +. +.TP +\fB\-\-input\-methoddir\fR +Target location for Input Methods (default: \fB~/Library/Input Methods\fR)\. +. +.TP +\fB\-\-internet\-plugindir\fR +Target location for Internet Plugins (default: \fB~/Library/Internet Plug\-Ins\fR)\. +. +.TP +\fB\-\-audio\-unit\-plugindir\fR +Target location for Audio Unit Plugins (default: \fB~/Library/Audio/Plug\-Ins/Components\fR)\. +. +.TP +\fB\-\-vst\-plugindir\fR +Target location for VST Plugins (default: \fB~/Library/Audio/Plug\-Ins/VST\fR)\. +. +.TP +\fB\-\-vst3\-plugindir\fR +Target location for VST3 Plugins (default: \fB~/Library/Audio/Plug\-Ins/VST3\fR)\. +. +.TP +\fB\-\-screen\-saverdir\fR +Target location for Screen Savers (default: \fB~/Library/Screen Savers\fR)\. +. +.TP +\fB\-\-language\fR +Comma\-separated list of language codes to prefer for cask installation\. The first matching language is used, otherwise it reverts to the cask\'s default language\. The default value is the language of your system\. +. +.SH "GLOBAL OPTIONS" +These options are applicable across multiple subcommands\. +. +.TP +\fB\-d\fR, \fB\-\-debug\fR +Display any debugging information\. +. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Make some output more quiet\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Make some output more verbose\. +. +.TP +\fB\-h\fR, \fB\-\-help\fR +Show this message\. +. +.SH "OFFICIAL EXTERNAL COMMANDS" +. +.SS "\fBalias\fR [\fIalias\fR \.\.\. | \fIalias\fR=\fIcommand\fR]" +Show existing aliases\. If no aliases are given, print the whole list\. +. +.TP +\fB\-\-edit\fR +Edit aliases in a text editor\. Either one or all aliases may be opened at once\. If the given alias doesn\'t exist it\'ll be pre\-populated with a template\. +. +.SS "\fBautoupdate\fR \fIsubcommand\fR [\fIinterval\fR] [\fIoptions\fR]" +An easy, convenient way to automatically update Homebrew\. +. +.P +This script will run \fBbrew update\fR in the background once every 24 hours (by default) until explicitly told to stop, utilising \fBlaunchd\fR\. +. +.P +\fBbrew autoupdate start\fR [\fI\fBinterval\fR\fR] [\fI\fBoptions\fR\fR] + Start autoupdating either once every \fBinterval\fR hours or once every 24 hours\. Please note the interval has to be passed in seconds, so 12 hours would be \fBbrew autoupdate start 43200\fR\. If you want to start the autoupdate immediately and on system boot, pass \fB\-\-immediate\fR\. Pass \fB\-\-upgrade\fR or \fB\-\-cleanup\fR to automatically run \fBbrew upgrade\fR and/or \fBbrew cleanup\fR respectively\. Pass \fB\-\-enable\-notification\fR to send a notification when the autoupdate process has finished successfully\. +. +.P +\fBbrew autoupdate stop\fR + Stop autoupdating, but retain plist and logs\. +. +.P +\fBbrew autoupdate delete\fR + Cancel the autoupdate, delete the plist and logs\. +. +.P +\fBbrew autoupdate status\fR + Prints the current status of this tool\. +. +.P +\fBbrew autoupdate version\fR + Output this tool\'s current version, and a short changelog\. +. +.TP +\fB\-\-upgrade\fR +Automatically upgrade your installed formulae\. If the Caskroom exists locally Casks will be upgraded as well\. Must be passed with \fBstart\fR\. +. +.TP +\fB\-\-greedy\fR +Upgrade casks with \-\-greedy (include auto\-updating casks)\. Must be passed with \fBstart\fR\. +. +.TP +\fB\-\-cleanup\fR +Automatically clean brew\'s cache and logs\. Must be passed with \fBstart\fR\. +. +.TP +\fB\-\-enable\-notification\fR +Send a notification when the autoupdate process has finished successfully, if \fBterminal\-notifier\fR is installed and found\. Must be passed with \fBstart\fR\. Note: notifications are enabled by default on macOS Catalina and newer\. +. +.TP +\fB\-\-immediate\fR +Starts the autoupdate command immediately and on system boot, instead of waiting for one interval (24 hours by default) to pass first\. Must be passed with \fBstart\fR\. +. +.TP +\fB\-\-sudo\fR +If a Cask requires sudo, autoupdate will open a GUI to ask for the password\. Requires https://formulae\.brew\.sh/formula/pinentry\-mac to be installed\. +. +.SS "\fBbundle\fR [\fIsubcommand\fR]" +Bundler for non\-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store and Whalebrew\. +. +.P +\fBbrew bundle\fR [\fBinstall\fR] + Install and upgrade (by default) all dependencies from the \fBBrewfile\fR\. +. +.P +You can specify the \fBBrewfile\fR location using \fB\-\-file\fR or by setting the \fBHOMEBREW_BUNDLE_FILE\fR environment variable\. +. +.P +You can skip the installation of dependencies by adding space\-separated values to one or more of the following environment variables: \fBHOMEBREW_BUNDLE_BREW_SKIP\fR, \fBHOMEBREW_BUNDLE_CASK_SKIP\fR, \fBHOMEBREW_BUNDLE_MAS_SKIP\fR, \fBHOMEBREW_BUNDLE_WHALEBREW_SKIP\fR, \fBHOMEBREW_BUNDLE_TAP_SKIP\fR\. +. +.P +\fBbrew bundle\fR will output a \fBBrewfile\.lock\.json\fR in the same directory as the \fBBrewfile\fR if all dependencies are installed successfully\. This contains dependency and system status information which can be useful in debugging \fBbrew bundle\fR failures and replicating a "last known good build" state\. You can opt\-out of this behaviour by setting the \fBHOMEBREW_BUNDLE_NO_LOCK\fR environment variable or passing the \fB\-\-no\-lock\fR option\. You may wish to check this file into the same version control system as your \fBBrewfile\fR (or ensure your version control system ignores it if you\'d prefer to rely on debugging information from a local machine)\. +. +.P +\fBbrew bundle dump\fR + Write all installed casks/formulae/images/taps into a \fBBrewfile\fR in the current directory\. +. +.P +\fBbrew bundle cleanup\fR + Uninstall all dependencies not listed from the \fBBrewfile\fR\. +. +.P +This workflow is useful for maintainers or testers who regularly install lots of formulae\. +. +.P +\fBbrew bundle check\fR + Check if all dependencies are installed from the \fBBrewfile\fR\. +. +.P +This provides a successful exit code if everything is up\-to\-date, making it useful for scripting\. +. +.P +\fBbrew bundle list\fR + List all dependencies present in the \fBBrewfile\fR\. +. +.P +By default, only Homebrew dependencies are listed\. +. +.P +\fBbrew bundle exec\fR \fIcommand\fR + Run an external command in an isolated build environment based on the \fBBrewfile\fR dependencies\. +. +.P +This sanitized build environment ignores unrequested dependencies, which makes sure that things you didn\'t specify in your \fBBrewfile\fR won\'t get picked up by commands like \fBbundle install\fR, \fBnpm install\fR, etc\. It will also add compiler flags which will help find keg\-only dependencies like \fBopenssl\fR, \fBicu4c\fR, etc\. +. +.TP +\fB\-\-file\fR +Read the \fBBrewfile\fR from this location\. Use \fB\-\-file=\-\fR to pipe to stdin/stdout\. +. +.TP +\fB\-\-global\fR +Read the \fBBrewfile\fR from \fB~/\.Brewfile\fR or the \fBHOMEBREW_BUNDLE_FILE_GLOBAL\fR environment variable, if set\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +\fBinstall\fR prints output from commands as they are run\. \fBcheck\fR lists all missing dependencies\. +. +.TP +\fB\-\-no\-upgrade\fR +\fBinstall\fR won\'t run \fBbrew upgrade\fR on outdated dependencies\. Note they may still be upgraded by \fBbrew install\fR if needed\. +. +.TP +\fB\-f\fR, \fB\-\-force\fR +\fBinstall\fR runs with \fB\-\-force\fR/\fB\-\-overwrite\fR\. \fBdump\fR overwrites an existing \fBBrewfile\fR\. \fBcleanup\fR actually performs its cleanup operations\. +. +.TP +\fB\-\-cleanup\fR +\fBinstall\fR performs cleanup operation, same as running \fBcleanup \-\-force\fR\. This is enabled by default if HOMEBREW_BUNDLE_INSTALL_CLEANUP is set and \fB\-\-global\fR is passed\. +. +.TP +\fB\-\-no\-lock\fR +\fBinstall\fR won\'t output a \fBBrewfile\.lock\.json\fR\. +. +.TP +\fB\-\-all\fR +\fBlist\fR all dependencies\. +. +.TP +\fB\-\-formula\fR +\fBlist\fR Homebrew dependencies\. +. +.TP +\fB\-\-cask\fR +\fBlist\fR Homebrew Cask dependencies\. +. +.TP +\fB\-\-tap\fR +\fBlist\fR tap dependencies\. +. +.TP +\fB\-\-mas\fR +\fBlist\fR Mac App Store dependencies\. +. +.TP +\fB\-\-whalebrew\fR +\fBlist\fR Whalebrew dependencies\. +. +.TP +\fB\-\-vscode\fR +\fBlist\fR VSCode extensions\. +. +.TP +\fB\-\-describe\fR +\fBdump\fR adds a description comment above each line, unless the dependency does not have a description\. This is enabled by default if HOMEBREW_BUNDLE_DUMP_DESCRIBE is set\. +. +.TP +\fB\-\-no\-restart\fR +\fBdump\fR does not add \fBrestart_service\fR to formula lines\. +. +.TP +\fB\-\-zap\fR +\fBcleanup\fR casks using the \fBzap\fR command instead of \fBuninstall\fR\. +. +.SS "\fBcommand\-not\-found\-init\fR" +Print instructions for setting up the command\-not\-found hook for your shell\. If the output is not to a tty, print the appropriate handler script for your shell\. +. +.SS "\fBservices\fR [\fIsubcommand\fR]" +Manage background services with macOS\' \fBlaunchctl\fR(1) daemon manager or Linux\'s \fBsystemctl\fR(1) service manager\. +. +.P +If \fBsudo\fR is passed, operate on \fB/Library/LaunchDaemons\fR/\fB/usr/lib/systemd/system\fR (started at boot)\. Otherwise, operate on \fB~/Library/LaunchAgents\fR/\fB~/\.config/systemd/user\fR (started at login)\. +. +.P +[\fBsudo\fR] \fBbrew services\fR [\fBlist\fR] (\fB\-\-json\fR) (\fB\-\-debug\fR) + List information about all managed services for the current user (or root)\. Provides more output from Homebrew and \fBlaunchctl\fR(1) or \fBsystemctl\fR(1) if run with \fB\-\-debug\fR\. +. +.P +[\fBsudo\fR] \fBbrew services info\fR (\fIformula\fR|\fB\-\-all\fR|\fB\-\-json\fR) + List all managed services for the current user (or root)\. +. +.P +[\fBsudo\fR] \fBbrew services run\fR (\fIformula\fR|\fB\-\-all\fR) + Run the service \fIformula\fR without registering to launch at login (or boot)\. +. +.P +[\fBsudo\fR] \fBbrew services start\fR (\fIformula\fR|\fB\-\-all\fR|\fB\-\-file=\fR) + Start the service \fIformula\fR immediately and register it to launch at login (or boot)\. +. +.P +[\fBsudo\fR] \fBbrew services stop\fR (\fIformula\fR|\fB\-\-all\fR) + Stop the service \fIformula\fR immediately and unregister it from launching at login (or boot)\. +. +.P +[\fBsudo\fR] \fBbrew services kill\fR (\fIformula\fR|\fB\-\-all\fR) + Stop the service \fIformula\fR immediately but keep it registered to launch at login (or boot)\. +. +.P +[\fBsudo\fR] \fBbrew services restart\fR (\fIformula\fR|\fB\-\-all\fR) + Stop (if necessary) and start the service \fIformula\fR immediately and register it to launch at login (or boot)\. +. +.P +[\fBsudo\fR] \fBbrew services cleanup\fR + Remove all unused services\. +. +.TP +\fB\-\-file\fR +Use the service file from this location to \fBstart\fR the service\. +. +.TP +\fB\-\-sudo\-service\-user\fR +When run as root on macOS, run the service(s) as this user\. +. +.TP +\fB\-\-all\fR +Run \fIsubcommand\fR on all services\. +. +.TP +\fB\-\-json\fR +Output as JSON\. +. +.TP +\fB\-\-no\-wait\fR +Don\'t wait for \fBstop\fR to finish stopping the service\. +. +.SS "\fBtest\-bot\fR [\fIoptions\fR] [\fIformula\fR]" +Tests the full lifecycle of a Homebrew change to a tap (Git repository)\. For example, for a GitHub Actions pull request that changes a formula \fBbrew test\-bot\fR will ensure the system is cleaned and set up to test the formula, install the formula, run various tests and checks on it, bottle (package) the binaries and test formulae that depend on it to ensure they aren\'t broken by these changes\. +. +.P +Only supports GitHub Actions as a CI provider\. This is because Homebrew uses GitHub Actions and it\'s freely available for public and private use with macOS and Linux workers\. +. +.TP +\fB\-\-dry\-run\fR +Print what would be done rather than doing it\. +. +.TP +\fB\-\-cleanup\fR +Clean all state from the Homebrew directory\. Use with care! +. +.TP +\fB\-\-skip\-setup\fR +Don\'t check if the local system is set up correctly\. +. +.TP +\fB\-\-build\-from\-source\fR +Build from source rather than building bottles\. +. +.TP +\fB\-\-build\-dependents\-from\-source\fR +Build dependents from source rather than testing bottles\. +. +.TP +\fB\-\-junit\fR +generate a JUnit XML test results file\. +. +.TP +\fB\-\-keep\-old\fR +Run \fBbrew bottle \-\-keep\-old\fR to build new bottles for a single platform\. +. +.TP +\fB\-\-skip\-relocation\fR +Run \fBbrew bottle \-\-skip\-relocation\fR to build new bottles that don\'t require relocation\. +. +.TP +\fB\-\-only\-json\-tab\fR +Run \fBbrew bottle \-\-only\-json\-tab\fR to build new bottles that do not contain a tab\. +. +.TP +\fB\-\-local\fR +Ask Homebrew to write verbose logs under \fB\./logs/\fR and set \fB$HOME\fR to \fB\./home/\fR +. +.TP +\fB\-\-tap\fR +Use the Git repository of the given tap\. Defaults to the core tap for syntax checking\. +. +.TP +\fB\-\-fail\-fast\fR +Immediately exit on a failing step\. +. +.TP +\fB\-v\fR, \fB\-\-verbose\fR +Print test step output in real time\. Has the side effect of passing output as raw bytes instead of re\-encoding in UTF\-8\. +. +.TP +\fB\-\-test\-default\-formula\fR +Use a default testing formula when not building a tap and no other formulae are specified\. +. +.TP +\fB\-\-root\-url\fR +Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\. +. +.TP +\fB\-\-git\-name\fR +Set the Git author/committer names to the given name\. +. +.TP +\fB\-\-git\-email\fR +Set the Git author/committer email to the given email\. +. +.TP +\fB\-\-publish\fR +Publish the uploaded bottles\. +. +.TP +\fB\-\-skip\-online\-checks\fR +Don\'t pass \fB\-\-online\fR to \fBbrew audit\fR and skip \fBbrew livecheck\fR\. +. +.TP +\fB\-\-skip\-dependents\fR +Don\'t test any dependents\. +. +.TP +\fB\-\-skip\-livecheck\fR +Don\'t test livecheck\. +. +.TP +\fB\-\-skip\-recursive\-dependents\fR +Only test the direct dependents\. +. +.TP +\fB\-\-skip\-checksum\-only\-audit\fR +Don\'t audit checksum\-only changes\. +. +.TP +\fB\-\-skip\-stable\-version\-audit\fR +Don\'t audit the stable version\. +. +.TP +\fB\-\-skip\-revision\-audit\fR +Don\'t audit the revision\. +. +.TP +\fB\-\-only\-cleanup\-before\fR +Only run the pre\-cleanup step\. Needs \fB\-\-cleanup\fR\. +. +.TP +\fB\-\-only\-setup\fR +Only run the local system setup check step\. +. +.TP +\fB\-\-only\-tap\-syntax\fR +Only run the tap syntax check step\. +. +.TP +\fB\-\-only\-formulae\fR +Only run the formulae steps\. +. +.TP +\fB\-\-only\-formulae\-detect\fR +Only run the formulae detection steps\. +. +.TP +\fB\-\-only\-formulae\-dependents\fR +Only run the formulae dependents steps\. +. +.TP +\fB\-\-only\-bottles\-fetch\fR +Only run the bottles fetch steps\. This optional post\-upload test checks that all the bottles were uploaded correctly\. It is not run unless requested and only needs to be run on a single machine\. The bottle commit to be tested must be on the tested branch\. +. +.TP +\fB\-\-only\-cleanup\-after\fR +Only run the post\-cleanup step\. Needs \fB\-\-cleanup\fR\. +. +.TP +\fB\-\-testing\-formulae\fR +Use these testing formulae rather than running the formulae detection steps\. +. +.TP +\fB\-\-added\-formulae\fR +Use these added formulae rather than running the formulae detection steps\. +. +.TP +\fB\-\-deleted\-formulae\fR +Use these deleted formulae rather than running the formulae detection steps\. +. +.TP +\fB\-\-skipped\-or\-failed\-formulae\fR +Use these skipped or failed formulae from formulae steps for a formulae dependents step\. +. +.SS "\fBunalias\fR \fIalias\fR [\.\.\.]" +Remove aliases\. +. +.SS "\fBwhich\-formula\fR [\fB\-\-explain\fR] \fIcommand\fR [\.\.\.]" +Prints the formula(e) which provides the given command\. +. +.TP +\fB\-\-explain\fR +Output explanation of how to get \'cmd\' by installing one of the providing formulae\. +. +.SS "\fBwhich\-update\fR [\fIoptions\fR] [\fIdatabase\fR]" +Database update for \fBbrew which\-formula\fR +. +.TP +\fB\-\-stats\fR +Print statistics about the database contents (number of commands and formulae, list of missing formulae)\. +. +.TP +\fB\-\-commit\fR +Commit the changes using \fBgit\fR\. +. +.TP +\fB\-\-update\-existing\fR +Update database entries with outdated formula versions\. +. +.TP +\fB\-\-install\-missing\fR +Install and update formulae that are missing from the database and don\'t have bottles\. +. +.TP +\fB\-\-eval\-all\fR +Evaluate all installed taps, rather than just the core tap\. +. +.TP +\fB\-\-max\-downloads\fR +Specify a maximum number of formulae to download and update\. +. +.SH "CUSTOM EXTERNAL COMMANDS" +Homebrew, like \fBgit\fR(1), supports external commands\. These are executable scripts that reside somewhere in the \fBPATH\fR, named \fBbrew\-\fR\fIcmdname\fR or \fBbrew\-\fR\fIcmdname\fR\fB\.rb\fR, which can be invoked like \fBbrew\fR \fIcmdname\fR\. This allows you to create your own commands without modifying Homebrew\'s internals\. +. +.P +Instructions for creating your own commands can be found in the docs: \fIhttps://docs\.brew\.sh/External\-Commands\fR +. +.SH "SPECIFYING FORMULAE" +Many Homebrew commands accept one or more \fIformula\fR arguments\. These arguments can take several different forms: +. +.TP +The name of a formula +e\.g\. \fBgit\fR, \fBnode\fR, \fBwget\fR\. +. +.TP +The fully\-qualified name of a tapped formula +Sometimes a formula from a tapped repository may conflict with one in \fBhomebrew/core\fR\. You can still access these formulae by using a special syntax, e\.g\. \fBhomebrew/dupes/vim\fR or \fBhomebrew/versions/node4\fR\. +. +.TP +An arbitrary file +Homebrew can install formulae from a local path\. It can point to either a formula file or a bottle\. Prefix relative paths with \fB\./\fR to prevent them from being interpreted as a formula or tap name\. +. +.SH "SPECIFYING CASKS" +Many Homebrew Cask commands accept one or more \fIcask\fR arguments\. These can be specified the same way as the \fIformula\fR arguments described in \fBSPECIFYING FORMULAE\fR above\. +. +.SH "ENVIRONMENT" +Note that environment variables must have a value set to be detected\. For example, run \fBexport HOMEBREW_NO_INSECURE_REDIRECT=1\fR rather than just \fBexport HOMEBREW_NO_INSECURE_REDIRECT\fR\. +. +.P +\fBHOMEBREW_*\fR environment variables can also be set in Homebrew\'s environment files: +. +.IP "\(bu" 4 +\fB/etc/homebrew/brew\.env\fR (system\-wide) +. +.IP "\(bu" 4 +\fB$HOMEBREW_PREFIX/etc/homebrew/brew\.env\fR (prefix\-specific) +. +.IP "\(bu" 4 +\fB$XDG_CONFIG_HOME/homebrew/brew\.env\fR if \fB$XDG_CONFIG_HOME\fR is set or \fB$HOME/\.homebrew/brew\.env\fR otherwise (user\-specific) +. +.IP "" 0 +. +.P +User\-specific environment files take precedence over prefix\-specific files and prefix\-specific files take precedence over system\-wide files (unless \fBHOMEBREW_SYSTEM_ENV_TAKES_PRIORITY\fR is set, see below)\. +. +.P +Note that these files do not support shell variable expansion e\.g\. \fB$HOME\fR or command execution e\.g\. \fB$(cat file)\fR\. +. +.TP +\fBHOMEBREW_API_DOMAIN\fR +. +.br +Use this URL as the download mirror for Homebrew JSON API\. If metadata files at that URL are temporarily unavailable, the default API domain will be used as a fallback mirror\. +. +.IP +\fIDefault:\fR \fBhttps://formulae\.brew\.sh/api\fR\. +. +.TP +\fBHOMEBREW_ARCH\fR +. +.br +Linux only: Pass this value to a type name representing the compiler\'s \fB\-march\fR option\. +. +.IP +\fIDefault:\fR \fBnative\fR\. +. +.TP +\fBHOMEBREW_ARTIFACT_DOMAIN\fR +. +.br +Prefix all download URLs, including those for bottles, with this value\. For example, \fBHOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080\fR will cause a formula with the URL \fBhttps://example\.com/foo\.tar\.gz\fR to instead download from \fBhttp://localhost:8080/https://example\.com/foo\.tar\.gz\fR\. Bottle URLs however, have their domain replaced with this prefix\. This results in e\.g\. \fBhttps://ghcr\.io/v2/homebrew/core/gettext/manifests/0\.21\fR to instead be downloaded from \fBhttp://localhost:8080/v2/homebrew/core/gettext/manifests/0\.21\fR +. +.TP +\fBHOMEBREW_API_AUTO_UPDATE_SECS\fR +. +.br +Check Homebrew\'s API for new formulae or cask data every \fBHOMEBREW_API_AUTO_UPDATE_SECS\fR seconds\. Alternatively, disable API auto\-update checks entirely with \fBHOMEBREW_NO_AUTO_UPDATE\fR\. +. +.IP +\fIDefault:\fR \fB450\fR\. +. +.TP +\fBHOMEBREW_AUTO_UPDATE_SECS\fR +. +.br +Run \fBbrew update\fR once every \fBHOMEBREW_AUTO_UPDATE_SECS\fR seconds before some commands, e\.g\. \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew tap\fR\. Alternatively, disable auto\-update entirely with \fBHOMEBREW_NO_AUTO_UPDATE\fR\. +. +.IP +\fIDefault:\fR \fB86400\fR (24 hours), \fB3600\fR (1 hour) if a developer command has been run or \fB300\fR (5 minutes) if \fBHOMEBREW_NO_INSTALL_FROM_API\fR is set\. +. +.TP +\fBHOMEBREW_AUTOREMOVE\fR +. +.br +If set, calls to \fBbrew cleanup\fR and \fBbrew uninstall\fR will automatically remove unused formula dependents and if \fBHOMEBREW_NO_INSTALL_CLEANUP\fR is not set, \fBbrew cleanup\fR will start running \fBbrew autoremove\fR periodically\. +. +.TP +\fBHOMEBREW_BAT\fR +. +.br +If set, use \fBbat\fR for the \fBbrew cat\fR command\. +. +.TP +\fBHOMEBREW_BAT_CONFIG_PATH\fR +. +.br +Use this as the \fBbat\fR configuration file\. +. +.IP +\fIDefault:\fR \fB$BAT_CONFIG_PATH\fR\. +. +.TP +\fBHOMEBREW_BAT_THEME\fR +. +.br +Use this as the \fBbat\fR theme for syntax highlighting\. +. +.IP +\fIDefault:\fR \fB$BAT_THEME\fR\. +. +.TP +\fBHOMEBREW_BOOTSNAP\fR +. +.br +If set, use Bootsnap to speed up repeated \fBbrew\fR calls\. A no\-op when using Homebrew\'s vendored, relocatable Ruby on macOS (as it doesn\'t work)\. +. +.TP +\fBHOMEBREW_BOTTLE_DOMAIN\fR +. +.br +Use this URL as the download mirror for bottles\. If bottles at that URL are temporarily unavailable, the default bottle domain will be used as a fallback mirror\. For example, \fBHOMEBREW_BOTTLE_DOMAIN=http://localhost:8080\fR will cause all bottles to download from the prefix \fBhttp://localhost:8080/\fR\. If bottles are not available at \fBHOMEBREW_BOTTLE_DOMAIN\fR they will be downloaded from the default bottle domain\. +. +.IP +\fIDefault:\fR \fBhttps://ghcr\.io/v2/homebrew/core\fR\. +. +.TP +\fBHOMEBREW_BREW_GIT_REMOTE\fR +. +.br +Use this URL as the Homebrew/brew \fBgit\fR(1) remote\. +. +.IP +\fIDefault:\fR \fBhttps://github\.com/Homebrew/brew\fR\. +. +.TP +\fBHOMEBREW_BROWSER\fR +. +.br +Use this as the browser when opening project homepages\. +. +.IP +\fIDefault:\fR \fB$BROWSER\fR or the OS\'s default browser\. +. +.TP +\fBHOMEBREW_CACHE\fR +. +.br +Use this directory as the download cache\. +. +.IP +\fIDefault:\fR macOS: \fB$HOME/Library/Caches/Homebrew\fR, Linux: \fB$XDG_CACHE_HOME/Homebrew\fR or \fB$HOME/\.cache/Homebrew\fR\. +. +.TP +\fBHOMEBREW_CASK_OPTS\fR +. +.br +Append these options to all \fBcask\fR commands\. All \fB\-\-*dir\fR options, \fB\-\-language\fR, \fB\-\-require\-sha\fR, \fB\-\-no\-quarantine\fR and \fB\-\-no\-binaries\fR are supported\. For example, you might add something like the following to your \fB~/\.profile\fR, \fB~/\.bash_profile\fR, or \fB~/\.zshenv\fR: +. +.IP +\fBexport HOMEBREW_CASK_OPTS="\-\-appdir=~/Applications \-\-fontdir=/Library/Fonts"\fR +. +.TP +\fBHOMEBREW_CLEANUP_MAX_AGE_DAYS\fR +. +.br +Cleanup all cached files older than this many days\. +. +.IP +\fIDefault:\fR \fB120\fR\. +. +.TP +\fBHOMEBREW_CLEANUP_PERIODIC_FULL_DAYS\fR +. +.br +If set, \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew reinstall\fR will cleanup all formulae when this number of days has passed\. +. +.IP +\fIDefault:\fR \fB30\fR\. +. +.TP +\fBHOMEBREW_COLOR\fR +. +.br +If set, force colour output on non\-TTY outputs\. +. +.TP +\fBHOMEBREW_CORE_GIT_REMOTE\fR +. +.br +Use this URL as the Homebrew/homebrew\-core \fBgit\fR(1) remote\. +. +.IP +\fIDefault:\fR \fBhttps://github\.com/Homebrew/homebrew\-core\fR\. +. +.TP +\fBHOMEBREW_CURL_PATH\fR +. +.br +Linux only: Set this value to a new enough \fBcurl\fR executable for Homebrew to use\. +. +.IP +\fIDefault:\fR \fBcurl\fR\. +. +.TP +\fBHOMEBREW_CURL_RETRIES\fR +. +.br +Pass the given retry count to \fB\-\-retry\fR when invoking \fBcurl\fR(1)\. +. +.IP +\fIDefault:\fR \fB3\fR\. +. +.TP +\fBHOMEBREW_CURL_VERBOSE\fR +. +.br +If set, pass \fB\-\-verbose\fR when invoking \fBcurl\fR(1)\. +. +.TP +\fBHOMEBREW_CURLRC\fR +. +.br +If set to an absolute path (i\.e\. beginning with \fB/\fR), pass it with \fB\-\-config\fR when invoking \fBcurl\fR(1)\. If set but \fInot\fR a valid path, do not pass \fB\-\-disable\fR, which disables the use of \fB\.curlrc\fR\. +. +.TP +\fBHOMEBREW_DEBUG\fR +. +.br +If set, always assume \fB\-\-debug\fR when running commands\. +. +.TP +\fBHOMEBREW_DEVELOPER\fR +. +.br +If set, tweak behaviour to be more relevant for Homebrew developers (active or budding) by e\.g\. turning warnings into errors\. +. +.TP +\fBHOMEBREW_DISABLE_LOAD_FORMULA\fR +. +.br +If set, refuse to load formulae\. This is useful when formulae are not trusted (such as in pull requests)\. +. +.TP +\fBHOMEBREW_DISPLAY\fR +. +.br +Use this X11 display when opening a page in a browser, for example with \fBbrew home\fR\. Primarily useful on Linux\. +. +.IP +\fIDefault:\fR \fB$DISPLAY\fR\. +. +.TP +\fBHOMEBREW_DISPLAY_INSTALL_TIMES\fR +. +.br +If set, print install times for each formula at the end of the run\. +. +.TP +\fBHOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN\fR +. +.br +Use this base64 encoded username and password for authenticating with a Docker registry proxying GitHub Packages\. If \fBHOMEBREW_DOCKER_REGISTRY_TOKEN\fR is set, it will be used instead\. +. +.TP +\fBHOMEBREW_DOCKER_REGISTRY_TOKEN\fR +. +.br +Use this bearer token for authenticating with a Docker registry proxying GitHub Packages\. Preferred over \fBHOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN\fR\. +. +.TP +\fBHOMEBREW_EDITOR\fR +. +.br +Use this editor when editing a single formula, or several formulae in the same directory\. +. +.IP +\fINote:\fR \fBbrew edit\fR will open all of Homebrew as discontinuous files and directories\. Visual Studio Code can handle this correctly in project mode, but many editors will do strange things in this case\. +. +.IP +\fIDefault:\fR \fB$EDITOR\fR or \fB$VISUAL\fR\. +. +.TP +\fBHOMEBREW_EVAL_ALL\fR +. +.br +If set, \fBbrew\fR commands evaluate all formulae and casks, executing their arbitrary code, by default without requiring \fB\-\-eval\-all\fR\. Required to cache formula and cask descriptions\. +. +.TP +\fBHOMEBREW_FAIL_LOG_LINES\fR +. +.br +Output this many lines of output on formula \fBsystem\fR failures\. +. +.IP +\fIDefault:\fR \fB15\fR\. +. +.TP +\fBHOMEBREW_FORBIDDEN_LICENSES\fR +. +.br +A space\-separated list of licenses\. Homebrew will refuse to install a formula if it or any of its dependencies has a license on this list\. +. +.TP +\fBHOMEBREW_FORCE_BREWED_CA_CERTIFICATES\fR +. +.br +If set, always use a Homebrew\-installed \fBca\-certificates\fR rather than the system version\. Automatically set if the system version is too old\. +. +.TP +\fBHOMEBREW_FORCE_BREWED_CURL\fR +. +.br +If set, always use a Homebrew\-installed \fBcurl\fR(1) rather than the system version\. Automatically set if the system version of \fBcurl\fR is too old\. +. +.TP +\fBHOMEBREW_FORCE_BREWED_GIT\fR +. +.br +If set, always use a Homebrew\-installed \fBgit\fR(1) rather than the system version\. Automatically set if the system version of \fBgit\fR is too old\. +. +.TP +\fBHOMEBREW_FORCE_VENDOR_RUBY\fR +. +.br +If set, always use Homebrew\'s vendored, relocatable Ruby version even if the system version of Ruby is new enough\. +. +.TP +\fBHOMEBREW_GIT_EMAIL\fR +. +.br +Set the Git author and committer email to this value\. +. +.TP +\fBHOMEBREW_GIT_NAME\fR +. +.br +Set the Git author and committer name to this value\. +. +.TP +\fBHOMEBREW_GIT_PATH\fR +. +.br +Linux only: Set this value to a new enough \fBgit\fR executable for Homebrew to use\. +. +.IP +\fIDefault:\fR \fBgit\fR\. +. +.TP +\fBHOMEBREW_GITHUB_API_TOKEN\fR +. +.br +Use this personal access token for the GitHub API, for features such as \fBbrew search\fR\. You can create one at \fIhttps://github\.com/settings/tokens\fR\. If set, GitHub will allow you a greater number of API requests\. For more information, see: \fIhttps://docs\.github\.com/en/rest/overview/rate\-limits\-for\-the\-rest\-api\fR +. +.IP +\fINote:\fR Homebrew doesn\'t require permissions for any of the scopes, but some developer commands may require additional permissions\. +. +.TP +\fBHOMEBREW_GITHUB_PACKAGES_TOKEN\fR +. +.br +Use this GitHub personal access token when accessing the GitHub Packages Registry (where bottles may be stored)\. +. +.TP +\fBHOMEBREW_GITHUB_PACKAGES_USER\fR +. +.br +Use this username when accessing the GitHub Packages Registry (where bottles may be stored)\. +. +.TP +\fBHOMEBREW_INSTALL_BADGE\fR +. +.br +Print this text before the installation summary of each successful build\. +. +.IP +\fIDefault:\fR The "Beer Mug" emoji\. +. +.TP +\fBHOMEBREW_LIVECHECK_WATCHLIST\fR +. +.br +Consult this file for the list of formulae to check by default when no formula argument is passed to \fBbrew livecheck\fR\. +. +.IP +\fIDefault:\fR \fB$XDG_CONFIG_HOME/homebrew/livecheck_watchlist\.txt\fR if \fB$XDG_CONFIG_HOME\fR is set or \fB$HOME/\.homebrew/livecheck_watchlist\.txt\fR otherwise\. +. +.TP +\fBHOMEBREW_LOGS\fR +. +.br +Use this directory to store log files\. +. +.IP +\fIDefault:\fR macOS: \fB$HOME/Library/Logs/Homebrew\fR, Linux: \fB$XDG_CACHE_HOME/Homebrew/Logs\fR or \fB$HOME/\.cache/Homebrew/Logs\fR\. +. +.TP +\fBHOMEBREW_MAKE_JOBS\fR +. +.br +Use this value as the number of parallel jobs to run when building with \fBmake\fR(1)\. +. +.IP +\fIDefault:\fR The number of available CPU cores\. +. +.TP +\fBHOMEBREW_NO_ANALYTICS\fR +. +.br +If set, do not send analytics\. Google Analytics were destroyed\. For more information, see: \fIhttps://docs\.brew\.sh/Analytics\fR +. +.TP +\fBHOMEBREW_NO_AUTO_UPDATE\fR +. +.br +If set, do not automatically update before running some commands, e\.g\. \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew tap\fR\. Alternatively, run this less often by setting \fBHOMEBREW_AUTO_UPDATE_SECS\fR to a value higher than the default\. +. +.TP +\fBHOMEBREW_NO_BOOTSNAP\fR +. +.br +If set, do not use Bootsnap to speed up repeated \fBbrew\fR calls\. +. +.TP +\fBHOMEBREW_NO_CLEANUP_FORMULAE\fR +. +.br +A comma\-separated list of formulae\. Homebrew will refuse to clean up or autoremove a formula if it appears on this list\. +. +.TP +\fBHOMEBREW_NO_COLOR\fR +. +.br +If set, do not print text with colour added\. +. +.IP +\fIDefault:\fR \fB$NO_COLOR\fR\. +. +.TP +\fBHOMEBREW_NO_EMOJI\fR +. +.br +If set, do not print \fBHOMEBREW_INSTALL_BADGE\fR on a successful build\. +. +.TP +\fBHOMEBREW_NO_ENV_HINTS\fR +. +.br +If set, do not print any hints about changing Homebrew\'s behaviour with environment variables\. +. +.TP +\fBHOMEBREW_NO_GITHUB_API\fR +. +.br +If set, do not use the GitHub API, e\.g\. for searches or fetching relevant issues after a failed install\. +. +.TP +\fBHOMEBREW_NO_INSECURE_REDIRECT\fR +. +.br +If set, forbid redirects from secure HTTPS to insecure HTTP\. +. +.IP +\fINote:\fR while ensuring your downloads are fully secure, this is likely to cause from\-source SourceForge, some GNU & GNOME\-hosted formulae to fail to download\. +. +.TP +\fBHOMEBREW_NO_INSTALL_CLEANUP\fR +. +.br +If set, \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew reinstall\fR will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every \fBHOMEBREW_CLEANUP_PERIODIC_FULL_DAYS\fR days\. Alternatively, \fBHOMEBREW_NO_CLEANUP_FORMULAE\fR allows specifying specific formulae to not clean up\. +. +.TP +\fBHOMEBREW_NO_INSTALL_FROM_API\fR +. +.br +If set, do not install formulae and casks in homebrew/core and homebrew/cask taps using Homebrew\'s API and instead use (large, slow) local checkouts of these repositories\. +. +.TP +\fBHOMEBREW_NO_INSTALL_UPGRADE\fR +. +.br +If set, \fBbrew install\fR \fIformula|cask\fR will not upgrade \fIformula|cask\fR if it is installed but outdated\. +. +.TP +\fBHOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK\fR +. +.br +If set, do not check for broken linkage of dependents or outdated dependents after installing, upgrading or reinstalling formulae\. This will result in fewer dependents (and their dependencies) being upgraded or reinstalled but may result in more breakage from running \fBbrew install\fR \fIformula\fR or \fBbrew upgrade\fR \fIformula\fR\. +. +.TP +\fBHOMEBREW_NO_UPDATE_REPORT_NEW\fR +. +.br +If set, \fBbrew update\fR will not show the list of newly added formulae/casks\. +. +.TP +\fBHOMEBREW_PIP_INDEX_URL\fR +. +.br +If set, \fBbrew install\fR \fIformula\fR will use this URL to download PyPI package resources\. +. +.IP +\fIDefault:\fR \fBhttps://pypi\.org/simple\fR\. +. +.TP +\fBHOMEBREW_PRY\fR +. +.br +If set, use Pry for the \fBbrew irb\fR command\. +. +.TP +\fBHOMEBREW_UPGRADE_GREEDY\fR +. +.br +If set, pass \fB\-\-greedy\fR to all cask upgrade commands\. +. +.TP +\fBHOMEBREW_SIMULATE_MACOS_ON_LINUX\fR +. +.br +If set, running Homebrew on Linux will simulate certain macOS code paths\. This is useful when auditing macOS formulae while on Linux\. +. +.TP +\fBHOMEBREW_SKIP_OR_LATER_BOTTLES\fR +. +.br +If set along with \fBHOMEBREW_DEVELOPER\fR, do not use bottles from older versions of macOS\. This is useful in development on new macOS versions\. +. +.TP +\fBHOMEBREW_SORBET_RUNTIME\fR +. +.br +If set, enable runtime typechecking using Sorbet\. Set by default for \fBHOMEBREW_DEVELOPER\fR or when running some developer commands\. +. +.TP +\fBHOMEBREW_SSH_CONFIG_PATH\fR +. +.br +If set, Homebrew will use the given config file instead of \fB~/\.ssh/config\fR when fetching Git repositories over SSH\. +. +.IP +\fIDefault:\fR \fB$HOME/\.ssh/config\fR +. +.TP +\fBHOMEBREW_SVN\fR +. +.br +Use this as the \fBsvn\fR(1) binary\. +. +.IP +\fIDefault:\fR A Homebrew\-built Subversion (if installed), or the system\-provided binary\. +. +.TP +\fBHOMEBREW_SYSTEM_ENV_TAKES_PRIORITY\fR +. +.br +If set in Homebrew\'s system\-wide environment file (\fB/etc/homebrew/brew\.env\fR), the system\-wide environment file will be loaded last to override any prefix or user settings\. +. +.TP +\fBHOMEBREW_SUDO_THROUGH_SUDO_USER\fR +. +.br +If set, Homebrew will use the \fBSUDO_USER\fR environment variable to define the user to \fBsudo\fR(8) through when running \fBsudo\fR(8)\. +. +.TP +\fBHOMEBREW_TEMP\fR +. +.br +Use this path as the temporary directory for building packages\. Changing this may be needed if your system temporary directory and Homebrew prefix are on different volumes, as macOS has trouble moving symlinks across volumes when the target does not yet exist\. This issue typically occurs when using FileVault or custom SSD configurations\. +. +.IP +\fIDefault:\fR macOS: \fB/private/tmp\fR, Linux: \fB/tmp\fR\. +. +.TP +\fBHOMEBREW_UPDATE_TO_TAG\fR +. +.br +If set, always use the latest stable tag (even if developer commands have been run)\. +. +.TP +\fBHOMEBREW_VERBOSE\fR +. +.br +If set, always assume \fB\-\-verbose\fR when running commands\. +. +.TP +\fBHOMEBREW_VERBOSE_USING_DOTS\fR +. +.br +If set, verbose output will print a \fB\.\fR no more than once a minute\. This can be useful to avoid long\-running Homebrew commands being killed due to no output\. +. +.TP +\fBSUDO_ASKPASS\fR +. +.br +If set, pass the \fB\-A\fR option when calling \fBsudo\fR(8)\. +. +.TP +\fBall_proxy\fR +. +.br +Use this SOCKS5 proxy for \fBcurl\fR(1), \fBgit\fR(1) and \fBsvn\fR(1) when downloading through Homebrew\. +. +.TP +\fBftp_proxy\fR +. +.br +Use this FTP proxy for \fBcurl\fR(1), \fBgit\fR(1) and \fBsvn\fR(1) when downloading through Homebrew\. +. +.TP +\fBhttp_proxy\fR +. +.br +Use this HTTP proxy for \fBcurl\fR(1), \fBgit\fR(1) and \fBsvn\fR(1) when downloading through Homebrew\. +. +.TP +\fBhttps_proxy\fR +. +.br +Use this HTTPS proxy for \fBcurl\fR(1), \fBgit\fR(1) and \fBsvn\fR(1) when downloading through Homebrew\. +. +.TP +\fBno_proxy\fR +. +.br +A comma\-separated list of hostnames and domain names excluded from proxying by \fBcurl\fR(1), \fBgit\fR(1) and \fBsvn\fR(1) when downloading through Homebrew\. +. +.SH "USING HOMEBREW BEHIND A PROXY" +Set the \fBhttp_proxy\fR, \fBhttps_proxy\fR, \fBall_proxy\fR, \fBftp_proxy\fR and/or \fBno_proxy\fR environment variables documented above\. +. +.P +For example, to use an unauthenticated HTTP or SOCKS5 proxy: +. +.IP "" 4 +. +.nf + +export http_proxy=http://$HOST:$PORT + +export all_proxy=socks5://$HOST:$PORT +. +.fi +. +.IP "" 0 +. +.P +And for an authenticated HTTP proxy: +. +.IP "" 4 +. +.nf + +export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT +. +.fi +. +.IP "" 0 +. +.SH "SEE ALSO" +Homebrew Documentation: \fIhttps://docs\.brew\.sh\fR +. +.P +Homebrew API: \fIhttps://rubydoc\.brew\.sh\fR +. +.P +\fBgit\fR(1), \fBgit\-log\fR(1) +. +.SH "AUTHORS" +Homebrew\'s Project Leader is Mike McQuaid\. +. +.P +Homebrew\'s Project Leadership Committee is Colin Dean, Issy Long, Mike McQuaid, Patrick Linnane and Vanessa Gennarelli\. +. +.P +Homebrew\'s Technical Steering Committee is Bo Anderson, FX Coudert, Michka Popoff, Mike McQuaid and Rylan Polster\. +. +.P +Homebrew\'s maintainers are Alexander Bayandin, Bevan Kay, Bo Anderson, Branch Vincent, Caleb Xu, Carlo Cabrera, David Baumgold, Dustin Rodrigues, Eric Knibbe, FX Coudert, George Adams, Issy Long, Justin Krehel, Markus Reiter, Miccal Matthews, Michael Cho, Michka Popoff, Mike McQuaid, Nanda H Krishna, Patrick Linnane, Razvan Azamfirei, Rui Chen, Ruoyu Zhong, Rylan Polster, Sam Ford, Sean Molenaar and Thierry Moisan\. +. +.P +Former maintainers with significant contributions include Misty De Méo, Shaun Jackman, Vítor Galvão, Claudia Pellegrino, Seeker, William Woodruff, Jan Viljanen, JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs, Chongyu Zhu and Homebrew\'s creator: Max Howell\. +. +.SH "BUGS" +See our issues on GitHub: +. +.TP +\fBHomebrew/brew\fR +. +.br +\fIhttps://github\.com/Homebrew/brew/issues\fR +. +.TP +\fBHomebrew/homebrew\-core\fR +. +.br +\fIhttps://github\.com/Homebrew/homebrew\-core/issues\fR +. +.TP +\fBHomebrew/homebrew\-cask\fR +. +.br +\fIhttps://github\.com/Homebrew/homebrew\-cask/issues\fR + diff --git a/samples/darwin/htop.1 b/samples/darwin/htop.1 new file mode 100644 index 0000000..d5860de --- /dev/null +++ b/samples/darwin/htop.1 @@ -0,0 +1,695 @@ +.TH "HTOP" "1" "2024" "htop 3.3.0" "User Commands" +.SH "NAME" +htop, pcp-htop \- interactive process viewer +.SH "SYNOPSIS" +.B htop +.RB [ \-dCFhpustvH ] +.br +.B pcp\ htop +.RB [ \-dCFhpustvH ] +.RB [ \-\-host/-h\ host ] +.SH "DESCRIPTION" +.B htop +is a cross-platform ncurses-based process viewer. +.LP +It is similar to +.BR top , +but allows you to scroll vertically and horizontally, and interact using +a pointing device (mouse). +You can observe all processes running on the system, along with their +command line arguments, as well as view them in a tree format, select +multiple processes and act on them all at once. +.LP +Tasks related to processes (killing, renicing) can be done without +entering their PIDs. +.LP +.B pcp-htop +is a version of +.B htop +built using the Performance Co-Pilot (PCP) Metrics API (see \c +.BR PCPIntro (1), +.BR PMAPI (3)), +allowing to extend +.B htop +to display values from arbitrary metrics. +See the section below titled +.B "CONFIG FILES" +for further details. +.br +.SH "COMMAND-LINE OPTIONS" +Mandatory arguments to long options are mandatory for short options too. +.TP +\fB\-d \-\-delay=DELAY\fR +Delay between updates, in tenths of a second. If the delay value is +less than 1, it is increased to 1, i.e. 1/10 second. If the delay value +is greater than 100, it is decreased to 100, i.e. 10 seconds. +.TP +\fB\-C \-\-no-color \-\-no-colour\fR +Start +.B htop +in monochrome mode +.TP +\fB\-F \-\-filter=FILTER +Filter processes by terms matching the commands. The terms are matched +case-insensitive and as fixed strings (not regexs). You can separate multiple terms with "|". +.TP +\fB\-h \-\-help +Display a help message and exit +.TP +\fB\-p \-\-pid=PID,PID...\fR +Show only the given PIDs +.TP +\fB\-s \-\-sort\-key COLUMN\fR +Sort by this column (use \-\-sort\-key help for a column list). +This will force a list view unless you specify -t at the same time. +.TP +\fB\-u \-\-user=USERNAME|UID\fR +Show only the processes of a given user +.TP +\fB\-U \-\-no-unicode\fR +Do not use unicode but ASCII characters for graph meters +.TP +\fB\-M \-\-no-mouse\fR +Disable support of mouse control +.TP +\fB\-\-readonly\fR +Disable all system and process changing features +.TP +\fB\-V \-\-version +Output version information and exit +.TP +\fB\-t \-\-tree +Show processes in tree view. This can be used to force a tree view when +requesting a sort order with -s. +.TP +\fB\-H \-\-highlight-changes=DELAY\fR +Highlight new and old processes +.TP +\fB \-\-drop-capabilities[=off|basic|strict]\fR +Linux only; requires libcap support. +.br +Drop unneeded Linux capabilities. +In strict mode features like killing, changing process priorities, and reading +process delay accounting information will not work, due to less capabilities +held. +.SH "INTERACTIVE COMMANDS" +The following commands are supported while in +.BR htop : +.TP 5 +.B Tab, Shift-Tab +Select the next / the previous screen tab to display. +You can enable showing the screen tab names in the Setup screen (F2). +.TP +.B Up, Alt-k +Select (highlight) the previous process in the process list. Scroll the list +if necessary. +.TP +.B Down, Alt-j +Select (highlight) the next process in the process list. Scroll the list if +necessary. +.TP +.B Left, Alt-h +Scroll the process list left. +.TP +.B Right, Alt-l +Scroll the process list right. +.TP +.B PgUp, PgDn +Scroll the process list up or down one window. +.TP +.B Home +Scroll to the top of the process list and select the first process. +.TP +.B End +Scroll to the bottom of the process list and select the last process. +.TP +.B Ctrl-A, ^ +Scroll left to the beginning of the process entry (i.e. beginning of line). +.TP +.B Ctrl-E, $ +Scroll right to the end of the process entry (i.e. end of line). +.TP +.B Space +Tag or untag a process. Commands that can operate on multiple processes, +like "kill", will then apply over the list of tagged processes, instead +of the currently highlighted one. +.TP +.B c +Tag the current process and its children. Commands that can operate on multiple +processes, like "kill", will then apply over the list of tagged processes, +instead of the currently highlighted one. +.TP +.B U +Untag all processes (remove all tags added with the Space or c keys). +.TP +.B s +Trace process system calls: if strace(1) is installed, pressing this key +will attach it to the currently selected process, presenting a live +update of system calls issued by the process. +.TP +.B l +Display open files for a process: if lsof(1) is installed, pressing this key +will display the list of file descriptors opened by the process. +.TP +.B w +Display the command line of the selected process in a separate screen, wrapped +onto multiple lines as needed. +.TP +.B x +Display the active file locks of the selected process in a separate screen. +.TP +.B F1, h, ? +Go to the help screen +.TP +.B F2, S +Go to the setup screen, where you can configure the meters displayed at the top +of the screen, set various display options, choose among color schemes, and +select which columns are displayed, in which order. +.TP +.B F3, / +Incrementally search the command lines of all the displayed processes. The +currently selected (highlighted) command will update as you type. While in +search mode, pressing F3 will cycle through matching occurrences. +Pressing Shift-F3 will cycle backwards. + +Alternatively the search can be started by simply typing the command +you are looking for, although for the first character normal key +bindings take precedence. +.TP +.B F4, \\\\ +Incremental process filtering: type in part of a process command line and +only processes whose names match will be shown. To cancel filtering, +enter the Filter option again and press Esc. +The matching is done case-insensitive. Terms are fixed strings (no regex). +You can separate multiple terms with "|". +.TP +.B F5, t +Tree view: organize processes by parenthood, and layout the relations +between them as a tree. Toggling the key will switch between tree and +your previously selected sort view. Selecting a sort view will exit +tree view. +.TP +.B F6, <, > +Selects a field for sorting, also accessible through < and >. +The current sort field is indicated by a highlight in the header. +.TP +.B F7, ] +Increase the selected process's priority (subtract from 'nice' value). +This can only be done by the superuser. +.TP +.B F8, [ +Decrease the selected process's priority (add to 'nice' value) +.TP +.B Shift-F7, } +Increase the selected process's autogroup priority (subtract from autogroup 'nice' value). +This can only be done by the superuser. +.TP +.B Shift-F8, { +Decrease the selected process's autogroup priority (add to autogroup 'nice' value) +.TP +.B F9, k +"Kill" process: sends a signal which is selected in a menu, to one or a group +of processes. If processes were tagged, sends the signal to all tagged processes. +If none is tagged, sends to the currently selected process. +.TP +.B F10, q +Quit +.TP +.B I +Invert the sort order: if sort order is increasing, switch to decreasing, and +vice-versa. +.TP +.B +, \-, * +When in tree view mode, expand or collapse subtree. When a subtree is collapsed +a "+" sign shows to the left of the process name. +Pressing "*" will expand or collapse all children of PIDs without parents, so +typically PID 1 (init) and PID 2 (kthreadd on Linux, if kernel threads are shown). +.TP +.B a (on multiprocessor machines) +Set CPU affinity: mark which CPUs a process is allowed to use. +.TP +.B u +Show only processes owned by a specified user. +.TP +.B N +Sort by PID. +.TP +.B M +Sort by memory usage (top compatibility key). +.TP +.B P +Sort by processor usage (top compatibility key). +.TP +.B T +Sort by time (top compatibility key). +.TP +.B F +"Follow" process: if the sort order causes the currently selected process +to move in the list, make the selection bar follow it. This is useful for +monitoring a process: this way, you can keep a process always visible on +screen. When a movement key is used, "follow" loses effect. +.TP +.B K +Hide kernel threads: prevent the threads belonging the kernel to be +displayed in the process list. (This is a toggle key.) +.TP +.B H +Hide user threads: on systems that represent them differently than ordinary +processes (such as recent NPTL-based systems), this can hide threads from +userspace processes in the process list. (This is a toggle key.) +.TP +.B O +Hide containerized processes: prevent processes running in a container +from being displayed in the process list. (This is a toggle key.) +.TP +.B p +Show full paths to running programs, where applicable. (This is a toggle key.) +.TP +.B Z +Pause/resume process updates. +.TP +.B m +Merge exe, comm and cmdline, where applicable. (This is a toggle key.) +.TP +.B Ctrl-L +Refresh: redraw screen and recalculate values. +.TP +.B Numbers +PID search: type in process ID and the selection highlight will be moved to it. +.PD +.SH "COLUMNS" +The following columns can display data about each process. A value of '\-' in +all the rows indicates that a column is unsupported on your system, or +currently unimplemented in +.BR htop . +The names below are the ones used in the +"Available Columns" section of the setup screen. If a different name is +shown in +.BR htop 's +main screen, it is shown below in parenthesis. +.TP 5 +.B Command +The full command line of the process (i.e. program name and arguments). + +If the option 'Merge exe, comm and cmdline in Command' (toggled by the 'm' key) +is active, the executable path (/proc/[pid]/exe) and the command name +(/proc/[pid]/comm) are also shown merged with the command line, if available. + +The program basename is highlighted if set in the configuration. Additional +highlighting can be configured for stale executables (cf. EXE column below). +.TP +.B COMM +The command name of the process obtained from /proc/[pid]/comm, if readable. + +Requires Linux kernel 2.6.33 or newer. +.TP +.B EXE +The abbreviated basename of the executable of the process, obtained from +/proc/[pid]/exe, if readable. htop is able to read this file on linux for ALL +the processes only if it has the capability CAP_SYS_PTRACE or root privileges. + +The basename is marked in red if the executable used to run the process has +been replaced or deleted on disk since the process started. The information is +obtained by processing the contents of /proc/[pid]/exe. + +Furthermore the basename is marked in yellow if any library is reported as having +been replaced or deleted on disk since it was last loaded. The information is +obtained by processing the contents of /proc/[pid]/maps. + +When deciding the color the replacement of the main executable always takes +precedence over replacement of any other library. If only the memory map indicates +a replacement of the main executable, this will show as if any other library had +been replaced or deleted. + +This additional color markup can be configured in the "Display Options" section of +the setup screen. + +Displaying EXE requires CAP_SYS_PTRACE and PTRACE_MODE_READ_FSCRED. +.TP +.B PID +The process ID. +.TP +.B STATE (S) +The state of the process: + \fBS\fR for sleeping + \fBI\fR for idle (longer inactivity than sleeping on platforms that distinguish) + \fBR\fR for running + \fBD\fR for disk sleep (uninterruptible) + \fBZ\fR for zombie (waiting for parent to read its exit status) + \fBT\fR for traced or suspended (e.g by SIGTSTP) + \fBW\fR for paging +.TP +.B PPID +The parent process ID. +.TP +.B PGRP +The process's group ID. +.TP +.B SESSION (SID) +The process's session ID. +.TP +.B TTY +The controlling terminal of the process. +.TP +.B TPGID +The process ID of the foreground process group of the controlling terminal. +.TP +.B MINFLT +The number of page faults happening in the main memory. +.TP +.B CMINFLT +The number of minor faults for the process's waited-for children (see MINFLT above). +.TP +.B MAJFLT +The number of page faults happening out of the main memory. +.TP +.B CMAJFLT +The number of major faults for the process's waited-for children (see MAJFLT above). +.TP +.B UTIME (UTIME+) +The user CPU time, which is the amount of time the process has spent executing +on the CPU in user mode (i.e. everything but system calls), measured in clock +ticks. +.TP +.B STIME (STIME+) +The system CPU time, which is the amount of time the kernel has spent +executing system calls on behalf of the process, measured in clock ticks. +.TP +.B CUTIME (CUTIME+) +The children's user CPU time, which is the amount of time the process's +waited-for children have spent executing in user mode (see UTIME above). +.TP +.B CSTIME (CSTIME+) +The children's system CPU time, which is the amount of time the kernel has spent +executing system calls on behalf of all the process's waited-for children (see +STIME above). +.TP +.B PRIORITY (PRI) +The kernel's internal priority for the process, usually just its nice value +plus twenty. Different for real-time processes. +.TP +.B NICE (NI) +The nice value of a process, from 19 (low priority) to -20 (high priority). A +high value means the process is being nice, letting others have a higher +relative priority. The usual OS permission restrictions for adjusting priority apply. +.TP +.B STARTTIME (START) +The time the process was started. +.TP +.B PROCESSOR (CPU) +The ID of the CPU the process last executed on. +.TP +.B M_VIRT (VIRT) +The size of the virtual memory of the process. +.TP +.B M_RESIDENT (RES) +The resident set size (text + data + stack) of the process (i.e. the size of the +process's used physical memory). +.TP +.B M_SHARE (SHR) +The size of the process's shared pages. +.TP +.B M_TRS (CODE) +The text resident set size of the process (i.e. the size of the process's +executable instructions). +.TP +.B M_DRS (DATA) +The data resident set size (data + stack) of the process (i.e. the size of anything +except the process's executable instructions). +.TP +.B M_LRS (LIB) +The library size of the process. +.TP +.B M_SWAP (SWAP) +The size of the process's swapped pages. +.TP +.B M_PSS (PSS) +The proportional set size, same as M_RESIDENT but each page is divided by the +number of processes sharing it. +.TP +.B M_M_PSSWP (PSSWP) +The proportional swap share of this mapping, unlike M_SWAP this does not take +into account swapped out page of underlying shmem objects. +.TP +.B ST_UID (UID) +The user ID of the process owner. +.TP +.B PERCENT_CPU (CPU%) +The percentage of the CPU time that the process is currently using. +This is the default way to represent CPU usage in Linux. Each process can +consume up to 100% which means the full capacity of the core it is running +on. This is sometimes called "Irix mode" e.g. in +.BR top (1). +.TP +.B PERCENT_NORM_CPU (NCPU%) +The percentage of the CPU time that the process is currently using normalized +by CPU count. This is sometimes called "Solaris mode" e.g. in +.BR top (1). +.TP +.B PERCENT_MEM (MEM%) +The percentage of memory the process is currently using (based on the process's +resident memory size, see M_RESIDENT above). +.TP +.B USER +The username of the process owner, or the user ID if the name can't be +determined. + +On Linux the username is highlighted if the process has elevated privileges, +i.e. if it has been started from binaries with file capabilities set or +retained Linux capabilities, via the ambient set, after switching from the +root user. +.TP +.B TIME (TIME+) +The time, measured in clock ticks that the process has spent in user and system +time (see UTIME, STIME above). +.TP +.B NLWP +The number of Light-Weight Processes (=threads) in the process. +.TP +.B TGID +The thread group ID. +.TP +.B CTID +OpenVZ container ID, a.k.a virtual environment ID. +.TP +.B VPID +OpenVZ process ID. +.TP +.B VXID +VServer process ID. +.TP +.B RCHAR (RD_CHAR) +The number of bytes the process has read. +.TP +.B WCHAR (WR_CHAR) +The number of bytes the process has written. +.TP +.B SYSCR (RD_SYSC) +The number of read(2) syscalls for the process. +.TP +.B SYSCW (WR_SYSC) +The number of write(2) syscalls for the process. +.TP +.B RBYTES (IO_RBYTES) +Bytes of read(2) I/O for the process. +.TP +.B WBYTES (IO_WBYTES) +Bytes of write(2) I/O for the process. +.TP +.B CNCLWB (IO_CANCEL) +Bytes of cancelled write(2) I/O. +.TP +.B IO_READ_RATE (DISK READ) +The I/O rate of read(2) in bytes per second, for the process. +.TP +.B IO_WRITE_RATE (DISK WRITE) +The I/O rate of write(2) in bytes per second, for the process. +.TP +.B IO_RATE (DISK R/W) +The I/O rate, IO_READ_RATE + IO_WRITE_RATE (see above). +.TP +.B CGROUP +Which cgroup the process is in. For a shortened view see the CCGROUP column below. +.TP +.B CCGROUP +Shortened view of the cgroup name that the process is in. +This performs some pattern-based replacements to shorten the displayed string and thus condense the information. + \fB/*.slice\fR is shortened to \fB/[*]\fR (exceptions below) + \fB/system.slice\fR is shortened to \fB/[S]\fR + \fB/user.slice\fR is shortened to \fB/[U]\fR + \fB/user-*.slice\fR is shortened to \fB/[U:*]\fR (directly preceding \fB/[U]\fR before dropped) + \fB/machine.slice\fR is shortened to \fB/[M]\fR + \fB/machine-*.scope\fR is shortened to \fB/[SNC:*]\fR (SNC: systemd nspawn container), uppercase for the monitor + \fB/lxc.monitor.*\fR is shortened to \fB/[LXC:*]\fR + \fB/lxc.payload.*\fR is shortened to \fB/[lxc:*]\fR + \fB/*.scope\fR is shortened to \fB/!*\fR + \fB/*.service\fR is shortened to \fB/*\fR (suffix removed) + +Encountered escape sequences (e.g. from systemd) inside the cgroup name are not decoded. +.TP +.B OOM +OOM killer score. +.TP +.B CTXT +Incremental sum of voluntary and nonvoluntary context switches. +.TP +.B IO_PRIORITY (IO) +The I/O scheduling class followed by the priority if the class supports it: + \fBR\fR for Realtime + \fBB\fR for Best-effort + \fBid\fR for Idle +.TP +.B PERCENT_CPU_DELAY (CPUD%) +The percentage of time spent waiting for a CPU (while runnable). Requires CAP_NET_ADMIN. +.TP +.B PERCENT_IO_DELAY (IOD%) +The percentage of time spent waiting for the completion of synchronous block I/O. Requires CAP_NET_ADMIN. +.TP +.B PERCENT_SWAP_DELAY (SWAPD%) +The percentage of time spent swapping in pages. Requires CAP_NET_ADMIN. +.TP +.B AGRP +The autogroup identifier for the process. Requires Linux CFS to be enabled. +.TP +.B ANI +The autogroup nice value for the process autogroup. Requires Linux CFS to be enabled. +.TP +.B All other flags +Currently unsupported (always displays '-'). +.SH "EXTERNAL LIBRARIES" +While +.B htop +depends on most of the libraries it uses at build time there are two +noteworthy exceptions to this rule. These exceptions both relate to +data displayed in meters displayed in the header of +.B htop +and were intentionally created as optional runtime dependencies instead. +These exceptions are described below: +.TP +.B libsystemd +The bindings for libsystemd are used in the SystemD meter to determine +the number of active services and the overall system state. Looking for +the functions to determine these information at runtime allows for +builds to support these meters without forcing the package manager +to install these libraries on systems that otherwise don't use systemd. + +Summary: no build time dependency, optional runtime dependency on +.B libsystemd +via dynamic loading, with +.B systemctl(1) +fallback. +.TP +.B libsensors +The bindings for libsensors are used for the CPU temperature readings +in the CPU usage meters if displaying the temperature is enabled through +the setup screen. In order for +.B htop +to show these temperatures correctly though, a proper configuration +of libsensors through its usual configuration files is assumed and that +all CPU cores correspond to temperature sensors from the +.B coretemp +driver with core 0 corresponding to a sensor labelled "Core 0". The +package temperature may be given as "Package id 0". If missing it is +inferred as the maximum value from the available per-core readings. + +Summary: build time dependency on +.B libsensors(3) +C header files, optional runtime dependency on +.B libsensors(3) +via dynamic loading. +.SH "CONFIG FILES" +By default +.B htop +reads its configuration from the XDG-compliant path +.IR ~/.config/htop/htoprc . +The configuration file is overwritten upon clean exit by +.BR htop 's +in-program Setup configuration, so it should not be hand-edited. +If no user configuration exists +.B htop +tries to read the system-wide configuration from +.I ${prefix}/etc/htoprc +and as a last resort, falls back to its hard coded defaults. +.LP +You may override the location of the configuration file using the $HTOPRC +environment variable (so you can have multiple configurations for different +machines that share the same home directory, for example). +.LP +The +.B pcp-htop +utility makes use of +.I htoprc +in exactly the same way. +In addition, it supports additional configuration files allowing +new meters and columns to be added to the display via the usual +Setup function, which will display additional Available Meters +and Available Column entries for each runtime configured meter +or column. +.LP +These +.B pcp-htop +configuration files are read once at startup. +The format of these files is described in detail in the +.BR pcp-htop (5) +manual page. +.LP +This functionality makes available many thousands of Performance +Co-Pilot metrics for display by +.BR pcp-htop , +as well as the ability to display custom metrics added at individual sites. +Applications and services instrumented using the OpenMetrics format +.B https://openmetrics.io +can also be displayed by +.B pcp-htop +if the +.BR pmdaopenmetrics (1) +component is configured. +.LP +The configuration for both +.B htop +and +.B pcp-htop +is only saved when a clean exit is performed. Sending any signal will cause +.I all configuration changes to be lost. +.SH "MEMORY SIZES" +Memory sizes in +.B htop +are displayed in a human-readable form. +Sizes are printed in powers of 1024 using binary IEC units. +If no suffix is shown the units are implicitly K as in KiB (kibibyte, 1 KiB = 1024 bytes). +.LP +The decision to use this convention was made in order to conserve screen +space and make memory size representations consistent throughout +.B htop +as allocations are granular to full memory pages (4 KiB for most platforms). +.SH "SEE ALSO" +.BR proc (5), +.BR top (1), +.BR free (1), +.BR ps (1), +.BR uptime (1) +and +.BR limits.conf (5). +.SH "SEE ALSO FOR PCP" +.BR pmdaopenmetrics (1), +.BR PCPIntro (1), +.BR PMAPI (3), +and +.BR pcp-htop (5). +.SH "AUTHORS" +.B htop +was originally developed by Hisham Muhammad. +Nowadays it is maintained by the community at . +.LP +.B pcp-htop +is maintained as a collaboration between the and +communities, and forms part of the Performance Co-Pilot suite of tools. +.SH "COPYRIGHT" +Copyright \(co 2004-2019 Hisham Muhammad. +.br +Copyright \(co 2020-2024 htop dev team. +.LP +License GPLv2+: GNU General Public License version 2 or, at your option, any later version. +.LP +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. diff --git a/src/parse_man/darwin.rs b/src/parse_man/darwin.rs new file mode 100644 index 0000000..6ebff9b --- /dev/null +++ b/src/parse_man/darwin.rs @@ -0,0 +1,46 @@ +use regex::{Regex, RegexBuilder}; + +use super::util; +use crate::Flag; + +/// For parsing Darwin man pages (ported from Fish) +#[allow( + clippy::case_sensitive_file_extension_comparisons, + clippy::doc_markdown +)] +pub fn parse(cmd_name: &str, page_text: &str) -> Vec { + let Some(start_ind) = page_text.find(".Sh DESCRIPTION") else { + return Vec::new(); + }; + + let mut flags = Vec::new(); + + // Can't use util::get_section because we also want sections after DESCRIPTION + let content = &page_text[start_ind..]; + + // Replace '.It Fl' and the like with '.It -' (`Fl` is a dash) + let fl_re = Regex::new(r"(\...) Fl ").expect("Regex should be valid"); + let content = fl_re.replace_all(content, "$1 -").replace(".Fl ", "-"); + + let desc_end = RegexBuilder::new(r"\n\.El.*+") + .dot_matches_new_line(true) + .build() + .expect("Regex should be valid"); + + let mut paras = content.split(".It"); + paras.next(); // Discard the part before the first option + for para in paras { + let mut pieces = para.splitn(2, '\n'); + if let Some(options) = pieces.next() { + let desc = pieces.next().map(|desc| { + let desc = desc.replace(".Nm", cmd_name); + desc_end.replace(&desc, "").to_string() + }); + if let Some(flag) = util::make_flag(options, desc.as_deref()) { + flags.push(flag); + } + } + } + + flags +} diff --git a/src/parse_man/mod.rs b/src/parse_man/mod.rs index 2e35837..17c478a 100644 --- a/src/parse_man/mod.rs +++ b/src/parse_man/mod.rs @@ -1,4 +1,5 @@ //! For parsing command information from man pages +mod darwin; pub mod error; mod podman; mod scdoc; @@ -68,6 +69,7 @@ pub fn parse_manpage_text( type4::parse(cmd_name, text), scdoc::parse(cmd_name, text), podman::parse(cmd_name, text), + darwin::parse(cmd_name, text), ] .into_iter() .flatten() diff --git a/src/parse_man/util.rs b/src/parse_man/util.rs index b156cd5..61a7d51 100644 --- a/src/parse_man/util.rs +++ b/src/parse_man/util.rs @@ -16,8 +16,7 @@ pub fn trim_desc(desc: &str) -> String { /// Get the contents of a section with the given title pub fn get_section(title: &str, text: &str) -> Option { - // [hH] is necessary for Darwin - let re = RegexBuilder::new(&format!(r#"\.S[hH] {title}(.*?)(\.S[hH]|\z)"#)) + let re = RegexBuilder::new(&format!(r#"\.SH {title}(.*?)(\.SH|\z)"#)) .multi_line(true) .dot_matches_new_line(true) .build() @@ -35,14 +34,15 @@ pub fn remove_groff_formatting(data: &str) -> String { .replace(r"\fB", "") .replace(r"\fR", "") .replace(r"\e", ""); + // TODO check if this one is necessary - // also, fish uses a slightly different regex: `.PD( \d+)`, check if that's - // fine let re = Regex::new(r"\.PD \d+").unwrap(); let data = re.replace_all(&data, ""); + let data = data .replace(".BI", "") .replace(".BR", "") + .replace(".B", "") .replace("0.5i", "") .replace(".rb", "") .replace(r"\^", "") @@ -51,12 +51,13 @@ pub fn remove_groff_formatting(data: &str) -> String { .replace(r"\ ", " ") .replace(r"\-", "-") .replace(r"\&", "") - .replace(".B", "") - .replace(r"\-", "-") // .replace(".I", "") // This breaks podman since it removes .IX - .replace('\u{C}', "") - .replace(r"\(cq", "'") - .replace(r"\(aq", "'"); // Added by me, not from Fish. May need to remove all \(xx + .replace('\u{C}', ""); + + let quotes = Regex::new(r"\([ocadlr]q").unwrap(); + let data = quotes.replace_all(&data, "'"); + + let data = data.replace(".Pp", ""); // Fish only replaces this one on MacOS // todo Fish doesn't do this, see how it handles .sp let re = Regex::new(&format!(r"\.sp( {NUM_RE}v?)?")).unwrap(); diff --git a/tests/man_integration_tests.rs b/tests/man_integration_tests.rs index 5f10b00..bc5ee80 100644 --- a/tests/man_integration_tests.rs +++ b/tests/man_integration_tests.rs @@ -138,3 +138,8 @@ fn scdoc_sway_json() { fn podman_ncdu_json() { run_test("json", &["ncdu"], &["--cmds", "^ncdu"]); } + +#[test] +fn darwin_bless() { + run_test("json", &["bless"], &["--cmds", "^bless"]); +} diff --git a/tests/resources/man/expected/bless.json b/tests/resources/man/expected/bless.json new file mode 100644 index 0000000..2f522b2 --- /dev/null +++ b/tests/resources/man/expected/bless.json @@ -0,0 +1 @@ +{"name":"bless","flags":[{"forms":["--folder"],"desc":"Set this directory to be the Mac OS X/Darwin blessed directory, containing a ..."},{"forms":["--file"],"desc":"Set this file to be the Mac OS X/Darwin blessed boot file, containing a boote..."},{"forms":["--bootefi"],"desc":"Create a .Pa boot.efi file in the Mac OS X/Darwin system folder using .Ar fil..."},{"forms":["--label"],"desc":"Render a text label used in the firmware-based OS picker"},{"forms":["--labelfile"],"desc":"Use a pre-rendered label used for the firmware-based OS picker"},{"forms":["--setBoot"],"desc":"Set the system to boot off the specified partition. This is implemented in a ..."},{"forms":["--nextonly"],"desc":"Only change the boot device selection for the next boot. This is only support..."},{"forms":["--shortform"],"desc":"Use an abbreviated device path form. This option can allow for booting from n..."},{"forms":["--legacy"],"desc":"If --setBoot is given, set the firmware to boot a legacy BIOS-based operating..."},{"forms":["--legacydrivehint"],"desc":"Instruct the firmware to treat the specified whole disk as the primary, maste..."},{"forms":["--options"],"desc":"Set load options associated with the new boot option. This is only supported ..."},{"forms":["--personalize"],"desc":"Attempts to do a personalization operation on the target, which validates the..."},{"forms":["--create-snapshot"],"desc":"Attempts to create an APFS root snapshot of the target APFS system volume and..."},{"forms":["--snapshot"],"desc":"Set specific snapshot (uuid) as root snapshot of the system volume. The targe..."},{"forms":["--snapshotname"],"desc":"Set specific snapshot (name) as root snapshot of the system volume. The targe..."},{"forms":["--last-sealed-snapshot"],"desc":"Reverts back to using the previously signed APFS root snapshot reenabling Aut..."},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--mount"],"desc":"Use the volume mounted at .Ar directory to change the active boot device, in ..."},{"forms":["--file"],"desc":"Instead of allowing the firmware to discover the booter based on the blessed ..."},{"forms":["--setBoot"],"desc":"Same as for Folder Mode"},{"forms":["--nextonly"],"desc":"Same as for Folder Mode"},{"forms":["--shortform"],"desc":"Same as for Folder Mode"},{"forms":["--legacy"],"desc":"Same as for Folder Mode"},{"forms":["--legacydrivehint"],"desc":"Same as for Folder Mode"},{"forms":["--options"],"desc":"Same as for Folder Mode"},{"forms":["--personalize"],"desc":"Same as for Folder Mode"},{"forms":["--create-snapshot"],"desc":"Same as for Folder Mode"},{"forms":["--snapshot"],"desc":"Same as for Folder Mode"},{"forms":["--snapshotname"],"desc":"Same as for Folder Mode"},{"forms":["--last-sealed-snapshot"],"desc":"Same as for Folder Mode"},{"forms":["--bootefi"],"desc":"This enables copying required boot objects when --create-snapshot or --last-s..."},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--device"],"desc":"Use the block device .Ar device to change the active boot device. No volumes ..."},{"forms":["--label"],"desc":"Set the firmware-based OS picker label for the unmounted filesystem, using .A..."},{"forms":["--labelfile"],"desc":"Use a pre-rendered label used with the firmware-based OS picker"},{"forms":["--setBoot"],"desc":"Set the system to boot off the specified partition, as with Folder and Mount ..."},{"forms":["--startupfile"],"desc":"Add the .Ar file as the HFS+ StartupFile, and update other information on dis..."},{"forms":["--nextonly"],"desc":"Same as for Folder Mode"},{"forms":["--shortform"],"desc":"Same as for Folder Mode"},{"forms":["--options"],"desc":"Same as for Folder Mode"},{"forms":["--legacy"],"desc":"Same as for Folder Mode"},{"forms":["--legacydrivehint"],"desc":"Same as for Folder Mode"},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--netboot"],"desc":"Instead of setting the active boot selection to a disk-based volume, set the ..."},{"forms":["--server"],"desc":"A URL specification of how to boot the system. Currently, the only .Em protoc..."},{"forms":["--nextonly"],"desc":"Same as for Folder Mode"},{"forms":["--options"],"desc":"Same as for Folder Mode"},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--info"],"desc":"Print out the blessed system folder for the volume mounted at .Ar directory \\..."},{"forms":["--getBoot"],"desc":"Print out the logical boot device, based on what is currently selected. This ..."},{"forms":["--plist"],"desc":"Output all information in Property List (.plist) format, suitable for parsing..."},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--version"],"desc":"Print bless version and exit immediately"},{"forms":["--unbless"],"desc":"Use the HFS+ volume mounted at .Ar directory and unset any persistent blessed..."},{"forms":["--folder"],"desc":"Set this directory to be the Mac OS X/Darwin blessed directory, containing a ..."},{"forms":["--file"],"desc":"Set this file to be the Mac OS X/Darwin blessed boot file, containing a boote..."},{"forms":["--personalize"],"desc":"Attempts to do a personalization operation on the target, which validates the..."},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--mount"],"desc":"Use the volume mounted at .Ar directory to change the active boot device, in ..."},{"forms":["--setBoot"],"desc":"The volume must already be properly blessed"},{"forms":["--nextonly"],"desc":"Only change the boot device selection for the next boot"},{"forms":["--create-snapshot"],"desc":"Attempts to create an APFS root snapshot of the target APFS system volume and..."},{"forms":["--snapshot"],"desc":"Set specific snapshot (uuid) as root snapshot of the system volume. The targe..."},{"forms":["--snapshotname"],"desc":"Set specific snapshot (name) as root snapshot of the system volume. The targe..."},{"forms":["--last-sealed-snapshot"],"desc":"Reverts back to using the previously signed APFS root snapshot reenabling Aut..."},{"forms":["--user"],"desc":"Collect a local owner username to authorize boot policy modification"},{"forms":["--stdinpass"],"desc":"Collect a local owner password from stdin without prompting"},{"forms":["--passpromt"],"desc":"Explicitly ask to be prompted for the password"},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--device"],"desc":"Use the block device .Ar device to change the active boot device. No volumes ..."},{"forms":["--setBoot"],"desc":"Set the system to boot off the specified volume, as with Mount and Device mod..."},{"forms":["--nextonly"],"desc":"Same as for Mount Mode"},{"forms":["--user"],"desc":"Collect a local owner username to authorize boot policy modification"},{"forms":["--stdinpass"],"desc":"Collect a local owner password from stdin without prompting"},{"forms":["--passpromt"],"desc":"Explicitly ask to be prompted for the password"},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--info"],"desc":"bless (Available only for external/removable devices) Print out the blessed s..."},{"forms":["--getBoot"],"desc":"Print out the logical boot device, based on what is currently selected. This ..."},{"forms":["--plist"],"desc":"Output all information in Property List (.plist) format, suitable for parsing..."},{"forms":["--user"],"desc":"Collect a local owner username to authorize boot policy modification"},{"forms":["--stdinpass"],"desc":"Collect a local owner password from stdin without prompting"},{"forms":["--passpromt"],"desc":"Explicitly ask to be prompted for the password"},{"forms":["--quiet"],"desc":"Do not print any output"},{"forms":["--verbose"],"desc":"Print verbose output"},{"forms":["--version"],"desc":"Print bless version and exit immediately"}]} \ No newline at end of file diff --git a/tests/resources/man/in/man8/bless.8 b/tests/resources/man/in/man8/bless.8 new file mode 100644 index 0000000..6fda7e0 --- /dev/null +++ b/tests/resources/man/in/man8/bless.8 @@ -0,0 +1,548 @@ +.Dd July 6, 2022 +.Os "Mac OS X" +.Dt BLESS 8 +.Sh NAME +.Nm bless +.Nd set volume bootability and startup disk options +.Sh SYNOPSIS +.Nm bless +.Fl -help +.Pp +.Nm bless +.Fl -folder Ar directory +.Op Fl -file Ar file +.Op Fl -bootefi Op Ar file +.Op Fl -label Ar name | Fl -labelfile Ar file +.Op Fl -setBoot +.Op Fl -nextonly +.Op Fl -shortform +.Op Fl -legacy +.Op Fl -legacydrivehint Ar device +.Op Fl -options Ar string +.Op Fl -personalize +.Op Fl -create-snapshot +.Op Fl -snapshot +.Op Fl -snapshotname +.Op Fl -last-sealed-snapshot +.Op Fl -quiet | -verbose +.Pp +.Nm bless +.Fl -mount Ar directory +.Op Fl -file Ar file +.Op Fl -setBoot +.Op Fl -nextonly +.Op Fl -shortform +.Op Fl -legacy +.Op Fl -legacydrivehint Ar device +.Op Fl -options Ar string +.Op Fl -personalize +.Op Fl -snapshot +.Op Fl -snapshotname +.Op Fl -create-snapshot +.Op Fl -last-sealed-snapshot +.Op Fl -quiet | -verbose +.Pp +.Nm bless +.Fl -device Ar device +.Op Fl -label Ar name | Fl -labelfile Ar file +.Op Fl -startupfile Ar file +.Op Fl -setBoot +.Op Fl -nextonly +.Op Fl -shortform +.Op Fl -legacy +.Op Fl -legacydrivehint Ar device +.Op Fl -options Ar string +.Op Fl -quiet | -verbose +.Pp +.Nm bless +.Fl -netboot +.Fl -server Ar url +.Op Fl -nextonly +.Op Fl -options Ar string +.Op Fl -quiet | -verbose +.Pp +.Nm bless +.Fl -info Op Ar directory +.Op Fl -getBoot +.Op Fl -plist +.Op Fl -quiet | -verbose +.Op Fl -version +.Pp +.Nm bless +.Fl -unbless Ar directory +.Sh DESCRIPTION +.Nm bless +is used to modify the volume bootability characteristics of filesystems, as well +as select the active boot device. +.Nm bless +has 6 modes of execution: Folder Mode, Mount Mode, Device Mode, NetBoot Mode, +Info Mode, and Unbless Mode. +.Pp +Folder Mode allows you to select a directory on a mounted +volume to act as the +.Do blessed Dc +directory, which causes the system firmware to look in that directory +for boot code. EFI-based systems also support a +.Do blessed Dc +system file, which is the primary mechanism of specifying the booter for +a volume for those systems. In Folder Mode, if you are operating on an HFS+ +volume, the HFS+ Volume Header is updated to reflect the files/directories +given, which persists even if the volume is moved to another system or NVRAM +is cleared. +.Pp +Mount Mode does not make permanent modifications to the filesystem, but rather +set the system firmware to boot from the +specified volume, assuming it has been properly blessed. This is a subset of +the functionality of Folder Mode with the +.Fl -setBoot +option, but is convenient when you don't want to change or interrogate +the filesystem for its blessed status. +.Pp +Device Mode is similar to Mount Mode, but allows selection of unmounted +filesystems, for instance while in single user mode. It can also perform +certain offline modifications to the filesystem, but is not generally recommended. +.Pp +NetBoot Mode sets the system firmware to boot from the network, using a +URL syntax to specify the protocol and server. +.Nm +only sets the local system to go into NetBoot mode, and does not communicate +to the server what image should be used, if there are multiple images. Some +other mechanism, such as using Startup Disk, should be used to select that. +.Pp +Info Mode will print +out the currently\-blessed directory of a volume, or if no mountpoint is +specified, the active boot device that the firmware is set to boot from. +.Pp +Unbless Mode complements Folder Mode, and clears the persistent blessed +folder and file information on HFS+ volumes. +.Pp +NOTE: +.Nm bless +must be run as the root user. +.Pp +Additionally, +.Fl -help +can be used to display the command-line usage summary. +.PP +.Sh OPTIONS FOR INTEL ARCHITECTURE BASED DEVICES: +.LP +.Ss FILE/FOLDER MODE +Folder Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -folder Ar directory +Set this directory to be the Mac OS X/Darwin blessed directory, containing a +.Pa BootX +secondary loader for New World machines. +.It Fl -file Ar file +Set this file to be the Mac OS X/Darwin blessed boot file, containing a booter +for EFI-based systems. If this option is not provided, a default boot file +is used based on the blessed directory. +Create a +.Pa BootX +file in the Mac OS X/Darwin system folder using +.Ar file +as a source. If +.Ar file +is not provided, a default is used (see FILES), using a path relative +to the mountpoint you are blessing. This attempts to ensure that a +.Pa BootX +is used that is compatible with the OS on the target volume. +.It Fl -bootefi Op Ar file +Create a +.Pa boot.efi +file in the Mac OS X/Darwin system folder using +.Ar file +as a source. If +.Ar file +is not provided, a default is used (see FILES), using a path relative +to the mountpoint you are blessing. This attempts to ensure that a +.Pa boot.efi +is used that is compatible with the OS on the target volume. If +.Fl -file +is also provided, the new file will be created at that path instead. +.It Fl -label Ar name +Render a text label used in the firmware-based OS picker +.It Fl -labelfile Ar file +Use a pre-rendered label used for the firmware-based OS picker +.It Fl -setBoot +Set the system to boot off the specified partition. This is implemented in +a platform-specific manner. On Open Firmware-based systems, the +.Em boot-device +variable is modified. On EFI-based systems, the +.Em efi-boot-device +variable is changed. This is not supported on Apple Silicon based systems. +.It Fl -nextonly +Only change the boot device selection for the next boot. This is only supported +on EFI-based systems. +.It Fl -shortform +Use an abbreviated device path form. This option can allow for booting from +new devices, at the expense of boot time performance. This is only supported +on EFI-based systems. +.It Fl -legacy +If +.Fl -setBoot +is given, set the firmware to boot a legacy BIOS-based operating system +from the specified disk. The active flag of an MBR-partitioned disk is not +modified, which can be done with +.Xr fdisk 8 +\&. This is only supported +on EFI-based systems. +.It Fl -legacydrivehint Ar device +Instruct the firmware to treat the specified whole disk as the primary, +master IDE drive. This is only supported +on EFI-based systems. +.It Fl -options +Set load options associated with the new boot option. This is only supported +on EFI-based systems, and in general should be avoided. Instead, use +.Xr nvram 8 +to set +.Qo boot-args Qc +, which will work with both Open Firmware- and EFI-based systems. +.It Fl -personalize +Attempts to do a personalization operation on the target, which validates the SecureBoot +bundle and ensures that the relevant boot files are signed and valid for this particular +machine. This may require network access, in order to check the signatures. +.It Only one of the following snapshot options can be activated at the same time: +.It Fl -create-snapshot +Attempts to create an APFS root snapshot of the target APFS system volume and set it as root snapshot +of the system volume. The target system will boot from this snapshot on its next boot. +.It Fl -snapshot +Set specific snapshot (uuid) as root snapshot of the system volume. +The target system will boot from this snapshot on its next boot. +.It Fl -snapshotname +Set specific snapshot (name) as root snapshot of the system volume. +The target system will boot from this snapshot on its next boot. +.It Fl -last-sealed-snapshot +Reverts back to using the previously signed APFS root snapshot reenabling Authenticated Root Volume. + The target system will boot from this sealed snapshot on its next boot. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss MOUNT MODE +Mount Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -mount Ar directory +Use the volume mounted at +.Ar directory +to change the active boot device, in conjunction with +.Fl -setBoot . +The volume must already be properly blessed. +.It Fl -file Ar file +Instead of allowing the firmware to discover the booter based on the blessed +directory or file, pass an explicit path to the firmware to boot from. This +can be used to run EFI applications or EFI booters for alternate OSes, but +should not be normally used. This is only supported on EFI-based systems. +.It Fl -setBoot +Same as for Folder Mode. +.It Fl -nextonly +Same as for Folder Mode. +.It Fl -shortform +Same as for Folder Mode. +.It Fl -legacy +Same as for Folder Mode. +.It Fl -legacydrivehint Ar device +Same as for Folder Mode. +.It Fl -options +Same as for Folder Mode. +.It Fl -personalize +Same as for Folder Mode. +.It Fl -create-snapshot +Same as for Folder Mode. +.It Fl -snapshot +Same as for Folder Mode. +.It Fl -snapshotname +Same as for Folder Mode. +.It Fl -last-sealed-snapshot +Same as for Folder Mode. +.It Fl -bootefi +This enables copying required boot objects when +.Fl -create-snapshot +or +.Fl -last-sealed-snapshot +is given. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss DEVICE MODE +Device Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -device Ar device +Use the block device +.Ar device +to change the active boot device. No volumes should be mounted from +.Ar device +\&, and the filesystem should already be properly blessed. +.It Fl -label Ar name +Set the firmware-based OS picker label for the unmounted filesystem, using +.Ar name +\&, which should be in UTF-8 encoding. +.It Fl -labelfile Ar file +Use a pre-rendered label used with the firmware-based OS picker. +.It Fl -setBoot +Set the system to boot off the specified partition, as with Folder and Mount +Modes. +.It Fl -startupfile Ar file +Add the +.Ar file +as the HFS+ StartupFile, and update other information on disk as appropriate +for the startup file type. +.It Fl -nextonly +Same as for Folder Mode. +.It Fl -shortform +Same as for Folder Mode. +.It Fl -options +Same as for Folder Mode. +.It Fl -legacy +Same as for Folder Mode. +.It Fl -legacydrivehint Ar device +Same as for Folder Mode. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss NETBOOT MODE +NetBoot Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -netboot +Instead of setting the active boot selection to a disk-based volume, set the system +to NetBoot. +.It Fl -server Ar protocol://[interface@]server +A URL specification of how to boot the system. Currently, the only +.Em protocol +supported is BSDP ("bsdp"), Apple's Boot Service Discovery Protocol. The +.Em interface +is optional, and the +.Em server +is the IPv4 address of the server in dotted-quad notation. If there is not +a specific server you'd like to use, pass "255.255.255.255" to have the +firmware broadcast for the first available server. Examples of this notation +would be "bsdp://255.255.255.255" and "bsdp://en1@17.203.12.203". +.It Fl -nextonly +Same as for Folder Mode. +.It Fl -options +Same as for Folder Mode. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss INFO MODE +Info Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -info Op Ar directory +Print out the blessed system folder for the volume mounted at +.Ar directory +\&. If +.Ar directory +is not specified, print information for the currently selected boot device +(which may not necessarily be +.So +/ +.Sc +\&). This is not supported on Apple Silicon based systems. +.It Fl -getBoot +Print out the logical boot device, based on what is currently selected. This +option will take into account the fact that the firmware may be pointing to an +auxiliary booter partition, and will print out the corresponding root partition +for those cases. If the system is configured to NetBoot, a URL matching the +format of the +.Fl -server +specification for NetBoot mode will be printed. +.It Fl -plist +Output all information in Property List (.plist) format, suitable +for parsing by CoreFoundation. This is most useful when +.Nm bless +is executed from another program and its standard output must be parsed. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.It Fl -version +Print bless version and exit immediately +.El +.Ss UNBLESS MODE +Unbless Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -unbless Ar directory +Use the HFS+ volume mounted at +.Ar directory +and unset any persistent blessed files/directories in the HFS+ Volume Header. +.PP +.Sh OPTIONS FOR APPLE SILICON DEVICES: +.LP +NOTE: Admin credentials may be prompted when running bless on an Apple silicon platform +(beyond running the tool as an admin user). However, if the volume has been previously +blessed by a different OS instance, then these credentials may not be necessary +or used to bless the target OS. +.Ss FOLDER MODE - Available only for external/removable devices +Folder Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -folder Ar directory +Set this directory to be the Mac OS X/Darwin blessed directory, containing a +booter for EFI-based systems. +.It Fl -file Ar file +Set this file to be the Mac OS X/Darwin blessed boot file, containing a booter +for EFI-based systems. If this option is not provided, a default boot file +is used based on the blessed directory. +.It Fl -personalize +Attempts to do a personalization operation on the target, which validates the SecureBoot +bundle and ensures that the relevant boot files are signed and valid for this particular +machine. This may require network access, in order to check the signatures. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss MOUNT MODE +Mount Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -mount Ar directory +Use the volume mounted at +.Ar directory +to change the active boot device, in conjunction with +.It Fl -setBoot . +The volume must already be properly blessed. +.It Fl -nextonly +Only change the boot device selection for the next boot. +.It Fl -create-snapshot +Attempts to create an APFS root snapshot of the target APFS system volume and set it as root snapshot +of the system volume. The target system will boot from this snapshot on its next boot. +.It Fl -snapshot +Set specific snapshot (uuid) as root snapshot of the system volume. +The target system will boot from this snapshot on its next boot. +.It Fl -snapshotname +Set specific snapshot (name) as root snapshot of the system volume. +The target system will boot from this snapshot on its next boot. +.It Fl -last-sealed-snapshot +Reverts back to using the previously signed APFS root snapshot reenabling Authenticated Root Volume. +The target system will boot from this sealed snapshot on its next boot. +.It Fl -user +Collect a local owner username to authorize boot policy modification. +.It Fl -stdinpass +Collect a local owner password from stdin without prompting. +.It Fl -passpromt +Explicitly ask to be prompted for the password. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss DEVICE MODE +Device Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -device Ar device +Use the block device +.Ar device +to change the active boot device. No volumes should be mounted from +.Ar device +\&, and the filesystem should already be properly blessed. +.It Fl -setBoot +Set the system to boot off the specified volume, as with Mount and Device mode +Modes. +for the startup file type. +.It Fl -nextonly +Same as for Mount Mode. +.It Fl -user +Collect a local owner username to authorize boot policy modification. +.It Fl -stdinpass +Collect a local owner password from stdin without prompting. +.It Fl -passpromt +Explicitly ask to be prompted for the password. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.El +.Ss INFO MODE +Info Mode has the following options: +.Bl -tag -width "xxopenfolderxdirectoryx" -compact +.It Fl -info Op Ar directory +.Nm (Available only for external/removable devices) +Print out the blessed system folder for the volume mounted at +.Ar directory +\&. If +.Ar directory +is not specified, print information for the currently selected boot device +(which may not necessarily be +.So +/ +.Sc +\&). +.It Fl -getBoot +Print out the logical boot device, based on what is currently selected. This +option will take into account the fact that the firmware may be pointing to an +auxiliary booter partition, and will print out the corresponding root partition +for those cases. +.It Fl -plist +Output all information in Property List (.plist) format, suitable +for parsing by CoreFoundation. This is most useful when +.Nm bless +is executed from another program and its standard output must be parsed. +.It Fl -user +Collect a local owner username to authorize boot policy modification. +.It Fl -stdinpass +Collect a local owner password from stdin without prompting. +.It Fl -passpromt +Explicitly ask to be prompted for the password. +.It Fl -quiet +Do not print any output +.It Fl -verbose +Print verbose output +.It Fl -version +Print bless version and exit immediately +.El +.Sh FILES +.It Pa /usr/standalone/i386/boot.efi +Booter for EFI-based systems, used with the +.Fl -bootefi +flag. If the argument to +.Fl -bootefi +is ommitted, this file will be used as the default input. +.It Pa /System/Library/CoreServices +Typical blessed folder for Mac OS X and Darwin +.El +.Sh EXAMPLES +.Ss FOLDER MODE +To bless a volume with only Mac OS X or Darwin, and create the BootX and +boot.efi files as needed: +.Bd -ragged -offset indent +.Nm bless +.Fl -folder +.Qo /Volumes/Mac OS X/System/Library/CoreServices Qc +.Fl -bootefi +.Ed +.Ss MOUNT MODE +To set a volume containing either Mac OS 9 and Mac OS X to be +the active volume: +.Bd -ragged -offset indent +.Nm bless +.Fl -mount +.Qo /Volumes/Mac OS Qc +.Fl -setBoot +.Ed +.Ss NETBOOT MODE +To set the system to NetBoot and broadcast for an available server: +.Bd -ragged -offset indent +.Nm bless +.Fl -netboot +.Fl -server +.Ar bsdp://255.255.255.255 +.Ed +.Ss INFO MODE +To gather information about the currently selected volume (as +determined by the firmware), suitable for piping to a program capable +of parsing Property Lists: +.Bd -ragged -offset indent +.Nm bless +.Fl -info +.Fl -plist +.Ed +.Sh SEE ALSO +.Xr mount 8 , +.Xr newfs 8 , +.Xr nvram 8 From 21becbe6d05d23ba062ef5f04f0af93177dbc42b Mon Sep 17 00:00:00 2001 From: ysthakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:37:15 -0400 Subject: [PATCH 3/4] Rename darwin_bless test to darwin_bless_json --- tests/man_integration_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/man_integration_tests.rs b/tests/man_integration_tests.rs index bc5ee80..2bb04a8 100644 --- a/tests/man_integration_tests.rs +++ b/tests/man_integration_tests.rs @@ -140,6 +140,6 @@ fn podman_ncdu_json() { } #[test] -fn darwin_bless() { +fn darwin_bless_json() { run_test("json", &["bless"], &["--cmds", "^bless"]); } From fababe1ebde166ad51e0910e650e64392c16b385 Mon Sep 17 00:00:00 2001 From: ysthakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:45:32 -0400 Subject: [PATCH 4/4] fix: Fix quote replacement --- src/parse_man/util.rs | 2 +- tests/resources/man/expected/git.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parse_man/util.rs b/src/parse_man/util.rs index 61a7d51..3f1ff2f 100644 --- a/src/parse_man/util.rs +++ b/src/parse_man/util.rs @@ -54,7 +54,7 @@ pub fn remove_groff_formatting(data: &str) -> String { // .replace(".I", "") // This breaks podman since it removes .IX .replace('\u{C}', ""); - let quotes = Regex::new(r"\([ocadlr]q").unwrap(); + let quotes = Regex::new(r"\\\([ocadlr]q").unwrap(); let data = quotes.replace_all(&data, "'"); let data = data.replace(".Pp", ""); // Fish only replaces this one on MacOS diff --git a/tests/resources/man/expected/git.json b/tests/resources/man/expected/git.json index 5f13b03..b06ff08 100644 --- a/tests/resources/man/expected/git.json +++ b/tests/resources/man/expected/git.json @@ -1 +1 @@ -{"name":"git","flags":[{"forms":["-v","--version"],"desc":"Prints the Git suite version that the git program came from. This option is i..."},{"forms":["-h","--help"],"desc":"Prints the synopsis and a list of the most commonly used commands. If the opt..."},{"forms":["-C"],"desc":"Run as if git was started in instead of the current working directory...."},{"forms":["-c"],"desc":"Pass a configuration parameter to the command. The value given will override ..."},{"forms":["--config-env"],"desc":"Like -c =, give configuration variable a value, where instead of the worktree. See gitattributes..."}],"subcommands":[{"name":"log","flags":[{"forms":["--follow"],"desc":"Continue listing the history of a file beyond renames (works only for a singl..."},{"forms":["--no-decorate","--decorate"],"desc":"Print out the ref names of any commits that are shown. If short is specified,..."},{"forms":["--decorate-refs","--decorate-refs-exclude"],"desc":"For each candidate reference, do not use it for decoration if it matches any ..."},{"forms":["--clear-decorations"],"desc":"When specified, this option clears all previous --decorate-refs or --decorate..."},{"forms":["--source"],"desc":"Print out the ref name given on the command line by which each commit was rea..."},{"forms":["--mailmap","--use-mailmap"],"desc":"Use mailmap file to map author and committer names and email addresses to can..."},{"forms":["--full-diff"],"desc":"Without this flag, git log -p ... shows commits that touch the specifie..."},{"forms":["--log-size"],"desc":"Include a line \\(lqlog size \\(rq in the output for each commit, where..."},{"forms":["-L","-L"],"desc":"Trace the evolution of the line range given by ,, or by the funct..."},{"forms":["-n","--max-count"],"desc":"Limit the number of commits to output"},{"forms":["--skip"],"desc":"Skip number commits before starting to show the commit output"},{"forms":["--since","--after"],"desc":"Show commits more recent than a specific date"},{"forms":["--since-as-filter"],"desc":"Show all commits more recent than a specific date. This visits all commits in..."},{"forms":["--until","--before"],"desc":"Show commits older than a specific date"},{"forms":["--author","--committer"],"desc":"Limit the commits output to ones with author/committer header lines that matc..."},{"forms":["--grep-reflog"],"desc":"Limit the commits output to ones with reflog entries that match the specified..."},{"forms":["--grep"],"desc":"Limit the commits output to ones with log message that matches the specified ..."},{"forms":["--all-match"],"desc":"Limit the commits output to ones that match all given --grep, instead of ones..."},{"forms":["--invert-grep"],"desc":"Limit the commits output to ones with log message that do not match the patte..."},{"forms":["-i","--regexp-ignore-case"],"desc":"Match the regular expression limiting patterns without regard to letter case"},{"forms":["--basic-regexp"],"desc":"Consider the limiting patterns to be basic regular expressions; this is the d..."},{"forms":["-E","--extended-regexp"],"desc":"Consider the limiting patterns to be extended regular expressions instead of ..."},{"forms":["-F","--fixed-strings"],"desc":"Consider the limiting patterns to be fixed strings (don't interpret pattern a..."},{"forms":["-P","--perl-regexp"],"desc":"Consider the limiting patterns to be Perl-compatible regular expressions. Sup..."},{"forms":["--remove-empty"],"desc":"Stop when a given path disappears from the tree"},{"forms":["--merges"],"desc":"Print only merge commits. This is exactly the same as --min-parents=2"},{"forms":["--no-merges"],"desc":"Do not print commits with more than one parent. This is exactly the same as -..."},{"forms":["--min-parents","--max-parents","--no-min-parents","--no-max-parents"],"desc":"Show only commits which have at least (or at most) that many parent commits. ..."},{"forms":["--first-parent"],"desc":"When finding commits to include, follow only the first parent commit upon see..."},{"forms":["--exclude-first-parent-only"],"desc":"When finding commits to exclude (with a ^), follow only the first parent comm..."},{"forms":["--not"],"desc":"Reverses the meaning of the ^ prefix (or lack thereof) for all following revi..."},{"forms":["--all"],"desc":"Pretend as if all the refs in refs/, along with HEAD, are listed on the comma..."},{"forms":["--branches"],"desc":"Pretend as if all the refs in refs/heads are listed on the command line as are listed on t..."},{"forms":["--exclude"],"desc":"Do not include refs matching that the next --all, --branches, ..."},{"forms":["--exclude-hidden"],"desc":"Do not include refs that would be hidden by git-fetch, git-receive-pack or gi..."},{"forms":["--reflog"],"desc":"Pretend as if all objects mentioned by reflogs are listed on the command line..."},{"forms":["--alternate-refs"],"desc":"Pretend as if all objects mentioned as ref tips of alternate repositories wer..."},{"forms":["--single-worktree"],"desc":"By default, all working trees will be examined by the following options when ..."},{"forms":["--ignore-missing"],"desc":"Upon seeing an invalid object name in the input, pretend as if the bad input ..."},{"forms":["--bisect"],"desc":"Pretend as if the bad bisection ref refs/bisect/bad was listed and as if it w..."},{"forms":["--stdin"],"desc":"In addition to the listed on the command line, read them from the st..."},{"forms":["--cherry-mark"],"desc":"Like --cherry-pick (see below) but mark equivalent commits with = rather than..."},{"forms":["--cherry-pick"],"desc":"Omit any commit that introduces the same change as another commit on the \\(lq..."},{"forms":["--left-only","--right-only"],"desc":"List only commits on the respective side of a symmetric difference, i.e. only..."},{"forms":["--cherry"],"desc":"A synonym for --right-only --cherry-mark --no-merges; useful to limit the out..."},{"forms":["-g","--walk-reflogs"],"desc":"Instead of walking the commit ancestry chain, walk reflog entries from the mo..."},{"forms":["--merge"],"desc":"After a failed merge, show refs that touch files having a conflict and don't ..."},{"forms":["--boundary"],"desc":"Output excluded boundary commits. Boundary commits are prefixed with -"},{"forms":["--simplify-by-decoration"],"desc":"Commits that are referred by some branch or tag are selected"},{"forms":["--show-pulls"],"desc":"Include all commits from the default mode, but also any merge commits that ar..."},{"forms":["--full-history"],"desc":"Same as the default mode, but does not prune some history"},{"forms":["--dense"],"desc":"Only the selected commits are shown, plus some to have a meaningful history"},{"forms":["--sparse"],"desc":"All commits in the simplified history are shown"},{"forms":["--simplify-merges"],"desc":"Additional option to --full-history to remove some needless merges from the r..."},{"forms":["--ancestry-path"],"desc":"When given a range of commits to display (e.g. commit1..commit2 or commit2 ^c..."},{"forms":["--full-history"],"desc":"This mode differs from the default in one point: always follow all parents of..."},{"forms":["--full-history"],"desc":"Ordinary commits are only included if they are !TREESAME (though this can be ..."},{"forms":["--dense"],"desc":"Commits that are walked are included if they are not TREESAME to any parent"},{"forms":["--sparse"],"desc":"All commits that are walked are included. Note that without --full-history, t..."},{"forms":["--simplify-merges"],"desc":"First, build a history graph in the same way that --full-history with parent ..."},{"forms":["--ancestry-path"],"desc":"Limit the displayed commits to those which are an ancestor of , or wh..."},{"forms":["--show-pulls"],"desc":"In addition to the commits shown in the default history, show each merge comm..."},{"forms":["--date-order"],"desc":"Show no parents before all of its children are shown, but otherwise show comm..."},{"forms":["--author-date-order"],"desc":"Show no parents before all of its children are shown, but otherwise show comm..."},{"forms":["--topo-order"],"desc":"Show no parents before all of its children are shown, and avoid showing commi..."},{"forms":["--reverse"],"desc":"Output the commits chosen to be shown (see Commit Limiting section above) in ..."},{"forms":["--no-walk"],"desc":"Only show the given commits, but do not traverse their ancestors. This has no..."},{"forms":["--do-walk"],"desc":"Overrides a previous --no-walk"},{"forms":["--pretty","--format"],"desc":"Pretty-print the contents of the commit logs in a given format, where instead of the current working directory...."},{"forms":["-c"],"desc":"Pass a configuration parameter to the command. The value given will override ..."},{"forms":["--config-env"],"desc":"Like -c =, give configuration variable a value, where instead of the worktree. See gitattributes..."}],"subcommands":[{"name":"log","flags":[{"forms":["--follow"],"desc":"Continue listing the history of a file beyond renames (works only for a singl..."},{"forms":["--no-decorate","--decorate"],"desc":"Print out the ref names of any commits that are shown. If short is specified,..."},{"forms":["--decorate-refs","--decorate-refs-exclude"],"desc":"For each candidate reference, do not use it for decoration if it matches any ..."},{"forms":["--clear-decorations"],"desc":"When specified, this option clears all previous --decorate-refs or --decorate..."},{"forms":["--source"],"desc":"Print out the ref name given on the command line by which each commit was rea..."},{"forms":["--mailmap","--use-mailmap"],"desc":"Use mailmap file to map author and committer names and email addresses to can..."},{"forms":["--full-diff"],"desc":"Without this flag, git log -p ... shows commits that touch the specifie..."},{"forms":["--log-size"],"desc":"Include a line 'log size ' in the output for each commit, where ,, or by the funct..."},{"forms":["-n","--max-count"],"desc":"Limit the number of commits to output"},{"forms":["--skip"],"desc":"Skip number commits before starting to show the commit output"},{"forms":["--since","--after"],"desc":"Show commits more recent than a specific date"},{"forms":["--since-as-filter"],"desc":"Show all commits more recent than a specific date. This visits all commits in..."},{"forms":["--until","--before"],"desc":"Show commits older than a specific date"},{"forms":["--author","--committer"],"desc":"Limit the commits output to ones with author/committer header lines that matc..."},{"forms":["--grep-reflog"],"desc":"Limit the commits output to ones with reflog entries that match the specified..."},{"forms":["--grep"],"desc":"Limit the commits output to ones with log message that matches the specified ..."},{"forms":["--all-match"],"desc":"Limit the commits output to ones that match all given --grep, instead of ones..."},{"forms":["--invert-grep"],"desc":"Limit the commits output to ones with log message that do not match the patte..."},{"forms":["-i","--regexp-ignore-case"],"desc":"Match the regular expression limiting patterns without regard to letter case"},{"forms":["--basic-regexp"],"desc":"Consider the limiting patterns to be basic regular expressions; this is the d..."},{"forms":["-E","--extended-regexp"],"desc":"Consider the limiting patterns to be extended regular expressions instead of ..."},{"forms":["-F","--fixed-strings"],"desc":"Consider the limiting patterns to be fixed strings (don't interpret pattern a..."},{"forms":["-P","--perl-regexp"],"desc":"Consider the limiting patterns to be Perl-compatible regular expressions. Sup..."},{"forms":["--remove-empty"],"desc":"Stop when a given path disappears from the tree"},{"forms":["--merges"],"desc":"Print only merge commits. This is exactly the same as --min-parents=2"},{"forms":["--no-merges"],"desc":"Do not print commits with more than one parent. This is exactly the same as -..."},{"forms":["--min-parents","--max-parents","--no-min-parents","--no-max-parents"],"desc":"Show only commits which have at least (or at most) that many parent commits. ..."},{"forms":["--first-parent"],"desc":"When finding commits to include, follow only the first parent commit upon see..."},{"forms":["--exclude-first-parent-only"],"desc":"When finding commits to exclude (with a ^), follow only the first parent comm..."},{"forms":["--not"],"desc":"Reverses the meaning of the ^ prefix (or lack thereof) for all following revi..."},{"forms":["--all"],"desc":"Pretend as if all the refs in refs/, along with HEAD, are listed on the comma..."},{"forms":["--branches"],"desc":"Pretend as if all the refs in refs/heads are listed on the command line as are listed on t..."},{"forms":["--exclude"],"desc":"Do not include refs matching that the next --all, --branches, ..."},{"forms":["--exclude-hidden"],"desc":"Do not include refs that would be hidden by git-fetch, git-receive-pack or gi..."},{"forms":["--reflog"],"desc":"Pretend as if all objects mentioned by reflogs are listed on the command line..."},{"forms":["--alternate-refs"],"desc":"Pretend as if all objects mentioned as ref tips of alternate repositories wer..."},{"forms":["--single-worktree"],"desc":"By default, all working trees will be examined by the following options when ..."},{"forms":["--ignore-missing"],"desc":"Upon seeing an invalid object name in the input, pretend as if the bad input ..."},{"forms":["--bisect"],"desc":"Pretend as if the bad bisection ref refs/bisect/bad was listed and as if it w..."},{"forms":["--stdin"],"desc":"In addition to the listed on the command line, read them from the st..."},{"forms":["--cherry-mark"],"desc":"Like --cherry-pick (see below) but mark equivalent commits with = rather than..."},{"forms":["--cherry-pick"],"desc":"Omit any commit that introduces the same change as another commit on the 'oth..."},{"forms":["--left-only","--right-only"],"desc":"List only commits on the respective side of a symmetric difference, i.e. only..."},{"forms":["--cherry"],"desc":"A synonym for --right-only --cherry-mark --no-merges; useful to limit the out..."},{"forms":["-g","--walk-reflogs"],"desc":"Instead of walking the commit ancestry chain, walk reflog entries from the mo..."},{"forms":["--merge"],"desc":"After a failed merge, show refs that touch files having a conflict and don't ..."},{"forms":["--boundary"],"desc":"Output excluded boundary commits. Boundary commits are prefixed with -"},{"forms":["--simplify-by-decoration"],"desc":"Commits that are referred by some branch or tag are selected"},{"forms":["--show-pulls"],"desc":"Include all commits from the default mode, but also any merge commits that ar..."},{"forms":["--full-history"],"desc":"Same as the default mode, but does not prune some history"},{"forms":["--dense"],"desc":"Only the selected commits are shown, plus some to have a meaningful history"},{"forms":["--sparse"],"desc":"All commits in the simplified history are shown"},{"forms":["--simplify-merges"],"desc":"Additional option to --full-history to remove some needless merges from the r..."},{"forms":["--ancestry-path"],"desc":"When given a range of commits to display (e.g. commit1..commit2 or commit2 ^c..."},{"forms":["--full-history"],"desc":"This mode differs from the default in one point: always follow all parents of..."},{"forms":["--full-history"],"desc":"Ordinary commits are only included if they are !TREESAME (though this can be ..."},{"forms":["--dense"],"desc":"Commits that are walked are included if they are not TREESAME to any parent"},{"forms":["--sparse"],"desc":"All commits that are walked are included. Note that without --full-history, t..."},{"forms":["--simplify-merges"],"desc":"First, build a history graph in the same way that --full-history with parent ..."},{"forms":["--ancestry-path"],"desc":"Limit the displayed commits to those which are an ancestor of , or wh..."},{"forms":["--show-pulls"],"desc":"In addition to the commits shown in the default history, show each merge comm..."},{"forms":["--date-order"],"desc":"Show no parents before all of its children are shown, but otherwise show comm..."},{"forms":["--author-date-order"],"desc":"Show no parents before all of its children are shown, but otherwise show comm..."},{"forms":["--topo-order"],"desc":"Show no parents before all of its children are shown, and avoid showing commi..."},{"forms":["--reverse"],"desc":"Output the commits chosen to be shown (see Commit Limiting section above) in ..."},{"forms":["--no-walk"],"desc":"Only show the given commits, but do not traverse their ancestors. This has no..."},{"forms":["--do-walk"],"desc":"Overrides a previous --no-walk"},{"forms":["--pretty","--format"],"desc":"Pretty-print the contents of the commit logs in a given format, where