{"id":538,"date":"2025-07-01T18:19:12","date_gmt":"2025-07-01T10:19:12","guid":{"rendered":"https:\/\/su.f3ck.cc\/?p=538"},"modified":"2025-07-01T19:57:43","modified_gmt":"2025-07-01T11:57:43","slug":"macos-gemini-cli-%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/su.f3ck.cc\/?p=538","title":{"rendered":"macOS Gemini CLI \u5b89\u88c5"},"content":{"rendered":"\n<p>1.\u5b89\u88c5npm<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Download and install nvm:\ncurl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.40.3\/install.sh | bash\n\n# in lieu of restarting the shell\n\\. \"$HOME\/.nvm\/nvm.sh\"\n\n# Download and install Node.js:\nnvm install 22\n\n# Verify the Node.js version:\nnode -v # Should print \"v22.17.0\".\nnvm current # Should print \"v22.17.0\".\n\n# Verify npm version:\nnpm -v # Should print \"10.9.2\".\n<\/code><\/pre>\n\n\n\n<p>2.\u8bbe\u7f6eterminal\u73af\u5883 \u4f7f\u7528API\u6a21\u5f0f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># https:\/\/aistudio.google.com\/app\/apikey  google\u8d26\u6237Gemini api\n echo 'export GEMINI_API_KEY=\"AIzaSyAO0qfzddYCzoPXdRdnXadsDEMP10cOXiw\"' >> ~\/.zshrc\n source ~\/.zshrc      <\/code><\/pre>\n\n\n\n<p>3.\u5b89\u88c5Gemini CLI \u5e76\u9009\u62e9API\u6a21\u5f0f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install -g @google\/gemini-cli                                                 \ngemini<\/code><\/pre>\n\n\n\n<p>4.\u8fd0\u884c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#terminal\u5185\u4e4b\u95f4\u6267\u884c \ngemini<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5b89\u88c5npm 2.\u8bbe\u7f6eterminal\u73af\u5883 \u4f7f\u7528API\u6a21\u5f0f 3.\u5b89\u88c5Gemini CLI \u5e76\u9009\u62e9API\u6a21\u5f0f  &hellip; <a href=\"https:\/\/su.f3ck.cc\/?p=538\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cmacOS Gemini CLI \u5b89\u88c5\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20,18,4,19],"class_list":["post-538","post","type-post","status-publish","format-standard","hentry","category-1","tag-ai","tag-macos","tag-4","tag-19"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":477,"url":"https:\/\/su.f3ck.cc\/?p=477","url_meta":{"origin":538,"position":0},"title":"warp-cli \u89e3\u51b3chatGPT\u8bbf\u95ee\u9650\u5236","author":"suhaha","date":"2023-03-08","format":false,"excerpt":"https:\/\/developers.cloudflare.com\/warp-client\/get-\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":150,"url":"https:\/\/su.f3ck.cc\/?p=150","url_meta":{"origin":538,"position":1},"title":"Authy 2FA app apk","author":"suhaha","date":"2021-04-19","format":false,"excerpt":"https:\/\/su.f3ck.cc\/wp-content\/uploads\/2021\/04\/Twil\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":400,"url":"https:\/\/su.f3ck.cc\/?p=400","url_meta":{"origin":538,"position":2},"title":"Debian 11\u642d\u5efanaiveproxy\u670d\u52a1\u5668","author":"suhaha","date":"2022-12-09","format":false,"excerpt":"naiveproxy \u662f\u57fa\u4e8ecaddy\u4f7f\u7528go\u8bed\u8a00\u5f00\u53d1\u7684\u4e00\u4e2a\u8f6c\u53d1\u670d\u52a1\u5668\u3002\u4f5c\u8005\u7684github\u5730\u5740 ht\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":122,"url":"https:\/\/su.f3ck.cc\/?p=122","url_meta":{"origin":538,"position":3},"title":"iPhone \u201cshadowrocket\u201d app \u5b89\u88c5","author":"suhaha","date":"2021-04-02","format":false,"excerpt":"\u7531\u4e8e\u9700\u8981\u975ecn\u533a\u57df\u7684Apple ID\u5f88\u9ebb\u70e6\uff0c\u4e3a\u4e86\u4e0d\u5fd8\u8bb0\u6240\u4ee5\u5199\u4e2a\u5907\u4efd\u5907\u6ce8\u3002\u5177\u4f53\u4fe1\u606f\u5982\u4e0b\uff1a ID\u540d\u79f0\uff1as\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/04\/img_1509-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/04\/img_1509-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/04\/img_1509-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/04\/img_1509-1.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/su.f3ck.cc\/wp-content\/uploads\/2021\/04\/img_1509-1.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":517,"url":"https:\/\/su.f3ck.cc\/?p=517","url_meta":{"origin":538,"position":4},"title":"How to Resolve \u201cPackage crypto\/ecdh is not in GOROOT\u201d Error in Linux","author":"suhaha","date":"2024-03-13","format":false,"excerpt":"Have you encountered the \u201cPackage crypto\/ecdh is n\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":473,"url":"https:\/\/su.f3ck.cc\/?p=473","url_meta":{"origin":538,"position":5},"title":"chatGPT\u767b\u5f55\uff08Google\u8d26\u6237\uff09\u6d41\u7a0b","author":"suhaha","date":"2023-03-02","format":false,"excerpt":"chatGPT\u767b\u5f55\uff08Google\u8d26\u6237\uff09\u6d41\u7a0b\uff1a1.\u5148\u4e0d\u7ffb\u5899\uff0c\u4fdd\u6301\u7f51\u7edc\u5e72\u51c0\u3002\u5e76\u6e05\u9664\u6d4f\u89c8\u5668\u6709\u5173openai\u2026","rel":"","context":"\u5728\u201c\u7b14\u8bb0\u201d\u4e2d","block_context":{"text":"\u7b14\u8bb0","link":"https:\/\/su.f3ck.cc\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts\/538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=538"}],"version-history":[{"count":2,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts\/538\/revisions"}],"predecessor-version":[{"id":540,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=\/wp\/v2\/posts\/538\/revisions\/540"}],"wp:attachment":[{"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/su.f3ck.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}