<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Dan&apos;s Blog - English</title><description>English blog posts feed</description><link>https://danarnoux.com/</link><language>en-us</language><item><title>Cloudflare Pages Redirects Working but GSC Not Recognizing? Migration Fix &amp; Bulk Redirects Solution</title><link>https://danarnoux.com/blog/cloudflare-pages-gsc-migration-redirect-fix-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/cloudflare-pages-gsc-migration-redirect-fix-en/</guid><description>A detailed analysis of why Google Search Console fails to recognize 301 redirects when migrating from *.pages.dev to a custom domain on Cloudflare Pages, with a reliable solution using Bulk Redirects.</description><pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;When I migrated my site to a new domain using GSC, I ran into a frustrating issue. I had already set up 301 redirects, but GSC just wouldn’t recognize them. I kept seeing the old pages.dev domain still stealing my traffic. Then I found a solution from a blog called Codemzy—and it actually worked.&lt;/p&gt;
&lt;h2 id=&quot;background&quot;&gt;Background&lt;/h2&gt;
&lt;p&gt;When moving a site from &lt;code&gt;*.pages.dev&lt;/code&gt; to a custom domain, passing SEO ranking is the key concern. According to the official docs, the ideal approach is using 301 permanent redirects, so Google knows the original URL has permanently moved to the new address and passes the ranking authority over.&lt;/p&gt;
&lt;p&gt;Here’s the scenario:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Source: &lt;code&gt;https://dansblog.pages.dev&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Target: &lt;code&gt;https://danarnoux.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Expected: Both browser and search engines receive 301 status code&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;the-problem&quot;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;After configuring redirects, testing revealed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Browser works fine&lt;/strong&gt; - Visiting &lt;code&gt;dansblog.pages.dev/any-path&lt;/code&gt; automatically redirects to &lt;code&gt;danarnoux.com/any-path&lt;/code&gt;, seamless for users&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GSC error&lt;/strong&gt; - Google Search Console reports many URLs returning non-301 status codes, migration verification fails&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;cURL test oddities&lt;/strong&gt; - Some tools detect status codes that don’t match expectations&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Very strange: user access works perfectly, but Google just won’t acknowledge it.&lt;/p&gt;
&lt;h2 id=&quot;failed-solutions&quot;&gt;Failed Solutions&lt;/h2&gt;
&lt;h3 id=&quot;solution-1-_redirects-file&quot;&gt;Solution 1: _redirects File&lt;/h3&gt;
&lt;p&gt;Tried configuring in &lt;code&gt;public/_redirects&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://dansblog.pages.dev/* https://danarnoux.com/:splat 301&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;: Browser redirect works, but GSC still doesn’t recognize it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Root cause analysis&lt;/strong&gt; (inference based on Cloudflare official documentation):&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;11-official-documentation-references&quot;&gt;1.1 Official Documentation References&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Bulk Redirects Docs&lt;/strong&gt;:
&lt;a href=&quot;https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/&quot;&gt;https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Bulk Redirects allow you to define URL redirects at the account level and have them executed at the edge.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Redirect Rules Docs&lt;/strong&gt;:
&lt;a href=&quot;https://developers.cloudflare.com/rules/url-forwarding/&quot;&gt;https://developers.cloudflare.com/rules/url-forwarding/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pages _redirects Docs&lt;/strong&gt;:
&lt;a href=&quot;https://developers.cloudflare.com/pages/platform/redirects/&quot;&gt;https://developers.cloudflare.com/pages/platform/redirects/&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“You can define redirects by adding a &lt;code&gt;_redirects&lt;/code&gt; file to your project.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;How Pages Works&lt;/strong&gt;:
&lt;a href=&quot;https://developers.cloudflare.com/pages/platform/how-pages-works/&quot;&gt;https://developers.cloudflare.com/pages/platform/how-pages-works/&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Cloudflare Pages serves your site through Cloudflare’s global network.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h4 id=&quot;12-technical-interpretation&quot;&gt;1.2 Technical Interpretation&lt;/h4&gt;
&lt;p&gt;According to the documentation, the two redirect mechanisms are fundamentally different:&lt;/p&gt;




















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Mechanism&lt;/th&gt;&lt;th&gt;Processing Level&lt;/th&gt;&lt;th&gt;Execution Location&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Pages _redirects&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Project-level (injected at build)&lt;/td&gt;&lt;td&gt;Pages Platform&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Bulk Redirects&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Account-level&lt;/td&gt;&lt;td&gt;Edge Network&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;_redirects&lt;/code&gt; is part of your project, defined via &lt;code&gt;public/_redirects&lt;/code&gt; file, processed by the Pages platform at build time&lt;/li&gt;
&lt;li&gt;Bulk Redirects are a separate Rules system, executed at edge nodes globally, with higher priority than Pages-level config&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4 id=&quot;13-inference&quot;&gt;1.3 Inference&lt;/h4&gt;
&lt;p&gt;Based on Cloudflare’s official documentation, we can confirm:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;_redirects&lt;/code&gt; belongs to Pages project-level redirect configuration&lt;/li&gt;
&lt;li&gt;Bulk Redirects belong to the Rules system, executed directly on Cloudflare’s Edge network&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With that context, here’s a somewhat conservative inference:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;GSC, when performing site migration detection, may more readily recognize 301 redirects returned directly from the Edge layer. For redirects implemented at the Pages layer, it may not consistently recognize them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Important to note:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Neither Cloudflare nor Google has explicitly explained GSC’s judgment logic&lt;/li&gt;
&lt;li&gt;The above conclusions are based solely on documentation structure and actual test results&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;👉 In practice, Bulk Redirects can reliably pass GSC migration verification.&lt;/p&gt;
&lt;h3 id=&quot;solution-2-worker-approach&quot;&gt;Solution 2: Worker Approach&lt;/h3&gt;
&lt;p&gt;Tried writing a Cloudflare Worker to handle redirects.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;: Works, but has instability risks—Workers can fail due to limits, config changes, or other issues.&lt;/p&gt;
&lt;h2 id=&quot;the-fix-bulk-redirects&quot;&gt;The Fix: Bulk Redirects&lt;/h2&gt;
&lt;p&gt;The final solution uses &lt;strong&gt;Cloudflare Bulk Redirects&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Important: Bulk Redirects has a &lt;strong&gt;two-step structure&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First create a Redirect List (rule data)&lt;/li&gt;
&lt;li&gt;Then create a Redirect Rule (activates the rules)&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-1-access-bulk-redirects&quot;&gt;Step 1: Access Bulk Redirects&lt;/h3&gt;
&lt;p&gt;Go to Cloudflare Dashboard:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select your domain (e.g., &lt;code&gt;danarnoux.com&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;On the left sidebar: &lt;strong&gt;Rules → Redirect Rules&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Switch to &lt;strong&gt;Bulk Redirects&lt;/strong&gt; tab&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-2-create-bulk-redirect-list-do-this-first&quot;&gt;Step 2: Create Bulk Redirect List (Do This First)&lt;/h3&gt;
&lt;p&gt;Click:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Create Bulk Redirect List&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fill in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;List name: e.g., &lt;code&gt;pages-dev-redirect&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-3-add-rules-to-the-list&quot;&gt;Step 3: Add Rules to the List&lt;/h3&gt;
&lt;p&gt;Add one rule:&lt;/p&gt;

































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Source URL&lt;/td&gt;&lt;td&gt;&lt;code&gt;https://dansblog.pages.dev/*&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Target URL&lt;/td&gt;&lt;td&gt;&lt;code&gt;https://danarnoux.com/$1&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Status&lt;/td&gt;&lt;td&gt;301 (or use 302 for testing first)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Preserve query string&lt;/td&gt;&lt;td&gt;Optional&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Subpath matching&lt;/td&gt;&lt;td&gt;ON&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Preserve path suffix&lt;/td&gt;&lt;td&gt;ON&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Key points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;*&lt;/code&gt; to match all paths&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;$1&lt;/code&gt; to preserve the original path&lt;/li&gt;
&lt;li&gt;Recommend using &lt;strong&gt;302&lt;/strong&gt; first to test, then switch to &lt;strong&gt;301&lt;/strong&gt; when confirmed&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;markdown-alert markdown-alert-note&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;note&lt;/p&gt;
&lt;p&gt;In “Add URLs”, click “Or, Manually add URL redirects”, then remember to click “Edit parameters”.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;About the options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Subpath matching / Preserve path suffix&lt;/strong&gt;: Recommend turning these on, otherwise paths may not pass correctly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Preserve query string&lt;/strong&gt;: Whether to enable depends on your needs (e.g., if you need to keep URL parameters). Disabling it still allows migration to complete normally.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-4-create-bulk-redirect-rule-activate-the-rules&quot;&gt;Step 4: Create Bulk Redirect Rule (Activate the Rules)&lt;/h3&gt;
&lt;p&gt;Go back to Bulk Redirects page:&lt;/p&gt;
&lt;p&gt;Click:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Create Bulk Redirect Rule&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Configure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rule name: e.g., &lt;code&gt;pages.dev redirect&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Redirect using list: Select the List you just created&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-5-enable-the-rule&quot;&gt;Step 5: Enable the Rule&lt;/h3&gt;
&lt;p&gt;After saving, make sure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rule status is ✅ Enabled (green)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;👉 Note:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you only create a List without a Rule, it won’t take effect&lt;/p&gt;
&lt;p&gt;For reference, check the example in step 1—note that Status shows “Active”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-6-wait-for-activation&quot;&gt;Step 6: Wait for Activation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Click Save / Deploy&lt;/li&gt;
&lt;li&gt;Usually takes effect within 1-2 minutes&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;summary&quot;&gt;Summary&lt;/h3&gt;
&lt;p&gt;The correct flow for Bulk Redirects:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;List (define rules) → Rule (enable rules) → Edge execution&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;key-difference&quot;&gt;Key Difference&lt;/h3&gt;
&lt;p&gt;Essential difference between Bulk Redirects and _redirects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bulk Redirects are processed directly at Cloudflare’s network edge (Edge), without going through the Pages layer&lt;/li&gt;
&lt;li&gt;Higher priority, more stable rules&lt;/li&gt;
&lt;li&gt;More reliable status code returns&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;verification&quot;&gt;Verification&lt;/h2&gt;
&lt;p&gt;After configuration, verify using these methods:&lt;/p&gt;
&lt;h3 id=&quot;1-browser-test&quot;&gt;1. Browser Test&lt;/h3&gt;
&lt;p&gt;Visit the original URL directly to confirm redirect works.&lt;/p&gt;
&lt;h3 id=&quot;2-curl-test&quot;&gt;2. cURL Test&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -I&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://dansblog.pages.dev/blog/test&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Should return 301 + Location: https://danarnoux.com/blog/test&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;3-gsc-verification&quot;&gt;3. GSC Verification&lt;/h3&gt;
&lt;p&gt;In Google Search Console, re-verify the migration. After success, you should see a prompt: &lt;strong&gt;This site is currently being migrated to [danarnoux.com]&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;When migrating from &lt;code&gt;*.pages.dev&lt;/code&gt; to a custom domain, the _redirects method works fine in browsers, but GSC may not recognize it. According to the documentation, &lt;strong&gt;Bulk Redirects execute at the Edge layer&lt;/strong&gt;, making status code returns more stable and reliable—recommended for direct use.&lt;/p&gt;
&lt;p&gt;As for why _redirects isn’t recognized by GSC, neither Cloudflare nor Google has explicitly explained GSC’s specific judgment logic. The above is merely an inference based on documentation structure—no absolute conclusion can be drawn. If you value stability, Bulk Redirects is the safer choice.&lt;/p&gt;
&lt;p&gt;Original article from Codemzy: &lt;strong&gt;&lt;a href=&quot;https://www.codemzy.com/blog/cloudflare-pages-dev-redirect&quot;&gt;https://www.codemzy.com/blog/cloudflare-pages-dev-redirect&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</content:encoded><category>Cloudflare</category><category>SEO</category><category>GSC</category><category>guide</category><category>EN</category></item><item><title>OpenClaw Windows Uninstall Guide</title><link>https://danarnoux.com/blog/openclaw-windows-uninstall-guide-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/openclaw-windows-uninstall-guide-en/</guid><description>A simple guide on how to completely uninstall OpenClaw on Windows, including removing config directories and verifying the uninstallation.</description><pubDate>Mon, 16 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;If you no longer need OpenClaw, you can follow these steps to completely uninstall it. It’s kind of funny—I just made a deployment guide a few days ago!&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;1-uninstall-openclaw&quot;&gt;1. Uninstall OpenClaw&lt;/h2&gt;
&lt;p&gt;OpenClaw is installed globally via npm, so uninstalling is simple. Open PowerShell and run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm uninstall &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;g openclaw&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2 id=&quot;2-delete-configuration-files&quot;&gt;2. Delete Configuration Files&lt;/h2&gt;
&lt;p&gt;OpenClaw creates a config directory in your user folder. You can delete it manually.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;: Open CMD or PowerShell and run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;rmdir /s /q &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;USERPROFILE&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;\.openclaw&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Linux / macOS&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;rm&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -rf&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; ~/.openclaw&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2 id=&quot;3-verify-uninstallation&quot;&gt;3. Verify Uninstallation&lt;/h2&gt;
&lt;p&gt;Run the following command:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;version&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you see &lt;code&gt;command not found&lt;/code&gt; or an error saying the command doesn’t exist, the uninstallation was successful.&lt;/p&gt;</content:encoded><category>OpenClaw</category><category>Uninstall</category><category>Tutorial</category></item><item><title>OpenClaw Windows Installation &amp; Configuration Guide (MiniMax / Qwen / Ollama)</title><link>https://danarnoux.com/blog/openclaw-windows-setup-guide-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/openclaw-windows-setup-guide-en/</guid><description>A detailed guide on how to install and configure OpenClaw on Windows, connecting to cloud-based large language models like MiniMax and Qwen, or running local models via Ollama.</description><pubDate>Tue, 10 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;I’ve been thinking about whether to make an OpenClaw deployment tutorial, because the OpenClaw Chinese documentation is already quite detailed. However, I realized that many people might not know that Chinese documentation exists, or still find it confusing even when following the tutorial. Recently, OpenClaw has become extremely popular in China—it’s almost overhyped, like a modern-day “qigong fever.” But I still think it’s worth making a detailed tutorial so you can try deploying it yourself. After all, you won’t know if a product is right for you until you’ve tried it. The idea of having your own Jarvis-like personal AI assistant is quite appealing.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;1-what-is-openclaw&quot;&gt;1. What is OpenClaw?&lt;/h2&gt;
&lt;p&gt;Let me give you a quick overview. &lt;strong&gt;OpenClaw&lt;/strong&gt; (formerly known as Clawdbot—pretty interesting name change, right?) is an open-source AI Agent framework. Simply put, you can think of it as an “AI operating system”—it doesn’t provide AI capabilities itself, but it helps you connect to various large language models to accomplish tasks.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/openclaw-windows-setup-guide/step2.webp&quot; alt=&quot;Openclaw Official Website&quot;&gt;&lt;/p&gt;
&lt;p&gt;Unlike regular chatbots, OpenClaw can do much more:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Operate on file systems&lt;/li&gt;
&lt;li&gt;Execute commands&lt;/li&gt;
&lt;li&gt;Write and debug code&lt;/li&gt;
&lt;li&gt;Search for information&lt;/li&gt;
&lt;li&gt;Integrate with communication tools like Feishu and Telegram&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You just need to pair it with the right model, and it can help you get things done.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;2-how-openclaw-works&quot;&gt;2. How OpenClaw Works&lt;/h2&gt;
&lt;p&gt;Let’s clarify an important concept: &lt;strong&gt;OpenClaw is just a “shell”—you need to provide your own model.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The workflow looks like this:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;You (input) → OpenClaw → AI Model → Return result&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can choose to connect to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cloud Models&lt;/strong&gt;: MiniMax, Qwen (Alibaba Cloud Bailian), OpenAI, Claude, and more&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local Models&lt;/strong&gt;: Models running locally via Ollama&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each approach has its pros and cons, which I’ll explain in detail later.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: This guide includes a dedicated section on configuring Ollama local models—see Section 5.8.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id=&quot;3-deployment-options-and-model-choices&quot;&gt;3. Deployment Options and Model Choices&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Official Documentation&lt;/strong&gt;: For more advanced configuration options, check out the &lt;a href=&quot;https://docs.openclaw.ai/en-US&quot;&gt;OpenClaw English Documentation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Before we start installing, let’s understand the two deployment options and how to choose a model.&lt;/p&gt;
&lt;h3 id=&quot;31-deployment-options-explained&quot;&gt;3.1 Deployment Options Explained&lt;/h3&gt;
&lt;p&gt;OpenClaw has two deployment options:&lt;/p&gt;




















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Deployment&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Best For&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Local Deployment&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Run on your own Windows PC&lt;/td&gt;&lt;td&gt;Personal use, privacy-first, low cost&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Remote Server&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Run on a cloud server (e.g., Linux server)&lt;/td&gt;&lt;td&gt;Multi-user sharing, 24/7 operation&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;This guide focuses on local deployment&lt;/strong&gt;—running OpenClaw on your own Windows PC. While remote server deployment is convenient (vendors handle everything for you), you might actually want your own personal Jarvis on your private computer. While this comes with more risks, you’ll weigh and accept them yourself.&lt;/p&gt;
&lt;h3 id=&quot;32-which-model-should-you-choose&quot;&gt;3.2 Which Model Should You Choose?&lt;/h3&gt;
&lt;p&gt;Before starting installation, decide which model option you’ll use. This affects the configuration steps.&lt;/p&gt;
&lt;h3 id=&quot;cloud-apis-recommended-for-beginners&quot;&gt;Cloud APIs (Recommended for Beginners)&lt;/h3&gt;
&lt;p&gt;Call cloud model APIs with pay-as-you-go pricing (most have free tiers).&lt;/p&gt;




















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Provider&lt;/th&gt;&lt;th&gt;Recommended Model&lt;/th&gt;&lt;th&gt;Features&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;MiniMax&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;M2.5&lt;/td&gt;&lt;td&gt;Great cost-performance, well-optimized for Chinese&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Qwen&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;qwen/qwen3-coder / qwen/qwen3-vl&lt;/td&gt;&lt;td&gt;Strong coding abilities, generous free tier from Alibaba Cloud&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;qwen3-coder is a coding-optimized model released by Alibaba.
| &lt;strong&gt;OpenAI&lt;/strong&gt; | GPT-5 series | Strong all-around capabilities |&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;: No GPU needed, fast responses, reliable capabilities
&lt;strong&gt;Cons&lt;/strong&gt;: Requires payment (but usually has free credits)&lt;/p&gt;
&lt;h3 id=&quot;local-models-ollama&quot;&gt;Local Models (Ollama)&lt;/h3&gt;
&lt;p&gt;Run models on your own computer, completely free, but requires specific hardware.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;: Zero cost, better privacy
&lt;strong&gt;Cons&lt;/strong&gt;: Requires a capable GPU, response speed depends on hardware&lt;/p&gt;
&lt;p&gt;Honestly, most computers can’t really handle this. You can check your GPU configuration. Even the workstation in our lab didn’t go with the Ollama solution—the main issue isn’t just VRAM being enough to run, you also can’t ignore speed. Plus, my setup is already pretty powerful, but I still didn’t choose Ollama. The API solution is pretty good—you just pay a little.&lt;img src=&quot;https://img.danarnoux.com/posts/openclaw-windows-setup-guide/step1.webp&quot; alt=&quot;OpenRouter pricing&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;My Suggestion&lt;/strong&gt;: Beginners should just use a remote API—MiniMax or Qwen works great. Once configured, you can start using it in 5 minutes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;33-how-to-choose-the-right-llm&quot;&gt;3.3 How to Choose the Right LLM&lt;/h3&gt;
&lt;p&gt;Choosing an LLM mainly depends on these factors:&lt;/p&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Factor&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Price&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Cloud APIs charge per usage; different models vary greatly in price&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Speed&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Response speed depends on model size and network&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Context Length&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;How much text it can process; longer = more expensive&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Coding Ability&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Some models are specifically optimized for programming&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Reasoning Ability&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Ability to solve complex problems&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h4 id=&quot;using-the-openrouter-rankings&quot;&gt;Using the OpenRouter Rankings&lt;/h4&gt;
&lt;p&gt;OpenRouter provides a convenient &lt;a href=&quot;https://openrouter.ai/rankings&quot;&gt;Model Rankings&lt;/a&gt; page where you can filter by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Performance&lt;/strong&gt;: Overall benchmark scores&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Price&lt;/strong&gt;: Sorting by input/output prices&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context Length&lt;/strong&gt;: Maximum supported tokens&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Latency&lt;/strong&gt;: Response speed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/openclaw-windows-setup-guide/step3.webp&quot; alt=&quot;OpenRouter rankings&quot;&gt;&lt;/p&gt;
&lt;p&gt;When searching for a specific model on OpenRouter, you can view:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Benchmarks&lt;/strong&gt;: Capability scores in various areas&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pricing&lt;/strong&gt;: Input and output prices&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Context Length&lt;/strong&gt;: Supported context length&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/openclaw-windows-setup-guide/step4.webp&quot; alt=&quot;Model details&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Different ranking systems may use different evaluation methods. For example, some rankings emphasize coding benchmarks while ignoring multimodal capabilities or long context abilities. Rankings should only be used as a reference.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Also, there’s the issue—you can’t ignore pricing just because of model capability. Check your bill later and you’ll be shocked! &lt;img src=&quot;https://img.danarnoux.com/posts/openclaw-windows-setup-guide/step5.webp&quot; alt=&quot;Pricing shock&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recommended Models with Excellent Overall Performance&lt;/strong&gt;:&lt;/p&gt;

































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Model&lt;/th&gt;&lt;th&gt;Features&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;GPT-5 series&lt;/td&gt;&lt;td&gt;Strong all-around, suitable for various scenarios&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Claude 4 Sonnet series&lt;/td&gt;&lt;td&gt;Strong long context, great for handling long texts&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;qwen/qwen3-coder&lt;/td&gt;&lt;td&gt;Strong coding ability, generous free tier&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DeepSeek V3 / V3.2&lt;/td&gt;&lt;td&gt;Strong overall capability, great cost-performance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Gemini 3 Flash series&lt;/td&gt;&lt;td&gt;Fast speed, affordable price&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Gemini series&lt;/td&gt;&lt;td&gt;Strong all-around, excellent at multimodal tasks&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h4 id=&quot;coding-model-recommendations&quot;&gt;Coding Model Recommendations&lt;/h4&gt;
&lt;p&gt;If you’re mainly using OpenClaw &lt;strong&gt;for programming assistance&lt;/strong&gt;, here’s how each model performs:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Most capable coding models&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Claude Opus&lt;/strong&gt; (including Claude 4 Opus series) usually performs exceptionally well on coding tasks&lt;/li&gt;
&lt;li&gt;However, there are limitations:
&lt;ul&gt;
&lt;li&gt;Higher price&lt;/li&gt;
&lt;li&gt;May be unstable to access in China&lt;/li&gt;
&lt;li&gt;Not as well-optimized for Chinese as domestic models&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;If you’re interested, check out the &lt;a href=&quot;https://docs.openclaw.ai/en-US/providers/anthropic&quot;&gt;OpenClaw Official Anthropic Configuration Documentation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;More practical choices for Chinese users&lt;/strong&gt;:&lt;/p&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Model&lt;/th&gt;&lt;th&gt;Features&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;MiniMax M2.5&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Good Chinese understanding, great cost-performance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;qwen/qwen3-coder&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Alibaba’s coding-specific model, generous free tier&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;DeepSeek V3 / V3.2&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Strong overall capability, great cost-performance&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;DeepSeek V3 / V3.2 is the current flagship model in the DeepSeek series with excellent overall capabilities.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: If your network conditions allow and budget is sufficient, Claude Opus is the strongest choice. Otherwise, MiniMax M2.5, qwen/qwen3-coder, or DeepSeek V3/V3.2 are more practical options.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Google Gemini series&lt;/strong&gt; is also very strong in overall capabilities and multimodal tasks. For example, &lt;strong&gt;Nano Banana&lt;/strong&gt; in the Gemini ecosystem performs exceptionally well in image generation and visual content creation. If your needs involve image generation or multimodal understanding, consider the Gemini series.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: Beginners are recommended to start with MiniMax or Qwen—once configured, you can use it in 5 minutes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id=&quot;4-windows-installation-steps&quot;&gt;4. Windows Installation Steps&lt;/h2&gt;
&lt;h3 id=&quot;quick-installation-recommended&quot;&gt;Quick Installation (Recommended)&lt;/h3&gt;
&lt;p&gt;If you just want to &lt;strong&gt;try OpenClaw quickly&lt;/strong&gt;, you can use the official quick install method. Only two steps!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Install OpenClaw&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm install &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;g openclaw@latest&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Run the Setup Wizard&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw onboard &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;install-daemon&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command will automatically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Initialize OpenClaw configuration&lt;/li&gt;
&lt;li&gt;Install the Gateway service&lt;/li&gt;
&lt;li&gt;Create default config files&lt;/li&gt;
&lt;li&gt;Start the OpenClaw service&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Yes, you read that right—just these two commands complete the basic installation!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After installation, you can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Run interactive chat&lt;/strong&gt;: &lt;code&gt;openclaw&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open the web interface&lt;/strong&gt;: &lt;code&gt;openclaw dashboard&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configure models&lt;/strong&gt;: Follow Chapter 5 to configure your preferred models for OpenClaw&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Official Documentation&lt;/strong&gt;: For more details, check out the &lt;a href=&quot;https://docs.openclaw.ai/en-US&quot;&gt;OpenClaw Official Documentation&lt;/a&gt;, especially the &lt;strong&gt;Quick Start&lt;/strong&gt; section.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;If you want to understand the complete OpenClaw installation process and what each step does&lt;/strong&gt;, continue reading the advanced installation tutorial below.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Now let’s start the installation. Just follow the steps in order.&lt;/p&gt;
&lt;h3 id=&quot;41-environment-preparation&quot;&gt;4.1 Environment Preparation&lt;/h3&gt;
&lt;p&gt;You need to have &lt;strong&gt;Node.js&lt;/strong&gt; installed first (LTS version recommended, 22 or higher).&lt;/p&gt;
&lt;h4 id=&quot;installing-nodejs&quot;&gt;Installing Node.js&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Method 1: Direct Installation&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://nodejs.org/en/download/&quot;&gt;Node.js Official Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download Windows Installer (.msi)&lt;/li&gt;
&lt;li&gt;Click Next through the wizard&lt;/li&gt;
&lt;li&gt;If you encounter network issues, refer to my other article: &lt;a href=&quot;https://danarnoux.com/blog/how-to-build-a-personal-blog-en/#nodejs-installation&quot;&gt;Node.js detailed installation steps&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Method 2: nvm (Recommended for managing multiple versions)&lt;/strong&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Install nvm for Windows&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Visit https://github.com/coreybutler/nvm-windows/releases to download&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# After installation, run in PowerShell:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;nvm install &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;22&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;nvm use &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;22&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Verify:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;node &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;v&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Should show v22.x.x&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;v&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Should show 8.x.x&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;switch-npm-registry-recommended-for-china-users&quot;&gt;Switch npm Registry (Recommended for China Users)&lt;/h4&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm config set registry https:&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;registry.npmmirror.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;install-git-optional-but-recommended&quot;&gt;Install Git (Optional but Recommended)&lt;/h4&gt;
&lt;p&gt;Some skills depend on Git—it’s recommended to install:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://git-scm.com/download/win&quot;&gt;Git Official Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;For configuration issues, refer to my article: &lt;a href=&quot;https://danarnoux.com/blog/how-to-get-started-with-programming-en/#git-basics&quot;&gt;Git Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download and install, click Next through the wizard&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;42-modify-execution-policy&quot;&gt;4.2 Modify Execution Policy&lt;/h3&gt;
&lt;p&gt;Windows doesn’t allow running scripts by default—you need to change this setting. Open PowerShell as &lt;strong&gt;Administrator&lt;/strong&gt; and run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;Set-ExecutionPolicy&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;ExecutionPolicy RemoteSigned &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;Scope CurrentUser&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Type &lt;code&gt;Y&lt;/code&gt; to confirm.&lt;/p&gt;
&lt;h3 id=&quot;43-run-the-installation-script&quot;&gt;4.3 Run the Installation Script&lt;/h3&gt;
&lt;p&gt;Now you can install OpenClaw. Execute in PowerShell:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;iwr &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;useb https:&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw.ai&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;install.ps1 &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; iex&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wait a moment—the script will automatically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Detect Node.js environment&lt;/li&gt;
&lt;li&gt;Download and install OpenClaw&lt;/li&gt;
&lt;li&gt;Configure PATH&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When you see &lt;strong&gt;“OpenClaw installed successfully”&lt;/strong&gt;, it’s done.&lt;/p&gt;
&lt;h3 id=&quot;44-setup-wizard&quot;&gt;4.4 Setup Wizard&lt;/h3&gt;
&lt;p&gt;The first run will enter the wizard:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw onboard&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The process goes like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Risk warning → Type &lt;code&gt;yes&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Configuration mode → Select &lt;code&gt;QuickStart&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Model selection → Skip for now, configure manually later&lt;/li&gt;
&lt;li&gt;Channel selection → Skip for now&lt;/li&gt;
&lt;li&gt;Skills package → Select &lt;code&gt;No&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;45-verify-installation&quot;&gt;4.5 Verify Installation&lt;/h3&gt;
&lt;p&gt;You can verify the installation:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Check version&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;version&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Check status&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw status&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Run diagnostics&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw doctor&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Open web panel&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw dashboard&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;openclaw dashboard&lt;/code&gt; will start a local web page, default at &lt;code&gt;http://localhost:8080&lt;/code&gt;. You can visually configure it in your browser.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;5-configuring-ai-models&quot;&gt;5. Configuring AI Models&lt;/h2&gt;
&lt;p&gt;Just installing doesn’t mean it’s ready to use—you need to connect it to a model. Below are instructions for several popular options.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Official Documentation&lt;/strong&gt;: For more configuration details, check out the &lt;a href=&quot;https://docs.openclaw.ai/en-US&quot;&gt;OpenClaw Official Documentation&lt;/a&gt;, which has more detailed provider configuration guides and troubleshooting tips.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;51-must-read-before-configuration-api-concept-explanation&quot;&gt;5.1 Must-Read Before Configuration: API Concept Explanation&lt;/h3&gt;
&lt;p&gt;Before configuring models, let me explain some key concepts:&lt;/p&gt;



































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Concept&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Provider&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Company or platform providing AI model services&lt;/td&gt;&lt;td&gt;MiniMax, Alibaba Cloud, OpenRouter&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Base URL&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Address of the API server&lt;/td&gt;&lt;td&gt;&lt;code&gt;https://api.minimaxi.com/v1&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;API Key&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Key to access the API, like a “password”&lt;/td&gt;&lt;td&gt;&lt;code&gt;sk-xxxxxx&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Model ID&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Name of the specific model&lt;/td&gt;&lt;td&gt;&lt;code&gt;MiniMax-M2.5&lt;/code&gt;, &lt;code&gt;qwen-plus&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Config JSON&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;JSON format for configuration info&lt;/td&gt;&lt;td&gt;Structured config containing the above fields&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Why do you need to configure these?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;OpenClaw needs to know:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Where to find the model (Base URL)&lt;/li&gt;
&lt;li&gt;What credentials to use (API Key)&lt;/li&gt;
&lt;li&gt;Which specific model to use (Model ID)&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;recommended-using-cc-switch-to-manage-multiple-providers&quot;&gt;Recommended: Using cc-switch to Manage Multiple Providers&lt;/h4&gt;
&lt;p&gt;If you plan to configure multiple model providers, it’s recommended to use &lt;strong&gt;cc-switch&lt;/strong&gt; to manage them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Multi-Provider Management&lt;/strong&gt;: One interface to manage all API configurations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One-click Switching&lt;/strong&gt;: Switch between different models anytime without manually changing config&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Environment Variables&lt;/strong&gt;: OpenClaw automatically reads environment variables set by cc-switch&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: See Chapter 6 for a detailed introduction to cc-switch. If you don’t want manual configuration, you can skip this chapter’s provider configuration and directly read the cc-switch section.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;configuration-method-overview&quot;&gt;Configuration Method Overview&lt;/h4&gt;
&lt;p&gt;There are three ways to configure models:&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Method&lt;/th&gt;&lt;th&gt;Difficulty&lt;/th&gt;&lt;th&gt;Best For&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Method 1: CLI Commands&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Users familiar with command line&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Method 2: Edit Config File&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Harder&lt;/td&gt;&lt;td&gt;Users needing batch configuration&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Method 3: Web Page Config (Recommended)&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Easy&lt;/td&gt;&lt;td&gt;Beginner users&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;If you’re not familiar with the command line, &lt;strong&gt;Web Page Configuration (Method 3)&lt;/strong&gt; is recommended—visual interface is easier to get started. See details below in section 5.8.&lt;/p&gt;
&lt;h3 id=&quot;52-configure-minimax&quot;&gt;5.2 Configure MiniMax&lt;/h3&gt;
&lt;p&gt;MiniMax’s M2.5 is quite good—great cost-performance.&lt;/p&gt;
&lt;h4 id=&quot;get-api-key&quot;&gt;Get API Key&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://platform.minimaxi.com/&quot;&gt;MiniMax Open Platform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Register → Real-name authentication&lt;/li&gt;
&lt;li&gt;Go to “API Keys” → Create Key&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Copy and save&lt;/strong&gt;—you can only see it once&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;configuration-command&quot;&gt;Configuration Command&lt;/h4&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Configure MiniMax&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.providers.minimax&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;baseUrl&quot;: &quot;https://api.minimaxi.com/v1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;your_MiniMax_API_Key&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;api&quot;: &quot;openai-completions&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;MiniMax-M2.5&quot;, &quot;name&quot;: &quot;MiniMax M2.5&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;MiniMax-M2.5-highspeed&quot;, &quot;name&quot;: &quot;MiniMax M2.5 High Speed&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Set as default model&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set minimax&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;MiniMax&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;M2.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;safer-approach-environment-variables&quot;&gt;Safer Approach: Environment Variables&lt;/h4&gt;
&lt;p&gt;Store the key in environment variables instead of writing it in config:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Temporary (only valid for current terminal)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;$env.MINIMAX_API_KEY &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;your_Key&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Or permanent&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;System.Environment&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;]::SetEnvironmentVariable(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;MINIMAX_API_KEY&quot;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;your_Key&quot;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;User&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When configuring, use &lt;code&gt;$MINIMAX_API_KEY&lt;/code&gt; instead of the actual key.&lt;/p&gt;
&lt;h4 id=&quot;minimax-coding-plan-recommended-for-programmers&quot;&gt;MiniMax Coding Plan (Recommended for Programmers)&lt;/h4&gt;
&lt;p&gt;If you mainly use it for programming, MiniMax offers a dedicated &lt;strong&gt;Coding Plan&lt;/strong&gt; with better cost-performance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Get API Key and Activate Coding Plan&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://platform.minimaxi.com/&quot;&gt;MiniMax Open Platform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Register → Real-name authentication&lt;/li&gt;
&lt;li&gt;Go to “API Keys” → Create Key&lt;/li&gt;
&lt;li&gt;Go to “Coding Plan” page, activate Coding Plan&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Copy and save&lt;/strong&gt; the API Key&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Configuration Command&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Configure MiniMax Coding Plan&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.providers.minimax&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;baseUrl&quot;: &quot;https://api.minimaxi.com/v1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;your_MiniMax_API_Key&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;api&quot;: &quot;openai-completions&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;MiniMax-M2.5&quot;, &quot;name&quot;: &quot;MiniMax M2.5&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;MiniMax-M2.5-highspeed&quot;, &quot;name&quot;: &quot;MiniMax M2.5 High Speed&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Set as default model&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set minimax&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;MiniMax&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;M2.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: Coding Plan usually has lower calling prices, suitable for high-frequency users.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;53-configure-alibaba-cloud-model-studio&quot;&gt;5.3 Configure Alibaba Cloud Model Studio&lt;/h3&gt;
&lt;p&gt;Alibaba Cloud Model Studio is a large model service platform provided by Alibaba Cloud, which you can use to access Qwen models and more. Besides the standard version, there’s also a dedicated &lt;strong&gt;Coding Plan&lt;/strong&gt; for programming users.&lt;/p&gt;
&lt;h4 id=&quot;get-api-key-1&quot;&gt;Get API Key&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://modelscope.cn/&quot;&gt;Alibaba Cloud Model Studio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Register → Real-name authentication&lt;/li&gt;
&lt;li&gt;Go to “API Keys” → Create Key&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Copy and save&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;activate-coding-plan-recommended-for-programmers&quot;&gt;Activate Coding Plan (Recommended for Programmers)&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://bailian.aliyun.com/&quot;&gt;Alibaba Cloud Bailian&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Go to “Coding Plan” page&lt;/li&gt;
&lt;li&gt;Activate Coding Plan&lt;/li&gt;
&lt;li&gt;Get the dedicated Coding Plan API Key&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;configuration-command-1&quot;&gt;Configuration Command&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Standard Version&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Configure Alibaba Cloud Model Studio&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.providers.qwen&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;baseUrl&quot;: &quot;https://dashscope.aliyuncs.com/compatible-mode/v1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;your_Alibaba_Cloud_API_Key&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;qwen/qwen3-coder&quot;, &quot;name&quot;: &quot;Qwen Coder Model&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;qwen-portal/vision-model&quot;, &quot;name&quot;: &quot;Qwen Vision Model&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;qwen-plus&quot;, &quot;name&quot;: &quot;Qwen Plus&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;qwen-max&quot;, &quot;name&quot;: &quot;Qwen Max&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Set as default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set qwen&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;qwen&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;qwen3&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;coder&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Coding Plan Version&lt;/strong&gt; (if using Alibaba Cloud Coding Plan):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.providers.qwen&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;baseUrl&quot;: &quot;https://coding.dashscope.aliyuncs.com/v1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;your_Coding_Plan_Key&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;qwen3-max-2026-01-23&quot;, &quot;name&quot;: &quot;Qwen3 Max&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;MiniMax-M2.5&quot;, &quot;name&quot;: &quot;MiniMax M2.5&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: Coding Plan usually has lower calling prices or free credits, suitable for high-frequency programming users.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;54-configure-openrouter&quot;&gt;5.4 Configure OpenRouter&lt;/h3&gt;
&lt;p&gt;OpenRouter is a platform that aggregates hundreds of AI models. Through it, you can use a single API Key to access GPT, Claude, DeepSeek, and many other models.&lt;/p&gt;
&lt;h4 id=&quot;get-api-key-2&quot;&gt;Get API Key&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://openrouter.ai/&quot;&gt;OpenRouter Official Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Register account&lt;/li&gt;
&lt;li&gt;Go to “API Keys” → Create Key&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Copy and save&lt;/strong&gt;—you can only see it once&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;configuration-command-2&quot;&gt;Configuration Command&lt;/h4&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.providers.openrouter&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;baseUrl&quot;: &quot;https://openrouter.ai/api/v1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;your_OpenRouter_API_Key&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;openai/gpt-5&quot;, &quot;name&quot;: &quot;GPT-5&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;anthropic/claude-4-sonnet&quot;, &quot;name&quot;: &quot;Claude 4 Sonnet&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;deepseek/deepseek-v3&quot;, &quot;name&quot;: &quot;DeepSeek V3&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;google/gemini-3-flash&quot;, &quot;name&quot;: &quot;Gemini 3 Flash&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Set as default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set openrouter&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openai&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;gpt&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Model IDs on OpenRouter are formatted differently than direct calls—the format is &lt;code&gt;provider/modelname&lt;/code&gt;, like &lt;code&gt;openai/gpt-5&lt;/code&gt;, &lt;code&gt;anthropic/claude-4-sonnet&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Reference&lt;/strong&gt;: Check the &lt;a href=&quot;https://openrouter.ai/rankings&quot;&gt;OpenRouter Rankings&lt;/a&gt; to see model ratings and price rankings as a reference for selection.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;55-configure-siliconflow&quot;&gt;5.5 Configure SiliconFlow&lt;/h3&gt;
&lt;p&gt;SiliconFlow is a domestic AI model aggregation platform in China, offering various model interfaces and is quite friendly for China users.&lt;/p&gt;
&lt;h4 id=&quot;features&quot;&gt;Features&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fast domestic access&lt;/strong&gt;: Servers in China, low latency&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Many model options&lt;/strong&gt;: Supports Qwen, DeepSeek, Llama, and more&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Affordable pricing&lt;/strong&gt;: Pay-per-use with free credits&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;configuration-reference&quot;&gt;Configuration Reference&lt;/h4&gt;
&lt;p&gt;For detailed configuration tutorials, refer to the official documentation:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://docs.siliconflow.cn/cn/usercases/use-siliconcloud-in-OpenClaw&quot;&gt;SiliconFlow Official Configuration Guide&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Basic steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://www.siliconflow.cn/&quot;&gt;SiliconFlow Official Website&lt;/a&gt; to register&lt;/li&gt;
&lt;li&gt;Get API Key&lt;/li&gt;
&lt;li&gt;Configure provider by referring to official docs&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;56-configure-openai&quot;&gt;5.6 Configure OpenAI&lt;/h3&gt;
&lt;p&gt;If you have an OpenAI API Key, you can configure it directly.&lt;/p&gt;
&lt;h4 id=&quot;get-api-key-3&quot;&gt;Get API Key&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://platform.openai.com/&quot;&gt;OpenAI Platform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Go to “API Keys” → Create Key&lt;/li&gt;
&lt;li&gt;Copy and save&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: China users may need to use a VPN to access OpenAI.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;configuration-command-3&quot;&gt;Configuration Command&lt;/h4&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.providers.openai&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;your_OpenAI_API_Key&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;gpt-5&quot;, &quot;name&quot;: &quot;OpenAI GPT-5&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;gpt-4o&quot;, &quot;name&quot;: &quot;GPT-4o&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;gpt-4o-mini&quot;, &quot;name&quot;: &quot;GPT-4o Mini&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Set as default&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set openai&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;gpt&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;57-configure-qwen-oauth-recommended&quot;&gt;5.7 Configure Qwen OAuth (Recommended)&lt;/h3&gt;
&lt;p&gt;Qwen OAuth is the most recommended configuration method because it has &lt;strong&gt;free credits&lt;/strong&gt; and doesn’t require manually getting an API Key—just authorize with your Alibaba Cloud account.&lt;/p&gt;
&lt;h4 id=&quot;configuration-steps&quot;&gt;Configuration Steps&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Run the configuration wizard:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw onboard&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When selecting model provider, choose &lt;strong&gt;Qwen&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select &lt;strong&gt;Qwen OAuth&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A browser window will pop up for you to log in with your Alibaba Cloud account for authorization&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After successful authorization, select the model you want to use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;qwen/qwen3-coder&lt;/code&gt;: Coding-specific&lt;/li&gt;
&lt;li&gt;&lt;code&gt;qwen-portal/vision-model&lt;/code&gt;: Vision understanding&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;manual-configuration-if-wizard-fails&quot;&gt;Manual Configuration (if wizard fails)&lt;/h4&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Run OAuth authorization&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set oauth qwen&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will open a browser for you to complete the authorization process. After authorization completes, the configuration is saved automatically.&lt;/p&gt;
&lt;h3 id=&quot;58-configure-ollama-local-models&quot;&gt;5.8 Configure Ollama Local Models&lt;/h3&gt;
&lt;p&gt;If you have a GPU and want to run models locally (zero API fees), you can use Ollama.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important Concept&lt;/strong&gt;: Ollama is responsible for running models locally, while OpenClaw needs to connect to Ollama through the &lt;strong&gt;Gateway&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;581-install-ollama&quot;&gt;5.8.1 Install Ollama&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://ollama.com/&quot;&gt;Ollama Official Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download the Windows version&lt;/li&gt;
&lt;li&gt;Run the installer—it will start automatically&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;If Ollama website is inaccessible&lt;/strong&gt;, try these domestic mirror sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.newbe.pro/Mirrors/Mirrors-ollama&quot;&gt;https://www.newbe.pro/Mirrors/Mirrors-ollama&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ollama.ruanmao.net/&quot;&gt;https://ollama.ruanmao.net/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ollama defaults to listening at &lt;code&gt;http://localhost:11434&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;For China Users&lt;/strong&gt;: If you’re in Mainland China, you may encounter slow download speeds or unstable connections when downloading models. It’s recommended to configure a domestic mirror source (see below), which can significantly improve download speed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h5 id=&quot;configure-domestic-mirror-sources-optional-recommended-for-china&quot;&gt;Configure Domestic Mirror Sources (Optional, Recommended for China)&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Domestic Mirror List&lt;/strong&gt;:&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Mirror Site&lt;/th&gt;&lt;th&gt;Address&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ModelScope&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://ollama.modelscope.cn&quot;&gt;https://ollama.modelscope.cn&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DeepSeek&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://ollama.deepseek.com&quot;&gt;https://ollama.deepseek.com&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Zhejiang University&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://ollama.zju.edu.cn&quot;&gt;https://ollama.zju.edu.cn&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Domestic Collection&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://www.newbe.pro/Mirrors/Mirrors-ollama&quot;&gt;https://www.newbe.pro/Mirrors/Mirrors-ollama&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Configuration method (Windows):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;# Temporary effect&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;set &lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;OLLAMA_HOST&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;https://ollama.modelscope.cn&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;# Permanent effect&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;setx OLLAMA_HOST https://ollama.modelscope.cn&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Linux / macOS:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; OLLAMA_HOST&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;https://ollama.modelscope.cn&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After configuration, you can use commands like &lt;code&gt;ollama pull qwen3&lt;/code&gt; to download models. If download succeeds, the mirror is working.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Quick Tip&lt;/strong&gt;: If a mirror download fails, try switching to another mirror source.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;582-download-models&quot;&gt;5.8.2 Download Models&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;VRAM Note&lt;/strong&gt;: Larger models require more VRAM. 3B models need about 4-6GB VRAM, 8B models need about 8-12GB VRAM. Choose a suitable model based on your GPU.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Choose based on your PC configuration&lt;/strong&gt;:&lt;/p&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;PC Configuration&lt;/th&gt;&lt;th&gt;Recommended Model&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Entry-level (no discrete GPU or VRAM &amp;#x3C; 4GB)&lt;/td&gt;&lt;td&gt;phi3:mini, qwen2.5:1.8b&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mainstream (4-6GB VRAM)&lt;/td&gt;&lt;td&gt;qwen2.5:3b, qwen2.5-coder:3b, qwen3:4b&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mid-to-high end (8GB+ VRAM)&lt;/td&gt;&lt;td&gt;qwen3:8b, qwen3:14b&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: If Ollama doesn’t support Qwen3 yet, Qwen2.5 is still a great alternative.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Check available models&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;ollama list&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Entry-level model (can run on CPU)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;ollama pull phi3:mini&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Mainstream config - Chat model (recommended)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;ollama pull qwen2.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:3b&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Mainstream config - Coding model&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;ollama pull qwen2.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;coder:3b&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Mid-to-high end - Stronger capability&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;ollama pull qwen3:8b&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: If VRAM isn’t enough, Ollama will automatically use a quantized version, or you can manually pull a quantized version like &lt;code&gt;qwen2.5:3b-q4_K_M&lt;/code&gt;, which uses less VRAM.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;583-configure-openclaw-to-connect-to-ollama&quot;&gt;5.8.3 Configure OpenClaw to Connect to Ollama&lt;/h4&gt;
&lt;p&gt;Configure OpenClaw to connect to local Ollama through Gateway:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.providers.ollama&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;baseUrl&quot;: &quot;http://localhost:18789/v1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;ollama-local&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;qwen2.5:3b&quot;, &quot;name&quot;: &quot;Qwen 2.5 3B&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;qwen2.5-coder:3b&quot;, &quot;name&quot;: &quot;Qwen 2.5 Coder 3B&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;qwen3:8b&quot;, &quot;name&quot;: &quot;Qwen 3 8B&quot; },&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;phi3:mini&quot;, &quot;name&quot;: &quot;Phi-3 Mini&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Set as default (3B model recommended; use qwen3:8b if you have 8GB+ VRAM)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set ollama&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;qwen2.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:3b&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The Gateway address here is &lt;code&gt;http://localhost:18789&lt;/code&gt; (the port you specified when starting Gateway), not Ollama’s direct port &lt;code&gt;11434&lt;/code&gt;. This allows OpenClaw to centrally manage all model connections.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;584-what-is-gateway&quot;&gt;5.8.4 What is Gateway?&lt;/h4&gt;
&lt;p&gt;Gateway is OpenClaw’s &lt;strong&gt;backend service&lt;/strong&gt;. You can think of it as a “translator”—OpenClaw talks to various models through it.&lt;/p&gt;
&lt;p&gt;Simply put:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Gateway is responsible for &lt;strong&gt;centrally managing&lt;/strong&gt; connections to various models&lt;/li&gt;
&lt;li&gt;Gateway is responsible for &lt;strong&gt;handling authentication&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Gateway is responsible for &lt;strong&gt;forwarding requests&lt;/strong&gt; to different model providers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Architecture Diagram&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;You&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   ↓&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;OpenClaw CLI (where you enter commands)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   ↓&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Gateway (manages connections)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   ↓&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Model Providers&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;(MiniMax / Qwen / OpenRouter / Ollama)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why is Gateway needed?&lt;/strong&gt; Through Gateway as a unified entry point, OpenClaw can conveniently connect to various different model providers without configuring separate connection methods for each model.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;585-install-gateway&quot;&gt;5.8.5 Install Gateway&lt;/h4&gt;
&lt;p&gt;Gateway is usually automatically included when you install OpenClaw. If you need to install separately:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm install &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;g @openclaw&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;gateway&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;586-start-gateway&quot;&gt;5.8.6 Start Gateway&lt;/h4&gt;
&lt;p&gt;Gateway is OpenClaw’s core running process, responsible for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Managing model connections&lt;/li&gt;
&lt;li&gt;Providing HTTP / WebSocket API&lt;/li&gt;
&lt;li&gt;Providing web control interface&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Start Gateway (Recommended)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The simplest way is to run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command starts the Gateway service. After starting, the default is:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;http listener: //127.0.0.1:18789&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can open this address in your browser to access the web control interface for model configuration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Common Parameters&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you need customization, you can use these parameters:&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Parameter&lt;/th&gt;&lt;th&gt;Function&lt;/th&gt;&lt;th&gt;Example&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;--port&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Specify port number&lt;/td&gt;&lt;td&gt;&lt;code&gt;--port 8080&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;--verbose&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Show detailed logs for troubleshooting&lt;/td&gt;&lt;td&gt;&lt;code&gt;--verbose&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;--force&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Force occupy the port&lt;/td&gt;&lt;td&gt;&lt;code&gt;--force&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Examples&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Start with specified port&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;port &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;8080&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Show detailed logs&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;verbose&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Force occupy when port is in use&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;force&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;587-advanced-configuration-optional&quot;&gt;5.8.7 Advanced Configuration (Optional)&lt;/h4&gt;
&lt;p&gt;If you want to further customize Gateway:&lt;/p&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Option&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;--hot-reload&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Enable hot-reload, no restart needed for config changes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;SIGUSR1&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Send signal to restart Gateway (Linux/macOS)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;--config&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Specify config file path&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Hot-reload mode&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;port &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;18789&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;hot&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;reload&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;method-1-cli-command-configuration&quot;&gt;Method 1: CLI Command Configuration&lt;/h3&gt;
&lt;p&gt;Use &lt;code&gt;openclaw config set&lt;/code&gt; command to directly configure model parameters.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Syntax&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.provider_name&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;baseUrl&quot;: &quot;https://api.example.com/v1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;your_API_Key&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;model_id&quot;, &quot;name&quot;: &quot;display_name&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt; (Configuring MiniMax):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw config set &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;models.providers.minimax&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; --&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;json &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;baseUrl&quot;: &quot;https://api.minimaxi.com/v1&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;apiKey&quot;: &quot;your_MiniMax_API_Key&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;api&quot;: &quot;openai-completions&quot;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  &quot;models&quot;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;    { &quot;id&quot;: &quot;MiniMax-M2.5&quot;, &quot;name&quot;: &quot;MiniMax M2.5&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;  ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;}&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;: Fast, good for automation scripts
&lt;strong&gt;Cons&lt;/strong&gt;: Need to remember command syntax&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;method-2-edit-config-file&quot;&gt;Method 2: Edit Config File&lt;/h3&gt;
&lt;p&gt;Directly edit OpenClaw’s config file &lt;code&gt;claude.json&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Config file location:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows: &lt;code&gt;%USERPROFILE%\.openclaw\claude.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;macOS/Linux: &lt;code&gt;~/.openclaw/claude.json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example Config&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;{&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;  &quot;models&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    &quot;providers&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;      &quot;minimax&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;        &quot;baseUrl&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;https://api.minimaxi.com/v1&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;        &quot;apiKey&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;your_MiniMax_API_Key&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;        &quot;api&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;openai-completions&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;        &quot;models&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;          { &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;MiniMax-M2.5&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;MiniMax M2.5&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;        ]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;: Batch configuration easy, easy to backup
&lt;strong&gt;Cons&lt;/strong&gt;: Need to manually edit JSON format&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;method-3-web-page-configuration-recommended-for-beginners&quot;&gt;Method 3: Web Page Configuration (Recommended for Beginners)&lt;/h3&gt;
&lt;p&gt;Besides command line and config files, you can also configure models through the &lt;strong&gt;Web Interface&lt;/strong&gt;. This method is more intuitive and suitable for beginners.&lt;/p&gt;
&lt;h4 id=&quot;step-1-start-gateway&quot;&gt;Step 1: Start Gateway&lt;/h4&gt;
&lt;p&gt;Gateway not only provides API services but also has a built-in web control interface. Run in terminal:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command starts the Gateway service and runs in the background.&lt;/p&gt;
&lt;h4 id=&quot;step-2-open-browser-to-access&quot;&gt;Step 2: Open Browser to Access&lt;/h4&gt;
&lt;p&gt;Gateway’s web interface default address is:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;http://127.0.0.1:18789&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Open this address in your browser—you’ll see the Gateway management interface.&lt;/p&gt;
&lt;h4 id=&quot;step-3-enter-configuration-page&quot;&gt;Step 3: Enter Configuration Page&lt;/h4&gt;
&lt;p&gt;Find and click in the interface:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Config → Models&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here you can manage all model configurations.&lt;/p&gt;
&lt;h4 id=&quot;step-4-add-provider-configuration&quot;&gt;Step 4: Add Provider Configuration&lt;/h4&gt;
&lt;p&gt;Taking adding MiniMax as an example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Add Provider&lt;/strong&gt; or similar button&lt;/li&gt;
&lt;li&gt;Select or fill in Provider type&lt;/li&gt;
&lt;li&gt;Fill in the following information:&lt;/li&gt;
&lt;/ol&gt;

















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Base URL&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;https://api.minimaxi.com/v1&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;API Key&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Your MiniMax API Key&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Enable &lt;strong&gt;Auth Header&lt;/strong&gt; option (if needed)&lt;/li&gt;
&lt;li&gt;Fill in API Key&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;step-5-save-configuration&quot;&gt;Step 5: Save Configuration&lt;/h4&gt;
&lt;p&gt;Click &lt;strong&gt;Save&lt;/strong&gt; or &lt;strong&gt;Update&lt;/strong&gt; button to save the configuration.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: After saving, Gateway will automatically refresh the config. You may need to restart OpenClaw for changes to take effect.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The benefits of this method:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Visual operation, no need to remember commands&lt;/li&gt;
&lt;li&gt;See configuration status in real-time&lt;/li&gt;
&lt;li&gt;Suitable for users unfamiliar with command line&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&quot;6-using-cc-switch-to-manage-apis-recommended&quot;&gt;6. Using cc-switch to Manage APIs (Recommended)&lt;/h2&gt;
&lt;p&gt;If you’ve configured multiple model providers, manually changing config each time can be tedious. &lt;strong&gt;cc-switch&lt;/strong&gt; is a cross-platform desktop tool that helps you switch between different AI API configurations with one click. It supports Claude Code, OpenClaw, Gemini, and more.&lt;/p&gt;
&lt;h3 id=&quot;61-why-use-cc-switch&quot;&gt;6.1 Why Use cc-switch?&lt;/h3&gt;
&lt;p&gt;Problems with manually managing API Keys:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Need to separately configure environment variables for each provider&lt;/li&gt;
&lt;li&gt;Switching models requires modifying JSON config&lt;/li&gt;
&lt;li&gt;Easy to get confused with multiple accounts/providers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;cc-switch advantages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Visual interface, no need to edit command line configs&lt;/li&gt;
&lt;li&gt;One-click provider switching&lt;/li&gt;
&lt;li&gt;Supports MCP server management&lt;/li&gt;
&lt;li&gt;Supports Skills/Prompts presets&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;62-how-cc-switch-works&quot;&gt;6.2 How cc-switch Works&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: cc-switch writes the currently enabled provider configuration to &lt;strong&gt;environment variables&lt;/strong&gt;. When OpenClaw starts, it automatically reads these environment variables, so you &lt;strong&gt;don’t need to manually edit OpenClaw’s config file&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This is the convenience of cc-switch: you just switch the provider in cc-switch, then start OpenClaw, and it will automatically use the current configuration.&lt;/p&gt;
&lt;h3 id=&quot;63-install-cc-switch&quot;&gt;6.3 Install cc-switch&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visit &lt;a href=&quot;https://github.com/farion1231/cc-switch/releases&quot;&gt;cc-switch GitHub Releases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download &lt;code&gt;CC-Switch-v{version}-Windows.msi&lt;/code&gt; or portable version&lt;/li&gt;
&lt;li&gt;Run the installer&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;macOS&lt;/strong&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;brew&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; tap&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; farion1231/ccswitch&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;brew&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --cask&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; cc-switch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Linux&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;Supports .deb, .rpm, .AppImage and other formats.&lt;/p&gt;
&lt;h3 id=&quot;64-add-provider&quot;&gt;6.4 Add Provider&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Start cc-switch&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;”+”&lt;/strong&gt; in the top right or “Add Provider”&lt;/li&gt;
&lt;li&gt;Select preset provider (MiniMax, Qwen, etc.)&lt;/li&gt;
&lt;li&gt;Fill in your API Key&lt;/li&gt;
&lt;li&gt;Click “Add”&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;65-switch-provider&quot;&gt;6.5 Switch Provider&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;In the main interface, select the provider you want to use&lt;/li&gt;
&lt;li&gt;Click “Enable”&lt;/li&gt;
&lt;li&gt;Restart OpenClaw (if it’s running)&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;66-openclaw-automatically-uses-current-config&quot;&gt;6.6 OpenClaw Automatically Uses Current Config&lt;/h3&gt;
&lt;p&gt;cc-switch writes the currently enabled provider configuration to environment variables. When OpenClaw starts, it automatically reads these environment variables, so you only need to:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# After switching provider, restart OpenClaw&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw restart&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# or&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw serve&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;OpenClaw will automatically use the API configuration currently enabled in cc-switch.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;7-starting-and-using&quot;&gt;7. Starting and Using&lt;/h2&gt;
&lt;p&gt;After configuring the model, you’re ready to use it.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Interactive chat&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Start web service&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw serve &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;port &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;3000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Start Gateway (if not auto-started)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Web panel&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw dashboard&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Just type text to chat. If tools are configured, it can also help you operate files, search for information, and more.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;8-recommended-configurations&quot;&gt;8. Recommended Configurations&lt;/h2&gt;
&lt;p&gt;For different scenarios, here’s a reference:&lt;/p&gt;



































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Scenario&lt;/th&gt;&lt;th&gt;Recommended Model&lt;/th&gt;&lt;th&gt;Reason&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Programming&lt;/td&gt;&lt;td&gt;qwen/qwen3-coder&lt;/td&gt;&lt;td&gt;Specifically optimized for coding, good GitHub integration&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Vision Understanding&lt;/td&gt;&lt;td&gt;qwen-portal/vision-model&lt;/td&gt;&lt;td&gt;Supports image understanding&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Daily Chat&lt;/td&gt;&lt;td&gt;MiniMax-M2.5&lt;/td&gt;&lt;td&gt;Good Chinese understanding, great cost-performance&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Deep Reasoning&lt;/td&gt;&lt;td&gt;Qwen3-Max&lt;/td&gt;&lt;td&gt;Strong capability&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Local Offline&lt;/td&gt;&lt;td&gt;Ollama qwen2.5:3b&lt;/td&gt;&lt;td&gt;Mainstream config usable, completely free&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;My usual combo&lt;/strong&gt;: Use MiniMax for daily use, switch to qwen/qwen3-coder for programming.&lt;/p&gt;
&lt;p&gt;Switching models is easy:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Switch to MiniMax&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set minimax&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;MiniMax&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;M2.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Switch to Qwen for programming&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set qwen&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;qwen&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;qwen3&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;coder&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Switch to Qwen Vision&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw models set qwen&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;qwen&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;portal&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;vision&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;model&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2 id=&quot;9-common-issues&quot;&gt;9. Common Issues&lt;/h2&gt;
&lt;h3 id=&quot;command-not-found&quot;&gt;Command Not Found&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Check if installed&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm list &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;g openclaw&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Restart PowerShell and try again&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# If still not working, reinstall&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm install &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;g openclaw@latest&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;api-key-error&quot;&gt;API Key Error&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Check if Key is correct, no extra spaces&lt;/li&gt;
&lt;li&gt;Check if there’s still balance&lt;/li&gt;
&lt;li&gt;Recommended to use environment variable method&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;ollama-connection-failed&quot;&gt;Ollama Connection Failed&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Confirm Ollama is running&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;ollama list&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Try accessing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;curl http:&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;localhost:&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;11434&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;gateway-connection-failed&quot;&gt;Gateway Connection Failed&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Confirm Gateway is running&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# If port is occupied, add --force to force start&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;force&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# Or specify another port&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;openclaw gateway run &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;port &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;8080&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;response-too-slow&quot;&gt;Response Too Slow&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Remote API: Check network, or try another model&lt;/li&gt;
&lt;li&gt;Ollama: Consider using smaller models like &lt;code&gt;qwen2.5:3b&lt;/code&gt; or quantized version &lt;code&gt;qwen2.5:3b-q4_K_M&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;installation-script-error&quot;&gt;Installation Script Error&lt;/h3&gt;
&lt;p&gt;Confirm execution policy is changed:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;Set-ExecutionPolicy&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;ExecutionPolicy RemoteSigned &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;Scope CurrentUser&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2 id=&quot;10-alternative-tencent-workflow-ai-workbuddy&quot;&gt;10. Alternative: Tencent Workflow AI (WorkBuddy)&lt;/h2&gt;
&lt;p&gt;If you find OpenClaw deployment too complicated, consider &lt;strong&gt;&lt;a href=&quot;https://copilot.tencent.com/work/&quot;&gt;Tencent Workflow AI&lt;/a&gt;&lt;/strong&gt; (also known as &lt;strong&gt;WorkBuddy&lt;/strong&gt;).&lt;/p&gt;
&lt;h3 id=&quot;what-is-workbuddy&quot;&gt;What is WorkBuddy?&lt;/h3&gt;
&lt;p&gt;WorkBuddy is an AI programming assistant released by Tencent, similar to Cursor and Windsurf products. It &lt;strong&gt;doesn’t require local deployment&lt;/strong&gt;—just use VS Code or JetBrains plugins directly.&lt;/p&gt;
&lt;h3 id=&quot;features-1&quot;&gt;Features&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No deployment needed&lt;/strong&gt;: Install plugin and use immediately&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Generous free credits&lt;/strong&gt;: Tencent provides free usage quotas&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Well-optimized for Chinese&lt;/strong&gt;: Friendly for Chinese developers&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrates Tencent ecosystem&lt;/strong&gt;: Can connect to WeChat, Tencent Cloud, and other services&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;who-its-for&quot;&gt;Who It’s For&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Programming beginners who don’t want to deal with environment setup&lt;/li&gt;
&lt;li&gt;Those who want a plug-and-play experience&lt;/li&gt;
&lt;li&gt;Those who simply want to experience AI programming assistance&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;comparison-with-openclaw&quot;&gt;Comparison with OpenClaw&lt;/h3&gt;






























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Feature&lt;/th&gt;&lt;th&gt;OpenClaw&lt;/th&gt;&lt;th&gt;WorkBuddy&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Deployment&lt;/td&gt;&lt;td&gt;Local deployment&lt;/td&gt;&lt;td&gt;No deployment needed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Customization&lt;/td&gt;&lt;td&gt;High&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Learning curve&lt;/td&gt;&lt;td&gt;Higher&lt;/td&gt;&lt;td&gt;Lower&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cost&lt;/td&gt;&lt;td&gt;Free/Paid&lt;/td&gt;&lt;td&gt;Has free credits&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: If you just want to experience AI programming assistance, WorkBuddy is a simpler choice. If you want higher customization and scalability, OpenClaw is still the better choice.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;This tutorial might still not be detailed enough, but I’ve written a very basic detailed configuration tutorial. I’ll update with more detailed LLM parameter explanations later. I may also update detailed tutorials on integrating OpenClaw with Feishu and more.&lt;/p&gt;</content:encoded><category>OpenClaw</category><category>AI</category><category>MiniMax</category><category>Qwen</category><category>Ollama</category><category>OpenRouter</category><category>OpenAI</category><category>Tutorial</category></item><item><title>Cloudflare Domain Registration Guide</title><link>https://danarnoux.com/blog/how-to-register-a-cloudflare-domain-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/how-to-register-a-cloudflare-domain-en/</guid><description>A step-by-step tutorial on registering a domain with Cloudflare, configuring DNS, and using it for your website or blog.</description><pubDate>Tue, 17 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;I wanted to add some features to my blog lately—GitHub login, Cloudflare ecosystem, SEO optimization, you name it. Problem is, I didn’t have a domain name. Every time I tried to set something up, it just… failed because of that. So I figured, why not just buy one? It’s not that expensive—maybe a few dozen bucks a year. I’ve done this before anyway, just never paid for it myself.&lt;/p&gt;
&lt;h2 id=&quot;why-choose-cloudflare-for-domain-registration&quot;&gt;Why Choose &lt;a href=&quot;https://www.cloudflare.com/&quot;&gt;Cloudflare&lt;/a&gt; for Domain Registration?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.cloudflare.com/products/registrar/&quot;&gt;Cloudflare Registrar&lt;/a&gt; stands out because they &lt;strong&gt;don’t markup prices&lt;/strong&gt;. Unlike traditional registrars that profit from domain sales, Cloudflare uses domains as a gateway to their ecosystem.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;True wholesale pricing&lt;/strong&gt;: Cloudflare promises to sell domains at &lt;strong&gt;cost forever&lt;/strong&gt;. Every penny you pay goes directly to the registry—no hidden fees, and renewal prices stay the same. No “cheap first year, expensive second year” tricks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Free privacy protection&lt;/strong&gt;: WHOIS privacy protection comes standard, hiding your name, email, and address. Other registrars often charge extra for this.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Top-tier security&lt;/strong&gt;: Free enterprise-grade &lt;strong&gt;DNSSEC&lt;/strong&gt; to prevent domain hijacking, plus hardware key support (like YubiKey) for login. Maximum security.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;All-in-one management&lt;/strong&gt;: If you’re deploying on Cloudflare anyway, buying your domain here saves you the DNS wait time. Certificate requests and DNS resolution happen automatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here’s a quick comparison:&lt;/p&gt;






























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;strong&gt;Aspect&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;Cloudflare&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;Traditional Registrars (Aliyun/Tencent/Namecheap)&lt;/strong&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Pricing&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Cost price, no markup&lt;/td&gt;&lt;td&gt;Market price, cheap first year, expensive renewal&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Privacy&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Free by default&lt;/td&gt;&lt;td&gt;Free or extra cost&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Developer-friendly, high integration&lt;/td&gt;&lt;td&gt;Feature-spread, more config needed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;ICP License&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Not supported&lt;/strong&gt; (China MIIT)&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Supported&lt;/strong&gt; (China MIIT)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;One downside: Cloudflare doesn’t support China MIIT ICP filing. Whether you need that depends on your situation. For me, it’s not really necessary—my hosting is on Cloudflare, the only real cost is the domain, and Cloudflare’s CDN works fine in China. If I ever need ICP filing later, I’d need to get a Chinese server and a Chinese domain.&lt;/p&gt;
&lt;p&gt;So if you’re not planning to file in China and you’re using Cloudflare’s ecosystem, &lt;strong&gt;Cloudflare is the endpoint for domains.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Cloudflare account&lt;/li&gt;
&lt;li&gt;Visa card or PayPal&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you don’t have a Cloudflare account yet, just sign up with your Google or GitHub account.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;payment-prep-icbc-student-card-example&quot;&gt;Payment Prep (ICBC Student Card Example)&lt;/h3&gt;
&lt;p&gt;For international payments like Visa or PayPal, it can be tricky if you’re in China. If you can’t find someone to help you pay, you’ll need your own solution. Many banks offer Visa cards for students—here’s an example with ICBC’s Star Sign Card (this is just to help fellow students, not an ad).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Application requirements&lt;/strong&gt;: Undergraduate or above, try to keep student cards under 2-3, online loans (Huabei, Baitiao, etc.) under 2 accounts.&lt;/p&gt;
&lt;p&gt;Card features:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;UnionPay (CNY) + Visa (foreign currency) combo card, regular card, free annual fee.&lt;/li&gt;
&lt;li&gt;Campus version has &lt;strong&gt;0 credit limit&lt;/strong&gt; in most regions! Non-campus version requires work/internship proof.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;11 currency accounts&lt;/strong&gt;—doesn’t affect credit score.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Application steps&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open ICBC app, search “星座卡学生办” (Star Sign Student)&lt;/li&gt;
&lt;li&gt;Select 宇宙星座卡校园版 (VISA + UnionPay)&lt;/li&gt;
&lt;li&gt;Fill in your info and mailing address&lt;/li&gt;
&lt;li&gt;Once you get the card, activate it at a nearby branch&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note: Don’t apply in a different city from where you registered. If your bank is in your hometown but you’re studying in another province, you might not be able to activate it. Pick a convenient location.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Converting to USD&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open ICBC app, search “美元兑换”&lt;/li&gt;
&lt;li&gt;Select 结售汇 → 购汇&lt;/li&gt;
&lt;li&gt;Buy USD as needed&lt;/li&gt;
&lt;li&gt;Check your card’s USD balance after getting the SMS&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Don’t just have exactly enough USD for your domain—some international sites have minimum payment amounts. Worth getting a Visa card anyway, you’ll use it eventually.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;cloudflare-domain-registration-steps&quot;&gt;Cloudflare Domain Registration Steps&lt;/h2&gt;
&lt;p&gt;Go to &lt;a href=&quot;https://www.cloudflare.com/products/registrar/&quot;&gt;https://www.cloudflare.com/products/registrar/&lt;/a&gt; to learn about Cloudflare’s domain registration. You can also find it by searching “Cloudflare domain purchase” or go directly to &lt;a href=&quot;https://dash.cloudflare.com/domains&quot;&gt;https://dash.cloudflare.com/domains&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-register-a-cloudflare-domain/step1.png&quot; alt=&quot;Search domain&quot;&gt;&lt;/p&gt;
&lt;p&gt;Search for your desired domain. Let’s use danarnoux as example—you’ll see many TLD options.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-register-a-cloudflare-domain/step2.png&quot; alt=&quot;Domain results&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here’s a quick reference for common TLDs:&lt;/p&gt;





















































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;strong&gt;TLD&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;Best For&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;Notes&lt;/strong&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;.com&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Generic&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Top choice&lt;/strong&gt;. Blogs, brands&lt;/td&gt;&lt;td&gt;Highest recognition, good for SEO.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;.net&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Generic&lt;/td&gt;&lt;td&gt;Tech blogs, network services&lt;/td&gt;&lt;td&gt;Professional, good .com backup.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;.org&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Non-profit&lt;/td&gt;&lt;td&gt;Open source, communities&lt;/td&gt;&lt;td&gt;Trustworthy, great for non-profit tech communities.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;.io&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Tech&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Tech blogs&lt;/strong&gt;, dev tools&lt;/td&gt;&lt;td&gt;Super popular among programmers.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;.me&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Personal&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Resumes&lt;/strong&gt;, portfolios&lt;/td&gt;&lt;td&gt;Perfect for personal branding.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;.info&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Info&lt;/td&gt;&lt;td&gt;Knowledge bases, docs&lt;/td&gt;&lt;td&gt;Usually cheaper, good for info sites.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;.dev&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Developer&lt;/td&gt;&lt;td&gt;Tutorials, code repos&lt;/td&gt;&lt;td&gt;Google-owned, forced HTTPS, very recognizable.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;You might notice .uk is much cheaper than .com. My advice? &lt;strong&gt;Don’t chase the cheap price.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;.uk&lt;/strong&gt; is the United Kingdom’s country code TLD, managed by Nominet (like .cn for China or .us for the US). You can buy it, but there’s a &lt;strong&gt;UK address requirement&lt;/strong&gt;. Without a UK address, many registrars (including Cloudflare) might reject your registration or require proxy services. If you provide a fake UK address, the domain could get suspended during random audits.&lt;/p&gt;
&lt;p&gt;Just pick what you want. Remember to check availability and &lt;strong&gt;renewal prices&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;buying-the-domain&quot;&gt;Buying the Domain&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Select your domain and click Confirm&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Choose your billing period (years). Decide whether to enable &lt;strong&gt;Automatic renewal&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-register-a-cloudflare-domain/step3.png&quot; alt=&quot;Step 3&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fill in your details and invoice info&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When paying with card, be careful with the security code—three wrong attempts locks your card. You’ll need to report it lost and get a new one.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If your card gets declined, check your USD balance, verify the security code and card number. Contact your bank if needed. One issue I ran into: payment gateway rejected me because of location/IP mismatch. I stopped using Hong Kong nodes and it worked. Try it if you have similar issues—just might be slower.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check your email for the invoice and card balance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to &lt;strong&gt;Domains&lt;/strong&gt; in the sidebar to confirm your purchased domain is there.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2 id=&quot;dns-settings&quot;&gt;DNS Settings&lt;/h2&gt;
&lt;p&gt;Click &lt;strong&gt;Domains&lt;/strong&gt; in the sidebar, then the three dots to configure DNS.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-register-a-cloudflare-domain/step4.png&quot; alt=&quot;Step 4&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can follow my setup—use CNAME for analysis. The redacted parts aren’t important. &lt;strong&gt;Cloudflare Proxy&lt;/strong&gt; (the orange cloud) should be enabled by default for better speed and security. Don’t forget to save.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-register-a-cloudflare-domain/step5.png&quot; alt=&quot;Step 5&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;wrapping-up&quot;&gt;Wrapping Up&lt;/h2&gt;
&lt;p&gt;I won’t go into SSL/TLS details here—Cloudflare sets up a universal certificate by default. I’ll cover more in future posts, like how to do SEO right and GitHub OAuth. Stay tuned!&lt;/p&gt;
&lt;p&gt;Video Guide: &lt;a href=&quot;https://www.bilibili.com/video/BV1tvc6z1EfD/?share_source=copy_web&amp;#x26;vd_source=b29b2491306fe84f395d46cf297dc405&quot;&gt;https://www.bilibili.com/video/BV1tvc6z1EfD/?share_source=copy_web&amp;#x26;vd_source=b29b2491306fe84f395d46cf297dc405&lt;/a&gt;&lt;/p&gt;</content:encoded><category>Cloudflare</category><category>Domain</category><category>Guide</category></item><item><title>How to Get Started with Programming: Tools, Git, and Engineering Thinking</title><link>https://danarnoux.com/blog/how-to-get-started-with-programming-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/how-to-get-started-with-programming-en/</guid><description>From setting up your dev environment to version control, language choices, and engineering thinking, this guide gives beginners a complete and clear path to get started.</description><pubDate>Tue, 17 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;preface&quot;&gt;Preface&lt;/h2&gt;
&lt;p&gt;I’ve always believed this: people can’t imagine things outside what they already know. Even with AI this strong now, you still might not be able to build something you’re truly satisfied with just by prompting. And yes, you might feel anxious too. If AI is so powerful, does learning programming still matter? Won’t programmers be replaced anyway?&lt;/p&gt;
&lt;p&gt;I know you have a lot of questions. In my view, times change and answers change every day. Rules that work today may not work tomorrow, and rules that work tomorrow may not work today either. Instead of staying in the dark, I’d rather you understand at least a bit of how things work. Nothing in this world is really that mystical. If possible, touch it with your own hands. I really like this line: “Practice is the only criterion for testing truth.”&lt;/p&gt;
&lt;p&gt;Learning a skill is an honorable thing, and it can become a lifelong hobby. Whether you’re in middle school or just entered university, I think it’s worth learning how to use computers well, and even how to code and build projects.&lt;/p&gt;
&lt;p&gt;I also think everyone has talent in some area. Sometimes it’s just not discovered yet because of environment or life experience. Maybe I walk past future geniuses every day and they don’t even know it. What I hope is that more students get sparked by one accidental moment when they’re young, then turn that spark into a real hobby.&lt;/p&gt;
&lt;p&gt;As for me, I’m from Zhejiang. In high school we had a technical elective, and the information technology part was Python. Back then our school had an OJ problem site. Everyone loved occupying the computers to solve problems, and in free time we explored a lot of fun stuff. We didn’t realize it then, but that was the start of a different life path for many of us.&lt;/p&gt;
&lt;p&gt;Whether you’re in engineering or the humanities, I still think it’s useful to understand these core ideas. When you make decisions later, I can’t guarantee you won’t feel confused. Sometimes knowing more actually gives you more confusion first. But then a big question mark appears in your mind, and you finally start thinking in a directed way.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;1-what-is-programming&quot;&gt;1. What Is Programming&lt;/h2&gt;
&lt;p&gt;Programming is not as mysterious as it looks. It’s more like an engineering expression skill: break a problem down, arrange the steps, and let the machine execute them reliably.&lt;/p&gt;
&lt;p&gt;You don’t need to understand every low-level detail at the beginning. Just remember one thing first: you’re not writing flashy syntax, you’re building a process that can be reproduced, debugged, and maintained.&lt;/p&gt;
&lt;h3 id=&quot;11-where-programming-sits-in-the-computer-stack&quot;&gt;1.1 Where Programming Sits in the Computer Stack&lt;/h3&gt;
&lt;p&gt;Think of it as a bottom-up chain. At the bottom is hardware: CPU, memory, and storage. The CPU also has its architecture (x86, ARM), which decides which instruction set the machine can understand.&lt;/p&gt;
&lt;p&gt;Above that is the operating system (Windows / Linux / macOS). It manages the hardware and gives programs a unified interface. When your code touches files, network, or windows, the OS is what handles all that underneath.&lt;/p&gt;
&lt;p&gt;Programming languages sit in the middle as a translation layer. You write Python or C, but the machine finally executes lower-level instructions. At the top are applications, like the browser or editor you click every day, or the small tools you build yourself.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What are Windows and Linux?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Windows and Linux are operating systems, not programming languages. You can think of them as managers: they allocate hardware resources and define execution rules.&lt;/p&gt;
&lt;p&gt;I’ve seen many beginners confuse “I can use Windows” with “I can program.” That’s normal. An OS is more like the runtime environment. It decides how programs access files, request memory, and talk to devices.&lt;/p&gt;
&lt;p&gt;The system is the stage, the program is the actor, and the language is how you write the script. Once you separate these roles, a lot of concepts stop mixing together.&lt;/p&gt;
&lt;h3 id=&quot;12-paths-and-directories-path-root-directory-relative-path&quot;&gt;1.2 Paths and Directories: Path, Root Directory, Relative Path&lt;/h3&gt;
&lt;p&gt;You can think of a path as an address and house number. When a program looks for a file, it’s really asking, “Where exactly is it?”&lt;/p&gt;
&lt;p&gt;For example, &lt;code&gt;C:\Users\Dan\Desktop\learning\hello.txt&lt;/code&gt; is a full address. When you use &lt;code&gt;cd&lt;/code&gt; in a terminal, you’re walking to the right floor first, then picking up the file.&lt;/p&gt;
&lt;p&gt;Here’s a very common pitfall: Chinese folder names are not always impossible, but with some toolchains, encoding settings, old libraries, or command-line combinations, non-ASCII paths can occasionally cause weird issues. To reduce random trouble, using English folder names is usually safer: short names like &lt;code&gt;test&lt;/code&gt;, &lt;code&gt;folder&lt;/code&gt;, &lt;code&gt;project&lt;/code&gt;, &lt;code&gt;data&lt;/code&gt;, &lt;code&gt;output&lt;/code&gt; work great.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the root directory&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In Windows, &lt;code&gt;C:\&lt;/code&gt; is a root. You can treat it like a top-level entry point, then beneath it you have user directories, project directories, and data directories. Long paths are just layers going down from this entry.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a relative path&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A relative path is written relative to your current directory. An absolute path like &lt;code&gt;C:\Users\Dan\Desktop\learning\hello.txt&lt;/code&gt; goes straight to the target. A relative path like &lt;code&gt;.\hello.txt&lt;/code&gt; or &lt;code&gt;data\input.txt&lt;/code&gt; starts from where you’re standing now.&lt;/p&gt;
&lt;p&gt;The most common reason relative paths fail is not that the file doesn’t exist, but that you’re in the wrong directory. You think you’re in &lt;code&gt;learning&lt;/code&gt;, but your terminal is still one level above.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows users can skip this short part:&lt;/strong&gt;&lt;br&gt;
On Mac, the root directory is &lt;code&gt;/&lt;/code&gt;, and your home directory is usually &lt;code&gt;/Users/your-username&lt;/code&gt;.&lt;br&gt;
Relative path rules are the same, typically &lt;code&gt;./&lt;/code&gt; and &lt;code&gt;../&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;13-architecture-differences-x86-vs-arm&quot;&gt;1.3 Architecture Differences: x86 vs ARM&lt;/h3&gt;
&lt;p&gt;x86 and ARM are two mainstream CPU architectures. You can treat them as two different machine dialects. Traditional PCs have long been mostly x86, phones and tablets are mostly ARM, and new Macs (Apple Silicon) are ARM too.&lt;/p&gt;
&lt;p&gt;Your code is always translated into instructions the target architecture can execute. Over time you’ll notice: the same code on different devices can have compatibility differences. Often that’s not your coding mistake, just platform differences underneath.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where programming languages fit in this system&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is where people mix things up most easily. Python is not an OS, and C is not a CPU. A language is a translation layer that organizes your ideas into something machines can run.&lt;/p&gt;
&lt;p&gt;Once this position is clear, terms like “system error,” “interpreter version,” and “architecture compatibility” stop feeling like one tangled ball.&lt;/p&gt;
&lt;h3 id=&quot;14-core-programming-concepts-flow-script-variables-coding&quot;&gt;1.4 Core Programming Concepts: Flow, Script, Variables, Coding&lt;/h3&gt;
&lt;p&gt;A grounded example: batch-renaming images in your Downloads folder. First locate the target directory, then filter &lt;code&gt;.jpg&lt;/code&gt; / &lt;code&gt;.png&lt;/code&gt;, then define sorting and naming rules, and finally log failed items and retry.&lt;/p&gt;
&lt;p&gt;You’ll notice what matters is process design, not how many syntax tricks you memorized. That’s algorithmic thinking. Language is a tool; process is the core.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a script?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A script is a small program for a specific task. The point is reducing repetitive work.&lt;/p&gt;
&lt;p&gt;Things like organizing your Downloads folder, batch-renaming files, and auto-summarizing text are all script-friendly. It doesn’t have to be complex to be very practical.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a variable?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A variable is a name for data. Good names make code readable even days later; random names make code turn into riddles quickly.&lt;/p&gt;
&lt;p&gt;If you’re counting images, &lt;code&gt;image_count&lt;/code&gt; needs no explanation. If you call it &lt;code&gt;a1&lt;/code&gt;, even you may have to guess what it means after three days. I made this mistake when I first wrote scripts: the code ran, but a month later I didn’t even want to touch it.&lt;/p&gt;
&lt;p&gt;Variables look small, but they directly affect readability and your debugging speed later.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is coding?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From another angle, coding is not a typing competition. It’s organization ability. You’re breaking an idea into executable structure: where variables go, how flow moves, how functions split, how modules are separated.
Here, “coding” means writing code and turning ideas into programs, not character encodings like UTF-8.&lt;/p&gt;
&lt;p&gt;If the structure is clear, future changes are easier. If the structure is messy, every new feature hurts. It’s normal if this still feels vague now. Start from one rule: write code that you yourself can understand later.&lt;/p&gt;
&lt;h3 id=&quot;15-english-and-reading-errors-important-but-dont-panic&quot;&gt;1.5 English and Reading Errors: Important, But Don’t Panic&lt;/h3&gt;
&lt;p&gt;Don’t turn this into an anxiety competition. You don’t need to memorize a whole dictionary before learning programming. I don’t suggest you pause coding to formally “start learning English first”; learn while doing.&lt;/p&gt;
&lt;p&gt;But one thing is practical: sooner or later you’ll read English errors, English docs, and English issues. Whether you can extract key information directly affects your debugging speed.&lt;/p&gt;
&lt;p&gt;So the goal is not “perfect English.” The goal is: understand core technical words, and understand your own variable names and error messages.&lt;/p&gt;
&lt;h3 id=&quot;16-common-beginner-mistakes-and-mindset&quot;&gt;1.6 Common Beginner Mistakes and Mindset&lt;/h3&gt;
&lt;p&gt;I’ve seen many beginners get stuck in similar places: memorizing syntax without building anything, watching videos without hands-on practice, stopping at the first error, treating AI as magic without verification, or endlessly “preparing” without starting. And for AI specifically, asking it to build a whole website when you don’t know your own requirements is like becoming a vague client; the result often won’t match what you want.&lt;/p&gt;
&lt;p&gt;These are usually rhythm problems, not ability problems. Build one tiny runnable result first, then add complexity step by step. Your mindset gets much steadier that way.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pick the route first, then install tools&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Many beginners get stuck on environment setup before writing a single line of code.&lt;/p&gt;
&lt;p&gt;I recommend deciding direction first: pick Python as your first language, then run the minimum loop: “write -&gt; run -&gt; fix.”&lt;/p&gt;
&lt;p&gt;Once you feel “it runs,” tool details become much easier to digest. Next I’ll talk about language choice first, then environment setup.&lt;/p&gt;
&lt;h2 id=&quot;2-c-or-python&quot;&gt;2. C or Python?&lt;/h2&gt;
&lt;p&gt;I’ll give you a stable recommendation here: learn Python first. Whether you’re from humanities, science/engineering, changing careers, or still in school, Python is usually the easiest way to build early positive feedback.&lt;/p&gt;
&lt;h3 id=&quot;21-why-start-with-python&quot;&gt;2.1 Why Start with Python&lt;/h3&gt;
&lt;p&gt;Python’s biggest advantage is fast feedback. You write a few lines and see a result immediately. That’s huge for beginners, because you keep getting the feeling that “I’m actually moving forward.” If you get timely positive feedback while learning, you’re more likely to stay interested and improve faster. I don’t want your first experience to be pure frustration from starting too hard.&lt;/p&gt;
&lt;p&gt;Its syntax is also more intuitive, and its resources/community are mature. When you hit problems, there are usually workable answers. I’ve seen many beginners quit not because coding is impossible, but because they get no positive feedback for too long. Python is genuinely friendlier here.&lt;/p&gt;
&lt;h3 id=&quot;22-python-in-10-minutes-up-to-loops&quot;&gt;2.2 Python in 10 Minutes (Up to Loops)&lt;/h3&gt;
&lt;p&gt;Let’s define scope first: this part only takes you up to loops, enough to run your first small program. Functions, lists, dicts, and file operations are intentionally not expanded here. You can verify this later after finishing environment setup, or skip to 2.4 for now.&lt;/p&gt;
&lt;p&gt;Think of variables as “naming data.” Clear names make code easier to read.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;name &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;Dan&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;age &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 18&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(name, age)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After running, you should see one line like &lt;code&gt;Dan 18&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;print()&lt;/code&gt; outputs, &lt;code&gt;input()&lt;/code&gt; takes input. &lt;code&gt;input()&lt;/code&gt; returns a string, so convert with &lt;code&gt;int()&lt;/code&gt; before numeric operations.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;age &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; int&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;input&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;请输入你的年龄：&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;明年你是&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, age &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;岁&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After running, enter a number and you’ll see “next year you are xx years old.”&lt;/p&gt;
&lt;p&gt;&lt;code&gt;if&lt;/code&gt; is conditional branching: only execute that branch when the condition is met.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;score &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 72&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; score &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 60&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;及格&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;再练练&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After running, you’ll see &lt;code&gt;Pass&lt;/code&gt; (because the example score is 72).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;for&lt;/code&gt; is commonly used for fixed-count repetition. &lt;code&gt;range(5)&lt;/code&gt; is 0 to 4; &lt;code&gt;range(1, 6)&lt;/code&gt; is 1 to 5.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; range&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(i)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After running, it prints 1 through 5 line by line.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;while&lt;/code&gt; is for “keep looping while condition is true.” For example, accumulate until reaching 100:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;total &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;n &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; total &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 100&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    total &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; n&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    n &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(total, n &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After running, it prints the accumulated result and the last added number (something like &lt;code&gt;105 14&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id=&quot;23-self-learning-entry-and-mini-exercises&quot;&gt;2.3 Self-Learning Entry and Mini Exercises&lt;/h3&gt;
&lt;p&gt;Once you can handle loops, you have enough to start. For functions, lists, dicts, files, and modules, learn them next by yourself. The core isn’t “memorize everything”; it’s learning to search, read docs, and verify outputs.&lt;/p&gt;
&lt;p&gt;A good place to start is Runoob: &lt;a href=&quot;https://www.runoob.com/&quot;&gt;https://www.runoob.com/&lt;/a&gt;. When you meet new syntax, don’t rush to memorize. Run a minimal example first and see exactly what it does.&lt;/p&gt;
&lt;p&gt;Here’s one mini exercise. Get a working result first, then optimize gradually:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Narcissistic numbers&lt;/strong&gt; (also called Armstrong numbers): for an n-digit number, the sum of each digit to the power of n equals the number itself. For 3-digit numbers, it means the sum of cubes of each digit equals the original number. I want you to find all narcissistic numbers in &lt;code&gt;100~999&lt;/code&gt;.&lt;br&gt;
Hint: split into hundreds/tens/ones, cube each digit, compare with the original number.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;24-python-use-cases-and-language-comparison&quot;&gt;2.4 Python Use Cases and Language Comparison&lt;/h3&gt;
&lt;p&gt;Its use cases are broad. In humanities, you can do text analysis, spreadsheet cleaning, and visualization. In economics/finance, common tasks include indicator calculations and report automation. In geography, you can process cloud maps and spatial data. On the science/engineering side, it’s great for experiment data cleaning, batch plotting, parameter scanning, and simple numerical computation. Move one step further and you’ll see it in automation scripts, web backends, AI preprocessing, and training scripts. You don’t need to master all of this at once. Build one small result in the scenario you care about most first; your learning speed will be much higher.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Python vs C: a minimal example&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Same goal: print 1 to 5.&lt;/p&gt;
&lt;p&gt;Python:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; range&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;    print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(i)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;C:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;c&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;#include&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &amp;#x3C;stdio.h&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt; main&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;() {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    for&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 1&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;; i &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x3C;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 5&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;; i&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;++&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;        printf&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;%d\n&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, i);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This example isn’t to say one language is “more advanced.” It’s just to show entry friction differences directly.&lt;/p&gt;
&lt;h3 id=&quot;25-should-you-learn-c-later&quot;&gt;2.5 Should You Learn C Later?&lt;/h3&gt;
&lt;p&gt;Should you learn it? Depends on your direction. Build programming intuition with Python first. If you later move into systems, performance, or low-level work, adding C becomes much smoother.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A minimal starter route&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Learn Python basics first (variables, branching, loops, functions).&lt;/li&gt;
&lt;li&gt;Build one runnable script (for example, batch rename).&lt;/li&gt;
&lt;li&gt;When you hit errors, search, fix, and rerun.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Run this route once, and your foundation is stable.&lt;/p&gt;
&lt;h2 id=&quot;3-development-environment-setup&quot;&gt;3. Development Environment Setup&lt;/h2&gt;
&lt;h3 id=&quot;31-editors-and-ides-why-start-with-vs-code&quot;&gt;3.1 Editors and IDEs: Why Start with VS Code&lt;/h3&gt;
&lt;p&gt;If you’re just starting, I’d suggest Visual Studio Code first.&lt;/p&gt;
&lt;p&gt;Let’s define IDE quickly. IDE (Integrated Development Environment) is like an all-in-one toolkit: editor, debugger, runner, project management, and so on. PyCharm and Visual Studio are typical IDEs.&lt;/p&gt;
&lt;p&gt;I don’t recommend heavy IDEs on day one, not because they’re bad, but because too many features can distract you from the core question: “How does code actually run?” At the beginning, understanding that baseline flow matters more.&lt;/p&gt;
&lt;p&gt;VS Code sits between a plain editor and a heavy IDE: lightweight by default, expandable when needed, enough without overload. That balance is very beginner-friendly.&lt;/p&gt;
&lt;p&gt;The reasons are practical: cross-language support, mature extension ecosystem, usable integrated terminal, and handy Git integration. One unified toolchain means less mental load early on.&lt;/p&gt;
&lt;p&gt;I got stuck during my first setup too. So many options on screen felt overwhelming. That’s normal. Get the toolchain running first; tune habits later.&lt;/p&gt;
&lt;p&gt;Official site: &lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;https://code.visualstudio.com/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Install the minimum set of extensions first; enough is enough:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Python&lt;/code&gt; (&lt;code&gt;ms-python.python&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Pylance&lt;/code&gt; (&lt;code&gt;ms-python.vscode-pylance&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Markdown All in One&lt;/code&gt; (&lt;code&gt;yzhang.markdown-all-in-one&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;GitLens&lt;/code&gt; (&lt;code&gt;eamodio.gitlens&lt;/code&gt;, optional)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;32-python-extension-and-interpreter-what-vs-code-actually-does&quot;&gt;3.2 Python Extension and Interpreter: What VS Code Actually Does&lt;/h3&gt;
&lt;p&gt;This part confuses beginners easily. The &lt;code&gt;Python&lt;/code&gt; and &lt;code&gt;Pylance&lt;/code&gt; extensions mainly provide editor features: syntax highlighting, completion, jump-to-definition, type hints, debugging entry, etc.&lt;/p&gt;
&lt;p&gt;They make writing smoother, but they are not the Python interpreter itself. The key sentence again: &lt;strong&gt;installing Python extension in VS Code does not mean Python is installed on your computer.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One layer deeper: VS Code is mostly your “write code and organize projects” workstation, not the runtime itself. It can call your system terminal, interpreter, and Git, but it does not install Python for you. Whether &lt;code&gt;python&lt;/code&gt; runs in VS Code depends on whether your system has a usable interpreter and correct path config.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;Select Interpreter&lt;/code&gt; action in VS Code is basically telling the editor which Python on your machine this project should use.&lt;/p&gt;
&lt;p&gt;Try this once directly: open VS Code, press &lt;code&gt;Ctrl + Shift + P&lt;/code&gt;, type &lt;code&gt;Python: Select Interpreter&lt;/code&gt;, then choose the &lt;code&gt;learn&lt;/code&gt; environment you created. If you pick the wrong one, VS Code may run a different Python than the one you just installed.&lt;/p&gt;
&lt;p&gt;After selecting correctly, the status bar usually shows the current Python environment/version (position may vary by theme). That’s the most direct success signal.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/programming-3-3-vscode-python.png&quot; alt=&quot;VS Code Python extension example&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;33-vs-code-installation-chinese-language-pack-and-extensions&quot;&gt;3.3 VS Code Installation, Chinese Language Pack, and Extensions&lt;/h3&gt;
&lt;p&gt;Start with the safest path. Don’t tweak too many options at first.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to the VS Code site and download the Windows installer.&lt;br&gt;
You should see a clear &lt;code&gt;Download for Windows&lt;/code&gt; button.&lt;/li&gt;
&lt;li&gt;During installation, recommended options:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Add to PATH&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Open with Code&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;(optional) &lt;code&gt;Register Code as an editor for supported file types&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Launch VS Code after installation.&lt;br&gt;
You should see the left activity bar (Explorer/Search/Source Control/Run/Extensions).&lt;/li&gt;
&lt;li&gt;Open Extensions (the square icon), search and install the Simplified Chinese pack:&lt;br&gt;
&lt;code&gt;Chinese (Simplified) Language Pack for Visual Studio Code&lt;/code&gt; (official Microsoft pack).&lt;/li&gt;
&lt;li&gt;Restart VS Code when prompted.&lt;br&gt;
After restart, UI should switch to Chinese (if not, manually switch display language in Command Palette).&lt;/li&gt;
&lt;li&gt;If you prefer Traditional Chinese, there’s also:&lt;br&gt;
&lt;code&gt;Chinese (Traditional) Language Pack for Visual Studio Code&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Do three things on first launch:
&lt;ul&gt;
&lt;li&gt;Switch UI language to what you’re comfortable with.&lt;/li&gt;
&lt;li&gt;Install the minimal extension list above.&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Ctrl + ~&lt;/code&gt; to open terminal and confirm commands can be entered normally.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Windows users can skip this short part:&lt;/strong&gt;&lt;br&gt;
VS Code also provides a macOS build at &lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;https://code.visualstudio.com/&lt;/a&gt;.&lt;br&gt;
After install, open it directly; extension logic and interpreter selection are basically the same as on Windows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a development environment?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Think of it as your programming workbench. The editor is for writing code, interpreter/compiler turns code into runnable behavior, and terminal is where you run commands and execute programs.&lt;/p&gt;
&lt;p&gt;Package managers (like &lt;code&gt;pip&lt;/code&gt;, &lt;code&gt;conda&lt;/code&gt;) install and manage dependencies, while runtime defines what conditions your code runs under. You don’t need to master everything at once; it’s enough to know these parts work together.&lt;/p&gt;
&lt;h3 id=&quot;34-terminal-and-winr-get-command-line-running-first&quot;&gt;3.4 Terminal and Win+R: Get Command Line Running First&lt;/h3&gt;
&lt;p&gt;What are CMD, PowerShell, and VS Code terminal exactly?&lt;/p&gt;
&lt;p&gt;At first the black window may feel scary, but it’s just a place to type commands.&lt;/p&gt;
&lt;p&gt;They’re all command-line entry points. CMD is simpler and easier to start with. PowerShell is more powerful. VS Code Terminal is basically one of these embedded in your editor so you switch fewer windows.&lt;/p&gt;
&lt;p&gt;Pick one first. I suggest CMD.&lt;/p&gt;
&lt;p&gt;Memorize a few core commands first: &lt;code&gt;cd&lt;/code&gt; to change directory, &lt;code&gt;dir&lt;/code&gt; to list files, &lt;code&gt;mkdir&lt;/code&gt; to create directory, &lt;code&gt;rmdir&lt;/code&gt; to remove empty directory, &lt;code&gt;echo&lt;/code&gt; to output text, &lt;code&gt;cls&lt;/code&gt; to clear screen.&lt;/p&gt;
&lt;p&gt;Try this 3-minute exercise (copy-paste ready):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;mkdir &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;%USERPROFILE%\Desktop\learning&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  # 创建 learning 文件夹&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;cd /d &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;%USERPROFILE%\Desktop\learning&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  # 进入 learning 文件夹（/d 支持切换盘符）&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;echo Hello Programming &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; hello.txt      # 创建并写入 hello.txt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;dir                                     # 查看当前目录内容&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;type hello.txt                          # 查看文件内容&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;mkdir temp                              # 创建 temp 子文件夹&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;rmdir temp                              # 删除空的 temp 子文件夹&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;cls                                     # 清空终端屏幕&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will most likely see: after &lt;code&gt;dir&lt;/code&gt;, &lt;code&gt;hello.txt&lt;/code&gt; appears in the list; after &lt;code&gt;type hello.txt&lt;/code&gt;, output is &lt;code&gt;Hello Programming&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Two common pitfalls: forgetting &lt;code&gt;cd /d&lt;/code&gt; so drive letter doesn’t switch; or creating files before entering &lt;code&gt;learning&lt;/code&gt;, so files appear elsewhere.&lt;/p&gt;
&lt;p&gt;If you understand what each command does, you’ve cleared the first terminal hurdle.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to open system command line (Win + R)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you’re not inside VS Code, open system command line directly: press &lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;cmd&lt;/code&gt;, press Enter.&lt;/p&gt;
&lt;p&gt;After opening, you’ll usually see a prompt like &lt;code&gt;C:\Users\your-username&gt;&lt;/code&gt;. That’s your current directory.&lt;/p&gt;
&lt;p&gt;If you accidentally open PowerShell, no need to panic. Most basic commands still work. Getting the workflow running matters most.&lt;/p&gt;
&lt;p&gt;The terminal at the bottom of VS Code is essentially the same command-line environment embedded in the editor. Many commands follow the exact same logic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mac users can skip this Windows part:&lt;/strong&gt;&lt;br&gt;
On Mac, open Terminal (search &lt;code&gt;Terminal&lt;/code&gt; with Spotlight).&lt;br&gt;
Most commands are similar; Windows commonly uses &lt;code&gt;cmd&lt;/code&gt;, Mac commonly uses &lt;code&gt;bash/zsh&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;35-python-runtime-miniconda-and-installation-route&quot;&gt;3.5 Python Runtime, Miniconda, and Installation Route&lt;/h3&gt;
&lt;p&gt;I recommend Miniconda. Maybe Anaconda can be better in some cases, but I still hope you get familiar with terminal operations.&lt;/p&gt;
&lt;p&gt;I still recommend Miniconda because it’s lightweight, controllable, and great for environment isolation.&lt;/p&gt;
&lt;p&gt;Miniconda official download page: &lt;a href=&quot;https://docs.conda.io/en/latest/miniconda.html&quot;&gt;https://docs.conda.io/en/latest/miniconda.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Remember three words first: Python version (e.g. 3.10, 3.11), packages (third-party libraries like &lt;code&gt;requests&lt;/code&gt;), and virtual environment (each project uses its own dependencies without conflicts).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where is Python actually installed?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are two common ways to install Python. One is direct install from the official Python site: &lt;a href=&quot;https://www.python.org/&quot;&gt;https://www.python.org/&lt;/a&gt;. The other is installing Miniconda, which also includes its own Python.&lt;/p&gt;
&lt;p&gt;Both ways work. Pick one. For beginners, I recommend starting with Miniconda to save trouble when you isolate environments later.&lt;/p&gt;
&lt;p&gt;One more time for the most common misunderstanding: &lt;strong&gt;installing Python extension in VS Code does not mean Python is installed on your computer.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to confirm Python is really installed&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After installation, run this minimum check first:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;python &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;version      # 查看 Python 版本&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;where python          # 查看 python 执行路径&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Normally you’ll see something like &lt;code&gt;Python 3.11.x&lt;/code&gt;, plus a &lt;code&gt;python.exe&lt;/code&gt; path pointing to your Miniconda directory.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;python --version&lt;/code&gt; doesn’t respond or says command not found, PATH is usually not effective yet, or terminal session wasn’t refreshed. If &lt;code&gt;where python&lt;/code&gt; points to a non-Miniconda path, you likely have multiple Python installs or PATH order is pointing to a different one first.&lt;/p&gt;
&lt;p&gt;After changing PATH, remember to close all terminal windows and reopen.&lt;/p&gt;
&lt;p&gt;If you can see both version and clear path, your runtime is basically ready. If not, don’t panic. Most of the time it’s just environment variables or terminal session not refreshed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use Tsinghua Mirror for Acceleration (Strongly recommended for users in mainland China)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Tsinghua open-source mirror: &lt;a href=&quot;https://mirrors.tuna.tsinghua.edu.cn/&quot;&gt;https://mirrors.tuna.tsinghua.edu.cn/&lt;/a&gt;. You can think of the “Tsinghua source” as a synchronized domestic mirror of official repositories. It’s not a modified fork; content still comes from upstream, just via a more stable local route.&lt;/p&gt;
&lt;p&gt;If you’ve tried installing &lt;code&gt;pandas&lt;/code&gt; or &lt;code&gt;numpy&lt;/code&gt; in China, you’ve probably seen commands freeze for a long time. Often that’s not your code, just unstable default source connectivity. Switching to mirror usually makes downloads much smoother.&lt;/p&gt;
&lt;p&gt;If you want to confirm paths yourself: open the mirror homepage, search &lt;code&gt;anaconda&lt;/code&gt;, and you’ll find common channels. &lt;code&gt;pkgs/main&lt;/code&gt; is core packages, &lt;code&gt;pkgs/free&lt;/code&gt; is older compatibility packages, &lt;code&gt;cloud/conda-forge&lt;/code&gt; is community-maintained packages with faster updates.&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;channel&lt;/code&gt; is basically the repository list conda checks in order when resolving packages. Run the following in &lt;strong&gt;Miniconda Prompt&lt;/strong&gt;, not plain CMD:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda config &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/         # 添加主仓库镜像（常用基础包）&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda config &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/         # 添加历史仓库镜像（兼容旧依赖）&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda config &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;add&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;forge/ # 添加 conda&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;forge 镜像（社区包更全）&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda config &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--set &lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;show_channel_urls yes                                                      # 显示包来源通道，排错时更容易定位&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;pip&lt;/code&gt; uses official PyPI by default, which can also be slow on some domestic networks. Setting &lt;code&gt;index-url&lt;/code&gt; becomes persistent:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;pip config&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; set &lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;global.index&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;url https://pypi.tuna.tsinghua.edu.cn/simple  # 设置 pip 默认镜像（持久生效）&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;pip config list                                                            # 查看配置是否生效&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to revert to default source later, run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;pip config unset global.index&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;url  # 取消自定义镜像，恢复默认 PyPI&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;36-miniconda-installation-and-verification-loop&quot;&gt;3.6 Miniconda Installation and Verification Loop&lt;/h3&gt;
&lt;p&gt;I’ll split this into “domestic download” and “international download.” Follow it and you’ll close the loop.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Domestic users (Tsinghua mirror) download path&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;a href=&quot;https://mirrors.tuna.tsinghua.edu.cn/&quot;&gt;https://mirrors.tuna.tsinghua.edu.cn/&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;On the homepage, look at the “download links” module on the right.&lt;/li&gt;
&lt;li&gt;Click the blue button “Get download links”.&lt;/li&gt;
&lt;li&gt;In the popup, switch to “Applications (or Application Software)” tab, select &lt;code&gt;Conda&lt;/code&gt; on the left, then choose &lt;code&gt;Miniconda3-latest (Windows/x86_64, exe)&lt;/code&gt; on the right.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;x86_64&lt;/code&gt; means 64-bit Windows, which is most computers; don’t select Linux &lt;code&gt;.sh&lt;/code&gt; or macOS &lt;code&gt;.pkg&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Downloaded filename usually looks like &lt;code&gt;Miniconda3-latest-Windows-x86_64.exe&lt;/code&gt;; this format is normally correct.&lt;/li&gt;
&lt;li&gt;Save the &lt;code&gt;.exe&lt;/code&gt; installer to an English-path directory (like &lt;code&gt;Downloads&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/programming-3-6-tsinghua-miniconda.png&quot; alt=&quot;Tsinghua mirror Miniconda download page&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;International users (official site) download path&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;a href=&quot;https://docs.conda.io/en/latest/miniconda.html&quot;&gt;https://docs.conda.io/en/latest/miniconda.html&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Find &lt;code&gt;Windows 64-bit Installer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Download the corresponding &lt;code&gt;.exe&lt;/code&gt; installer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Windows users can skip this short part:&lt;/strong&gt;&lt;br&gt;
Mac users can download macOS builds on the same page (choose Apple Silicon / Intel based on your device).&lt;br&gt;
After installation, run &lt;code&gt;conda --version&lt;/code&gt; in Terminal for a minimum verification.&lt;/p&gt;
&lt;p&gt;After download, installation steps are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Double-click installer.&lt;/li&gt;
&lt;li&gt;For user scope, &lt;code&gt;Just Me&lt;/code&gt; is recommended (less permission issues on personal machines).&lt;/li&gt;
&lt;li&gt;Installation path recommendation: &lt;code&gt;C:\Miniconda3&lt;/code&gt;; avoid Chinese path and spaces.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Add Miniconda to PATH&lt;/code&gt;: if this is your first install, checking it is recommended so &lt;code&gt;python&lt;/code&gt; and &lt;code&gt;conda&lt;/code&gt; work directly in CMD. If you later manage multiple Python versions, you can adopt stricter isolation workflows.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Register Miniconda as default Python&lt;/code&gt; is recommended, so common tools prioritize this Python. If your existing projects depend on another Python, decide based on your situation.&lt;/li&gt;
&lt;li&gt;After installation, search Start Menu and open &lt;code&gt;Miniconda Prompt&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you don’t want to modify system PATH, you can leave it unchecked; but for beginners, checking it usually avoids more pitfalls. I’ll also show verification and manual handling below.
&lt;strong&gt;Verify immediately after install&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After installation, run these three commands in &lt;code&gt;Miniconda Prompt&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;version              # 确认 conda 可用&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;python &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;version             # 确认 Python 可用（来自 Miniconda）&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;where python                 # 确认 python 路径指向 Miniconda 目录&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;conda --version&lt;/code&gt; should output something like &lt;code&gt;conda 24.x.x&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;python --version&lt;/code&gt; should output something like &lt;code&gt;Python 3.11.x&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;first path in &lt;code&gt;where python&lt;/code&gt; usually should point to &lt;code&gt;C:\Miniconda3\python.exe&lt;/code&gt; (or your own Miniconda directory)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;where python&lt;/code&gt; may print multiple lines; the first line is the currently prioritized Python.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;37-path-environment-variable-manual-handling-when-you-dont-check-it&quot;&gt;3.7 PATH Environment Variable: Manual Handling When You Don’t Check It&lt;/h3&gt;
&lt;p&gt;This sounds very “system settings” at first, but once you do it once, it becomes easy.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Right-click “This PC” on desktop or in Explorer.&lt;/li&gt;
&lt;li&gt;Click “Properties”.&lt;/li&gt;
&lt;li&gt;Click “Advanced system settings”.&lt;/li&gt;
&lt;li&gt;In the popup, click “Environment Variables”.&lt;/li&gt;
&lt;li&gt;In “System variables”, find &lt;code&gt;Path&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click “Edit”.&lt;/li&gt;
&lt;li&gt;Click “New”.&lt;/li&gt;
&lt;li&gt;Add your Miniconda directory, e.g. &lt;code&gt;C:\Miniconda3&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click “New” again and add &lt;code&gt;C:\Miniconda3\Scripts&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click “OK” all the way to save.&lt;/li&gt;
&lt;li&gt;Close all opened terminals, then reopen.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can think of &lt;code&gt;PATH&lt;/code&gt; as the system’s “search directory list” for executables. When you type &lt;code&gt;python&lt;/code&gt; in &lt;code&gt;cmd&lt;/code&gt;, Windows checks this list top-to-bottom to find &lt;code&gt;python.exe&lt;/code&gt;. If the directory isn’t listed, command line will say it can’t find Python.&lt;/p&gt;
&lt;p&gt;Why reopen terminal? Because terminal reads an environment snapshot when it launches. If you change PATH later, old windows won’t auto-refresh; only new windows read the new values.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to verify PATH is effective&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;After configuration, check immediately:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;where python   # 查看 python 实际命中路径&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;echo &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;PATH&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    # 打印当前 PATH 列表，确认是否包含 Miniconda 目录&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If &lt;code&gt;where python&lt;/code&gt; shows your newly configured path, it’s basically effective.&lt;/p&gt;
&lt;h3 id=&quot;38-create-the-learn-environment-and-common-pitfalls&quot;&gt;3.8 Create the &lt;code&gt;learn&lt;/code&gt; Environment and Common Pitfalls&lt;/h3&gt;
&lt;p&gt;Run these in Miniconda Prompt:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda create &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;n learn python&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;3.11&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  # 创建名为 learn 的 Python &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;3.11&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; 环境&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda activate learn               # 激活 learn 环境&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;python &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;version                   # 检查当前 Python 版本&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;pip install requests               # 在当前环境安装 requests 包&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda deactivate                   # 退出当前环境&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After &lt;code&gt;conda activate learn&lt;/code&gt;, you’ll usually see &lt;code&gt;(learn)&lt;/code&gt; on the left side of prompt. That’s the most direct activation signal.&lt;/p&gt;
&lt;p&gt;When you run &lt;code&gt;conda create -n learn python=3.11&lt;/code&gt; for the first time, you’ll usually see:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Proceed ([y]/n)?&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Type &lt;code&gt;y&lt;/code&gt; and press Enter to continue.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;pip install requests&lt;/code&gt; times out or is very slow, go back to the Tsinghua mirror section above and check if mirror configuration is effective.&lt;/p&gt;
&lt;p&gt;Another common pitfall: installing packages without activating target environment first. Then packages may go into &lt;code&gt;base&lt;/code&gt; or system environment, and when you switch environment later you’ll get &lt;code&gt;ModuleNotFoundError&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If this command set runs through, you’ve finished your first usable dev environment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you run into these cases:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;python&lt;/code&gt; is not recognized as an internal or external command&lt;br&gt;
Usually PATH is not configured correctly, or you didn’t reopen terminal after changing PATH. Fastest check: &lt;code&gt;where python&lt;/code&gt;, then reopen terminal.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;where python&lt;/code&gt; points somewhere else&lt;br&gt;
You probably have multiple Python installs and current one is not the one you expect. Fastest fix: adjust PATH order, or explicitly use &lt;code&gt;C:\Miniconda3\python.exe&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;conda&lt;/code&gt; is not a command&lt;br&gt;
You’re most likely not in Miniconda Prompt. Fastest fix: open Miniconda Prompt and run again.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ModuleNotFoundError&lt;/code&gt;&lt;br&gt;
Confirm VS Code interpreter matches your active environment, then run &lt;code&gt;pip install&lt;/code&gt; inside that same environment.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Pitfalls you’ll likely hit&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most common ones: &lt;code&gt;python&lt;/code&gt; not recognized, multiple Python installs with unclear active one, or &lt;code&gt;pip&lt;/code&gt; installing into system env instead of project env.&lt;/p&gt;
&lt;p&gt;Many beginners go through this stage. You might run &lt;code&gt;conda activate learn&lt;/code&gt; and feel like “nothing happened”. Usually command isn’t broken; either conda wasn’t loaded in this terminal, or you’re not using Miniconda Prompt.&lt;/p&gt;
&lt;p&gt;I hit this too. Looking back, most issues came from path and environment not aligned. Use these two commands to make current state explicit:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;conda info &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;envs  # 查看所有 conda 环境，以及当前激活环境&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;where python       # 查看当前 python 命令实际指向的可执行路径&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;conda info --envs&lt;/code&gt; confirms which environment is active; &lt;code&gt;where python&lt;/code&gt; confirms which executable is actually called.&lt;/p&gt;
&lt;p&gt;If output still looks confusing, that’s normal. Just confirm two things first:&lt;br&gt;
(1) are you in &lt;code&gt;learn&lt;/code&gt; environment, and (2) does first line of &lt;code&gt;where python&lt;/code&gt; match the Python you intended.&lt;/p&gt;
&lt;h2 id=&quot;4-version-control&quot;&gt;4. Version Control&lt;/h2&gt;
&lt;h3 id=&quot;41-why-you-need-version-control&quot;&gt;4.1 Why You Need Version Control&lt;/h3&gt;
&lt;p&gt;You’ve probably seen this: desktop full of &lt;code&gt;final.py&lt;/code&gt;, &lt;code&gt;final_final.py&lt;/code&gt;, &lt;code&gt;final_final_v3.py&lt;/code&gt;, and a week later you can’t tell which one actually runs. That’s where version control matters: it records each change as a timeline, so you can review, rollback, and collaborate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is Git (one sentence)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Git is a local version control toolset that records code history and changes.&lt;/p&gt;
&lt;h3 id=&quot;42-git-installation-and-basic-setup-windows-mainline--mac-side-note&quot;&gt;4.2 Git Installation and Basic Setup (Windows Mainline + Mac Side Note)&lt;/h3&gt;
&lt;p&gt;Start at Git official site: &lt;a href=&quot;https://git-scm.com/&quot;&gt;https://git-scm.com/&lt;/a&gt;. Windows users click &lt;code&gt;Download for Windows&lt;/code&gt; (or equivalent), then run installer (filename usually like &lt;code&gt;Git-2.xx.x-64-bit.exe&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Installer has many pages. Here’s the beginner-focused pass through key options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;License&lt;/code&gt;: click &lt;code&gt;Next&lt;/code&gt;.&lt;br&gt;
This page is just licensing text.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Select Destination Location&lt;/code&gt;: default is fine.&lt;br&gt;
If changing path, prefer English path like &lt;code&gt;D:\Git&lt;/code&gt; or &lt;code&gt;C:\Program Files\Git&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Select Components&lt;/code&gt;: mostly default, focus on key options.&lt;br&gt;
&lt;code&gt;Git Bash Here&lt;/code&gt; recommended; &lt;code&gt;Git GUI Here&lt;/code&gt; optional; &lt;code&gt;Git LFS&lt;/code&gt; recommended; &lt;code&gt;Associate .git* configuration files with the default text editor&lt;/code&gt; recommended; &lt;code&gt;Associate .sh files to be run with Bash&lt;/code&gt; optional; &lt;code&gt;Add a Git Bash Profile to Windows Terminal&lt;/code&gt; optional.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Start Menu Folder&lt;/code&gt;: default &lt;code&gt;Next&lt;/code&gt;.&lt;br&gt;
No need to tweak this page as a beginner.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Choosing the default editor used by Git&lt;/code&gt;:&lt;br&gt;
If VS Code is installed, choose &lt;code&gt;Use Visual Studio Code as Git&apos;s default editor&lt;/code&gt;; otherwise default is fine and can be changed later.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Adjusting the name of the initial branch in new repositories&lt;/code&gt;:&lt;br&gt;
Recommended: &lt;code&gt;Override the default branch name for new repositories&lt;/code&gt; and set to &lt;code&gt;main&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Adjusting your PATH environment&lt;/code&gt;:&lt;br&gt;
Beginner recommendation: &lt;code&gt;Git from the command line and also from 3rd-party software&lt;/code&gt;, so git works in CMD/PowerShell/VS Code terminal.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Choosing the SSH executable&lt;/code&gt; and &lt;code&gt;Choosing HTTPS transport backend&lt;/code&gt;:&lt;br&gt;
Keep defaults (usually &lt;code&gt;Use bundled OpenSSH&lt;/code&gt; / &lt;code&gt;Use the OpenSSL library&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Configuring the line ending conversions&lt;/code&gt;:&lt;br&gt;
Recommended: &lt;code&gt;Checkout Windows-style, commit Unix-style line endings&lt;/code&gt;, to avoid full-file line ending diffs cross-platform.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Configuring the terminal emulator to use with Git Bash&lt;/code&gt;:&lt;br&gt;
Keep default &lt;code&gt;Use MinTTY&lt;/code&gt;; doesn’t conflict with daily use in VS Code terminal.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Choosing the default behavior of &apos;git pull&apos;&lt;/code&gt;, &lt;code&gt;credential helper&lt;/code&gt;, &lt;code&gt;extra/experimental options&lt;/code&gt;:&lt;br&gt;
Keep defaults for now (&lt;code&gt;Git Credential Manager&lt;/code&gt; should stay enabled).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After install, close all terminal windows and reopen. Then in CMD (&lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;cmd&lt;/code&gt;) run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;git &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;version    # 正常会看到：git version &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;xx.x&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If it says &lt;code&gt;git&lt;/code&gt; is not a command: reopen terminal once first; if still broken, reinstall and make sure PATH page selected “from the command line and also from 3rd-party software.”&lt;/p&gt;
&lt;p&gt;Mac side note (Windows users can skip): run &lt;code&gt;git --version&lt;/code&gt; in Terminal. It usually prompts to install command line tools. Follow wizard, then reopen Terminal and verify again.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First Git basic config (&lt;code&gt;user.name&lt;/code&gt; / &lt;code&gt;user.email&lt;/code&gt;)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This sets commit identity, not account password. Configure once and commit records become stable.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;git config &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;global user.name &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;你的名字&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;          # 设置提交显示名&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;git config &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;global user.email &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;you@example.com&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; # 设置提交邮箱&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;git config &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;global &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;list                        # 验证配置&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should see &lt;code&gt;user.name=&lt;/code&gt; and &lt;code&gt;user.email=&lt;/code&gt; lines, meaning configuration is active.&lt;/p&gt;
&lt;h3 id=&quot;43-github-registration-and-account-preparation&quot;&gt;4.3 GitHub Registration and Account Preparation&lt;/h3&gt;
&lt;p&gt;Git is local version control; GitHub is remote hosting and collaboration. One records versions locally, the other puts versions online and supports collaboration.&lt;/p&gt;
&lt;p&gt;GitHub official site: &lt;a href=&quot;https://github.com/&quot;&gt;https://github.com/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For beginners, GitHub’s biggest value is making learning visible. What you built and how you improved are recorded. Others can see it, and you can review it yourself. It’s also great for learning repository structure, README style, and issue-writing patterns from others.&lt;/p&gt;
&lt;h3 id=&quot;44-github-web-quickstart-interface-new-repo-first-commit&quot;&gt;4.4 GitHub Web Quickstart: Interface, New Repo, First Commit&lt;/h3&gt;
&lt;p&gt;GitHub UI is English by default, which is normal. Don’t panic. As a beginner, recognize core buttons first and everything gets easier.&lt;br&gt;
After logging into &lt;a href=&quot;https://github.com/&quot;&gt;https://github.com/&lt;/a&gt;, you’ll usually land on &lt;code&gt;Dashboard&lt;/code&gt; / &lt;code&gt;Home&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You’ll usually see three things first: top search box, top-right avatar and &lt;code&gt;+&lt;/code&gt; menu, and left-side repo area. UI may change slightly over time, but core entries are stable: avatar, &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;Repositories&lt;/code&gt;, &lt;code&gt;Settings&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;These areas are enough to start:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Left repo area (&lt;code&gt;Top repositories&lt;/code&gt; / &lt;code&gt;Repositories&lt;/code&gt;): quick access to your repos.&lt;/li&gt;
&lt;li&gt;Center feed: just know it exists for now.&lt;/li&gt;
&lt;li&gt;Top-right &lt;code&gt;+&lt;/code&gt; menu: most used item is &lt;code&gt;New repository&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Green &lt;code&gt;New&lt;/code&gt; button on left Dashboard: also creates a repo.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In avatar menu, common entries are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Your profile&lt;/code&gt; / &lt;code&gt;Profile&lt;/code&gt;: your personal page.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Your repositories&lt;/code&gt; / &lt;code&gt;Repositories&lt;/code&gt;: your repo list.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Settings&lt;/code&gt;: account settings (email/password/security, etc.).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Sign out&lt;/code&gt;: sign out.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For your first time, knowing these entries is enough.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/programming-4-4-github-web.png&quot; alt=&quot;GitHub web interface example&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GitHub registration (step by step)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;GitHub is mostly English UI. I don’t recommend relying entirely on translators from day one, but if you’re truly stuck, use translation temporarily and get through the flow first. Over time, build the habit of reading English buttons and errors directly.&lt;/p&gt;
&lt;p&gt;Registration flow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;a href=&quot;https://github.com/&quot;&gt;https://github.com/&lt;/a&gt;, click &lt;code&gt;Sign up&lt;/code&gt; in top-right.&lt;/li&gt;
&lt;li&gt;Fill &lt;code&gt;Email address&lt;/code&gt;, &lt;code&gt;Password&lt;/code&gt;, &lt;code&gt;Username&lt;/code&gt; in order.&lt;/li&gt;
&lt;li&gt;Complete &lt;code&gt;Verify your account&lt;/code&gt; and email verification code.&lt;/li&gt;
&lt;li&gt;After completion, you’ll enter homepage and usually see your avatar or &lt;code&gt;+&lt;/code&gt; menu on top-right.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Common blockers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Username&lt;/code&gt; already taken: choose another one.&lt;/li&gt;
&lt;li&gt;Verification email not received: check spam, wait a few minutes, or switch mailbox.&lt;/li&gt;
&lt;li&gt;Slow page loading: refresh or retry later; if it happens often, see optional section below.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Mailbox suggestions for GitHub registration&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Domestic users can use QQ Mail or 163 Mail.&lt;br&gt;
If you prefer international services, Gmail/Outlook are also fine.&lt;br&gt;
There’s no hierarchy between mailbox providers. The important part is long-term stability, receiving verification codes, and your own convenience.&lt;br&gt;
Same for English UI: don’t panic. Learn common buttons first; translate temporarily only when truly stuck.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Create a new repo on web (step by step)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Step 0: confirm login success.&lt;br&gt;
You should see your avatar at top-right.&lt;/p&gt;
&lt;p&gt;Step 1: enter creation page.&lt;br&gt;
Entry A: top-right &lt;code&gt;+&lt;/code&gt; -&gt; &lt;code&gt;New repository&lt;/code&gt;; Entry B: green &lt;code&gt;New&lt;/code&gt; on left Dashboard.&lt;br&gt;
You should arrive at &lt;code&gt;Create a new repository&lt;/code&gt; page.&lt;/p&gt;
&lt;p&gt;Step 2: fill &lt;code&gt;Repository name&lt;/code&gt;.&lt;br&gt;
Use English plus hyphen, e.g. &lt;code&gt;project-hello&lt;/code&gt;.&lt;br&gt;
When valid, you’ll usually get a green pass hint. If error appears, shorten name and keep to letters/numbers/hyphens.&lt;/p&gt;
&lt;p&gt;Step 3: choose &lt;code&gt;Public&lt;/code&gt; / &lt;code&gt;Private&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;Public&lt;/code&gt; is better for learning showcase; &lt;code&gt;Private&lt;/code&gt; works as private draft notebook.&lt;br&gt;
You should see your selected option highlighted.&lt;/p&gt;
&lt;p&gt;Step 4: &lt;code&gt;Add a README file&lt;/code&gt; is recommended.&lt;br&gt;
Practical reason: non-empty repo, with an immediate readable entry point.&lt;br&gt;
After checking it, the option should show enabled.&lt;/p&gt;
&lt;p&gt;Step 5: &lt;code&gt;.gitignore&lt;/code&gt; and &lt;code&gt;License&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;.gitignore&lt;/code&gt; can be skipped at first; if this is clearly a Python project, choose Python template.&lt;br&gt;
If unsure about &lt;code&gt;Choose a license&lt;/code&gt;, skip for now and add later.&lt;/p&gt;
&lt;p&gt;Step 6: click &lt;code&gt;Create repository&lt;/code&gt;.&lt;br&gt;
After creation you’ll enter repo page on &lt;code&gt;Code&lt;/code&gt; tab by default; if README was selected, you’ll see &lt;code&gt;README.md&lt;/code&gt; in file list.&lt;/p&gt;
&lt;p&gt;Common pitfalls:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Duplicate/invalid repo name: switch to a different one (letters/numbers/hyphens are safest).&lt;/li&gt;
&lt;li&gt;Email not verified: some features may be restricted; verify email first.&lt;/li&gt;
&lt;li&gt;Slow page loading: if creation/loading pages get stuck often, check optional handling section later.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;First web commit (without installing any tools)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you don’t want to install tools yet, web flow can still complete your first commit and build confidence that “I can submit changes.”&lt;/p&gt;
&lt;p&gt;Route 1: &lt;code&gt;Add file -&gt; Create new file&lt;/code&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open repo &lt;code&gt;Code&lt;/code&gt; page, click &lt;code&gt;Add file&lt;/code&gt; -&gt; &lt;code&gt;Create new file&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use English filename like &lt;code&gt;notes.md&lt;/code&gt; or &lt;code&gt;hello.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Write some content in editor.&lt;/li&gt;
&lt;li&gt;Scroll down to &lt;code&gt;Commit changes&lt;/code&gt;, fill &lt;code&gt;Commit message&lt;/code&gt; (for example &lt;code&gt;add notes&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Commit changes&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You should see: new file appears in list, and &lt;code&gt;Commits&lt;/code&gt; count increases by one.&lt;/p&gt;
&lt;p&gt;Route 2: &lt;code&gt;Add file -&gt; Upload files&lt;/code&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On &lt;code&gt;Code&lt;/code&gt; page click &lt;code&gt;Add file&lt;/code&gt; -&gt; &lt;code&gt;Upload files&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Drag local &lt;code&gt;main.py&lt;/code&gt; in (or click button to choose file).&lt;/li&gt;
&lt;li&gt;Wait upload to finish, then scroll to &lt;code&gt;Commit changes&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Fill &lt;code&gt;Commit message&lt;/code&gt; (e.g. &lt;code&gt;upload main.py&lt;/code&gt;) and click &lt;code&gt;Commit changes&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You should see: &lt;code&gt;main.py&lt;/code&gt; appears in file list, and commit history has a new entry.&lt;/p&gt;
&lt;p&gt;Web flow is great for small edits and temporary file updates. For long-term development, local workflow + Desktop is still more stable and efficient.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to read a repo page (most-used parts on Code tab)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First time entering repo page, don’t read everything. Just walk through these areas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Top tabs: &lt;code&gt;Code&lt;/code&gt; / &lt;code&gt;Issues&lt;/code&gt; / &lt;code&gt;Pull requests&lt;/code&gt; / &lt;code&gt;Actions&lt;/code&gt; / &lt;code&gt;Settings&lt;/code&gt;.&lt;br&gt;
Beginners can focus on &lt;code&gt;Code&lt;/code&gt; first; &lt;code&gt;Issues&lt;/code&gt; is for questions/bug reports; &lt;code&gt;Actions&lt;/code&gt; can wait.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Branch&lt;/code&gt; dropdown (usually &lt;code&gt;main&lt;/code&gt;): branch switch entry.&lt;/li&gt;
&lt;li&gt;Green &lt;code&gt;Code&lt;/code&gt; button: common options include &lt;code&gt;HTTPS&lt;/code&gt; / &lt;code&gt;SSH&lt;/code&gt; / &lt;code&gt;Download ZIP&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Go to file&lt;/code&gt;: quick jump when repo has many files.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Add file&lt;/code&gt;: create/upload entry.&lt;/li&gt;
&lt;li&gt;File list (&lt;code&gt;src/&lt;/code&gt;, &lt;code&gt;README.md&lt;/code&gt;, etc.): main project content.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;README&lt;/code&gt; renders in lower page area: first project description entry.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Commits&lt;/code&gt;: change history timeline and per-commit details.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;45-git-workflow-and-minimal-vocabulary&quot;&gt;4.5 Git Workflow and Minimal Vocabulary&lt;/h3&gt;
&lt;p&gt;Start with five words: &lt;code&gt;commit&lt;/code&gt;, &lt;code&gt;push&lt;/code&gt;, &lt;code&gt;pull&lt;/code&gt;, &lt;code&gt;branch&lt;/code&gt;, &lt;code&gt;merge&lt;/code&gt;. Daily flow is usually: change locally -&gt; &lt;code&gt;commit&lt;/code&gt; -&gt; &lt;code&gt;push&lt;/code&gt;; when syncing use &lt;code&gt;pull&lt;/code&gt;; use &lt;code&gt;branch&lt;/code&gt; for parallel work; merge with &lt;code&gt;merge&lt;/code&gt; at the end. If conflicts happen, don’t panic, inspect both sides and decide what to keep.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Git in VS Code (short version)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;Source Control&lt;/code&gt; panel in VS Code can show diffs, stage files, write commit messages, and commit. Very handy for small daily edits.&lt;/p&gt;
&lt;p&gt;But for beginners, using GitHub Desktop for &lt;code&gt;push/publish&lt;/code&gt; is often more stable and more visual. Run through &lt;code&gt;commit/push/pull&lt;/code&gt; with GUI first; command line can come later.&lt;/p&gt;
&lt;h3 id=&quot;46-optional-handling-when-access-is-slow-in-mainland-china&quot;&gt;4.6 Optional Handling When Access Is Slow in Mainland China&lt;/h3&gt;
&lt;p&gt;Under domestic network conditions, GitHub may sometimes be slow in loading, login, or release downloads. Start with no-tool options first: try another time period, and prioritize sync via GitHub Desktop.&lt;/p&gt;
&lt;p&gt;If you frequently get stuck on registration verification pages, login pages, or Desktop authorization callback, then consider this optional route.&lt;/p&gt;
&lt;p&gt;If you need an optional network optimization tool, you can check &lt;strong&gt;Watt Toolkit (Steam++)&lt;/strong&gt;: &lt;a href=&quot;https://steampp.net/&quot;&gt;https://steampp.net/&lt;/a&gt;. This is only a backup option, with no effect guarantees. Tools are just tools; don’t let them distract you from learning goals.&lt;/p&gt;
&lt;h3 id=&quot;47-github-desktop-workflow-from-sign-in-authorization-to-publish&quot;&gt;4.7 GitHub Desktop Workflow: From Sign-in Authorization to Publish&lt;/h3&gt;
&lt;p&gt;GitHub Desktop download: &lt;a href=&quot;https://desktop.github.com/&quot;&gt;https://desktop.github.com/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Do first-time sign-in/authorization once, then everything after becomes smoother:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open GitHub Desktop.&lt;/li&gt;
&lt;li&gt;On Windows usually go &lt;code&gt;File -&gt; Options -&gt; Accounts&lt;/code&gt;; on macOS usually &lt;code&gt;GitHub Desktop -&gt; Settings -&gt; Accounts&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Sign in&lt;/code&gt;, then follow browser authorization flow (you’ll usually see &lt;code&gt;Authorize GitHub Desktop&lt;/code&gt; or similar).&lt;/li&gt;
&lt;li&gt;After authorization, return to Desktop and confirm account is visible (avatar or username).&lt;/li&gt;
&lt;li&gt;If authorization page loads slowly, retry at another time first; if it still frequently blocks, see optional section above.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Expected result: &lt;code&gt;File&lt;/code&gt; menu is available, and after one commit, &lt;code&gt;Publish repository&lt;/code&gt; will appear.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/programming-4-7-github-desktop.png&quot; alt=&quot;GitHub Desktop interface&quot;&gt;&lt;/p&gt;
&lt;p&gt;Make sure you’re already signed into GitHub in Desktop (done above).&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a project folder &lt;code&gt;project-hello&lt;/code&gt; on desktop.&lt;/li&gt;
&lt;li&gt;Open it in VS Code, create &lt;code&gt;main.py&lt;/code&gt;, and write: &lt;code&gt;print(&quot;Hello from my first repo&quot;)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In GitHub Desktop:
&lt;ul&gt;
&lt;li&gt;If local folder is not a repository, use &lt;code&gt;File -&gt; New repository...&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If it already is, use &lt;code&gt;File -&gt; Add local repository...&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Fill &lt;code&gt;Summary&lt;/code&gt; in lower-left, click &lt;code&gt;Commit to main&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Publish repository&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Go back to GitHub web and confirm repo is created and &lt;code&gt;main.py&lt;/code&gt; is visible.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;State checks after each step:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After repo init/add, changed files appear on left list.&lt;/li&gt;
&lt;li&gt;After commit, changes list becomes empty.&lt;/li&gt;
&lt;li&gt;After publish, web repo is accessible.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you get stuck:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Commit&lt;/code&gt; button is gray: usually file not saved or no changes made.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Publish&lt;/code&gt; doesn’t appear: check if you’re logged in.&lt;/li&gt;
&lt;li&gt;Web page won’t open or loads very slowly: finish flow in Desktop first; consider optional tool above only if necessary.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Minimal Git vocabulary&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;repo&lt;/code&gt; means repository, &lt;code&gt;commit&lt;/code&gt; is a snapshot, &lt;code&gt;branch&lt;/code&gt; is a parallel line, &lt;code&gt;merge&lt;/code&gt; combines branches, &lt;code&gt;push/pull&lt;/code&gt; sync with remote, and &lt;code&gt;clone&lt;/code&gt; copies remote repo to local.&lt;/p&gt;
&lt;h2 id=&quot;5-in-the-ai-era-you-might-not-need-to-write-every-line-but-you-still-need-engineering-thinking&quot;&gt;5. In the AI Era, You Might Not Need to Write Every Line, But You Still Need Engineering Thinking&lt;/h2&gt;
&lt;p&gt;AI has made coding faster. That’s true. What hasn’t changed is this: to land projects, someone still has to clarify problems and make results reliable.&lt;/p&gt;
&lt;p&gt;What I care about now isn’t how much syntax you memorized. It’s whether you can turn “looks like it works” into “stable and reproducible.” That’s where engineering ability lives.&lt;/p&gt;
&lt;p&gt;Real scenarios are often plain. You copy a code snippet and immediately get &lt;code&gt;ModuleNotFoundError&lt;/code&gt;. First check interpreter, then &lt;code&gt;where python&lt;/code&gt;, then install dependencies into the current environment. Run again, now you get &lt;code&gt;FileNotFoundError&lt;/code&gt;, then go back and check paths. Problems are peeled layer by layer, not solved by one magical answer.&lt;/p&gt;
&lt;p&gt;The one sentence I want to keep is: &lt;strong&gt;“Code you don’t understand is still debt, even if AI wrote it beautifully.”&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;AI can do a lot: templates, ideas, error explanations, optimization suggestions. What it cannot do is understand your requirements for you, take responsibility for mistakes, or make long-term architecture tradeoffs for you.&lt;/p&gt;
&lt;p&gt;No need to mythologize tool choices either. For beginners, Doubao and DeepSeek are fully enough to start. If you need stronger quality/context handling, then try ChatGPT, Gemini, or Claude.&lt;/p&gt;
&lt;p&gt;Using Codex-like plugins in VS Code is also practical. Completion and explanations can speed you up. It can be a copilot, but you’re still holding the steering wheel.&lt;/p&gt;
&lt;p&gt;I’ll end this part with one line: what you really need to train is turning chaos into clarity. Tools will change, methods will change, but the steering wheel stays in your hands.&lt;/p&gt;
&lt;p&gt;I hope you can build one ability worth having in this era: finding problems and thinking through solutions. When you hit a problem, your first reaction shouldn’t be giving up, but asking “how can I solve this?” Once your brain has at least a rough map, go try. If this software isn’t available, where else can I get it? Has someone met the same issue before? Did they leave a solution? Can I learn from it?&lt;/p&gt;
&lt;p&gt;People who do big things shouldn’t carry psychological burden about tools. Tools are means, not identity. If a tool helps you reach your goal, you don’t need to obsess over whether the method looks elegant enough. I really like this sentence: “&lt;em&gt;&lt;strong&gt;Real masters usually keep an apprentice heart.&lt;/strong&gt;&lt;/em&gt;” When solving engineering problems, use community resources and search engines well. The world is big enough that many problems you face have probably already been recorded somewhere.&lt;/p&gt;
&lt;h2 id=&quot;6-debugging-and-engineering-habits-optional-advanced&quot;&gt;6. Debugging and Engineering Habits (Optional Advanced)&lt;/h2&gt;
&lt;h3 id=&quot;61-error-reading-and-localization-how-to-read-traceback-and-narrow-the-problem&quot;&gt;6.1 Error Reading and Localization: How to Read Traceback and Narrow the Problem&lt;/h3&gt;
&lt;p&gt;It’s normal for beginners to fear errors. I used to get nervous seeing red text too. Later I realized errors are more like navigation: they tell you roughly where the problem is.&lt;/p&gt;
&lt;p&gt;Keep these four questions in mind:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Which Python/program am I actually running? Check &lt;code&gt;where python&lt;/code&gt;, then verify VS Code interpreter is the same environment.&lt;/li&gt;
&lt;li&gt;Which line did the error happen on? The last part of traceback usually gives filename and line number.&lt;/li&gt;
&lt;li&gt;What external dependency does this line rely on? Usually packages, file paths, permissions, or network.&lt;/li&gt;
&lt;li&gt;How do I verify after fixing? Build a minimal repro and rerun after changing one thing at a time.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code&gt;ModuleNotFoundError: No module named &apos;xxx&apos;&lt;/code&gt;&lt;br&gt;
Typical causes are missing package or package installed in wrong environment.&lt;br&gt;
Do this: confirm interpreter, install package in current environment, rerun same code.&lt;br&gt;
After fix you should see: this error disappears and execution continues.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;FileNotFoundError: ...&lt;/code&gt;&lt;br&gt;
Most commonly wrong path or wrong startup directory.&lt;br&gt;
Do this: confirm current working directory, run with absolute path first, then switch back to relative path.&lt;br&gt;
After fix you should see: file is read successfully and subsequent logic starts running.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;SyntaxError&lt;/code&gt;&lt;br&gt;
Most common causes are missing colon, unclosed bracket, or bad indentation.&lt;br&gt;
Do this: jump to error line and inspect previous line, fix symbols and indentation, rerun minimal code.&lt;br&gt;
After fix you should see: interpreter no longer exits immediately.&lt;/p&gt;
&lt;h3 id=&quot;62-breakpoint-debugging-use-vs-code-to-see-variables-and-flow&quot;&gt;6.2 Breakpoint Debugging: Use VS Code to See Variables and Flow&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Open the &lt;code&gt;.py&lt;/code&gt; file you want to run.&lt;/li&gt;
&lt;li&gt;Click left of line number to set a red breakpoint.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Run and Debug&lt;/code&gt; in sidebar, or press &lt;code&gt;F5&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;First run asks for environment; choose &lt;code&gt;Python&lt;/code&gt;. If it asks to create &lt;code&gt;launch.json&lt;/code&gt;, confirm.&lt;/li&gt;
&lt;li&gt;When program pauses at breakpoint, inspect values in &lt;code&gt;Variables&lt;/code&gt; panel.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;F10&lt;/code&gt; step over, &lt;code&gt;F11&lt;/code&gt; step into, &lt;code&gt;Shift+F11&lt;/code&gt; step out.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You should see: program paused at breakpoint, variables panel updating, and line-by-line execution control.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;total &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; range&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;    total &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;+=&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; i&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; total &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 10&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;        print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;hit&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, total)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;        break&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;done&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, total)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Set breakpoint at &lt;code&gt;total += i&lt;/code&gt;, and you’ll see how &lt;code&gt;total&lt;/code&gt; changes each iteration. Debugging isn’t for show, it’s for saving time.&lt;/p&gt;
&lt;h3 id=&quot;63-engineering-habits-directory-structure-markdown-file-types-commits&quot;&gt;6.3 Engineering Habits: Directory Structure, Markdown, File Types, Commits&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;project-hello/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  src/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  data/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  output/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  README.md&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  .gitignore&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Put code in &lt;code&gt;src/&lt;/code&gt;, input in &lt;code&gt;data/&lt;/code&gt;, output in &lt;code&gt;output/&lt;/code&gt;, usage notes in &lt;code&gt;README.md&lt;/code&gt;, and non-tracked files in &lt;code&gt;.gitignore&lt;/code&gt;. Once structure is clear, debugging gets much easier.&lt;/p&gt;
&lt;p&gt;Try to use English paths and filenames, not for style points, but to reduce weird cross-tool compatibility issues.&lt;/p&gt;
&lt;p&gt;A minimal README can start like this:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# project-hello&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;项目作用：xxx&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;运行方式：python src/main.py&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;依赖：xxx&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;输入在 data/，输出在 output/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can think of Markdown as “plain text + lightweight markup.” It’s not a binary format like Word, so it’s great for Git version control and easy cross-platform opening.&lt;/p&gt;
&lt;p&gt;It appears everywhere in engineering: &lt;code&gt;README&lt;/code&gt;, project docs, issue records, blogs, study notes. Once you learn the minimal syntax, you can reuse it across many places.&lt;/p&gt;
&lt;p&gt;Tool-wise, VS Code can edit it directly. A Markdown extension like &lt;code&gt;Markdown All in One&lt;/code&gt; is recommended. Preview is only a display mode; it doesn’t change your file itself.&lt;br&gt;
If you prefer WYSIWYG, Typora is also great. I use it for long writing; the flow feels smoother.&lt;/p&gt;
&lt;p&gt;For minimal syntax, these are enough to remember:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;markdown&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold&quot;&gt;# 一级标题&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold&quot;&gt;## 二级标题&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#E36209;--shiki-dark:#FFAB70&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; 列表项&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;```python&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&quot;hello&quot;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;For links, this article prefers angle-bracket style `&amp;#x3C;https://...&gt;`: consistent, direct, and less formatting trouble after copy. (`[text](url)` also works, choose what you prefer.)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Mini README template you can copy directly:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;```markdown&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# project-hello&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;这个项目是做什么的&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;## 运行方式&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;python src/main.py&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;## 输入输出&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;输入在 data/，输出在 output/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Three common pitfalls: inconsistent list indentation, unclosed triple backticks, and Chinese punctuation in code blocks. Chinese punctuation is usually fine in Markdown prose, but in code it often breaks execution.&lt;/p&gt;
&lt;p&gt;High-frequency file types are enough at first: &lt;code&gt;.py/.md/.txt&lt;/code&gt; are code/text and can be opened directly in editor; &lt;code&gt;.json/.csv/.xlsx&lt;/code&gt; are common data formats, first two are editor-readable and table files can be opened in Excel; &lt;code&gt;.yaml/.yml/.toml&lt;/code&gt; are common config formats, pay attention to indentation and keys; &lt;code&gt;.zip/.7z&lt;/code&gt; should be extracted first; &lt;code&gt;.exe/.msi&lt;/code&gt; are installers, not data files.&lt;/p&gt;
&lt;p&gt;File extension doesn’t define everything, but it’s still a useful first signal for choosing the right tool.&lt;/p&gt;
&lt;p&gt;Habit 1: small commits, one clear change per commit.&lt;br&gt;
Habit 2: commit messages in plain language, use &lt;code&gt;verb + object&lt;/code&gt; like &lt;code&gt;add notes&lt;/code&gt;, &lt;code&gt;fix path&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You’ll probably have a moment where something gets broken badly. If your commit history is clear, you won’t panic and rollback is fast. This habit looks small, but pays off when things go wrong.&lt;/p&gt;
&lt;h2 id=&quot;7-hardware-basics-understand-what-your-computer-is-doing&quot;&gt;7. Hardware Basics: Understand What Your Computer Is Doing&lt;/h2&gt;
&lt;h3 id=&quot;71-the-four-hardware-pieces-cpu-gpu-ram-storage&quot;&gt;7.1 The Four Hardware Pieces: CPU, GPU, RAM, Storage&lt;/h3&gt;
&lt;p&gt;First separate these four terms, and configuration sheets become much easier to read. CPU is like the command center, good at general-purpose computation and complex branching, so single-thread performance is often important. GPU is more like many workers doing tasks together, great at parallel workloads like graphics rendering and matrix-heavy deep learning.&lt;/p&gt;
&lt;p&gt;RAM is your “workbench,” where runtime data is kept temporarily. The bigger the bench, the more things you can spread out at once. In phone communities, ROM is often casually used to mean “storage,” but in PC context, what people call “ROM/storage” is usually persistent storage like SSD/HDD, not strict read-only ROM.&lt;/p&gt;
&lt;p&gt;One more practical layer: RAM is volatile temporary space. While programs run, variables and caches stay on this workbench. Once program exits, computer restarts, or power is cut, this data is cleared. Values you see during breakpoint debugging are also runtime state in RAM, and they disappear when process stops. That’s why reopening a program often loses half-computed intermediate results unless they were written to disk.&lt;/p&gt;
&lt;p&gt;Most common misconception in one sentence: memory (RAM) is not the same as storage (SSD/HDD). One is temporary runtime space, the other is long-term file storage.&lt;/p&gt;
&lt;p&gt;Many laptops show both iGPU and dGPU, and that’s normal. Integrated GPU (iGPU) is inside CPU: power-saving, cooler, and enough for coding/docs/daily dev. Dedicated GPU (dGPU) is separate silicon: stronger for graphics and parallel compute, suitable for gaming, 3D rendering, video export, and model training.&lt;/p&gt;
&lt;p&gt;Automatic switching is the system balancing power and performance: light tasks on iGPU, heavy tasks on dGPU. Practical note for beginners: learning programming itself doesn’t require a dGPU. But if you’re heading into deep learning, NVIDIA CUDA ecosystem is more common. You can still learn without dGPU; training is just slower.&lt;/p&gt;
&lt;h3 id=&quot;72-storage-and-interfaces-hddssd-satam2nvme&quot;&gt;7.2 Storage and Interfaces: HDD/SSD, SATA/M.2/NVMe&lt;/h3&gt;
&lt;p&gt;One sentence to remember first: both HDD and SSD are for long-term storage, not RAM. HDD is like an old warehouse: large capacity and cheaper, but slower, noisier, and more sensitive to shock. SSD is a modern warehouse: faster, quieter, and shock-resistant. Booting, package install, and opening projects all feel snappier.&lt;/p&gt;
&lt;p&gt;Beginners most commonly mix up three things: form factor, interface, and protocol. &lt;code&gt;2.5-inch SATA&lt;/code&gt; is typically cable-connected; &lt;code&gt;M.2&lt;/code&gt; is the card-like form factor; &lt;code&gt;NVMe&lt;/code&gt; is a protocol usually running on PCIe. If two drives look like M.2 but speed differs a lot, protocol differences are often the reason.&lt;/p&gt;
&lt;p&gt;Before buying/installing, check specs in three steps to avoid pitfalls:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check motherboard/laptop spec page first: confirm whether it supports &lt;code&gt;SATA&lt;/code&gt; or &lt;code&gt;M.2&lt;/code&gt; before purchasing.&lt;/li&gt;
&lt;li&gt;Check details: M.2 length (e.g. &lt;code&gt;2280&lt;/code&gt;) and slot protocol (SATA/NVMe) must match.&lt;/li&gt;
&lt;li&gt;Check resource sharing: some M.2 slots may disable SATA channels; on laptops confirm expansion support first.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;One language detail: when people say “my phone’s 256G memory is full,” they usually mean storage space is full. Just understand the meaning; no need to argue terminology.&lt;/p&gt;
&lt;h3 id=&quot;73-ram-sticks-and-frequency-ddr4ddr5-and-speed-indicators&quot;&gt;7.3 RAM Sticks and Frequency: DDR4/DDR5 and Speed Indicators&lt;/h3&gt;
&lt;p&gt;In real scenarios like “browser + VS Code + Python + spreadsheets,” 8GB can run but fills up quickly with many tabs. 16GB is the current sweet spot for learning and moderate development. 32GB gives more headroom for VMs, data processing, and video editing.&lt;/p&gt;
&lt;p&gt;For SSD, at least 512GB is usually more comfortable. Reason is practical: development environments, package caches, project files, and datasets keep growing. 256GB gets tight quickly. Don’t stare only at CPU; a strong CPU with tiny RAM still feels constrained.&lt;/p&gt;
&lt;p&gt;DDR4 and DDR5 are memory generations. They are not freely mixable; compatibility depends on motherboard and CPU platform. Check compatibility first, then parameters. “Newer generation” doesn’t mean every machine can upgrade directly.&lt;/p&gt;
&lt;p&gt;For frequency labels, vendors may use &lt;code&gt;MHz&lt;/code&gt;, &lt;code&gt;MT/s&lt;/code&gt;, or casually &lt;code&gt;Hz&lt;/code&gt;. Treat it as speed tier. Higher frequency can help, but perceived performance won’t always double because bottlenecks may be CPU, disk, or program design itself.&lt;/p&gt;
&lt;p&gt;A practical order for beginners:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Compatibility first: does motherboard/CPU support DDR4 or DDR5?&lt;/li&gt;
&lt;li&gt;Capacity second: secure &lt;code&gt;16GB&lt;/code&gt; baseline, then &lt;code&gt;32GB&lt;/code&gt; if needed.&lt;/li&gt;
&lt;li&gt;Frequency last: increase one tier if budget allows; dual-channel (two matching sticks) is usually more stable.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In real development, browser + VS Code + Python + spreadsheets usually hit capacity limits before extreme frequency limits, so capacity often impacts experience more.&lt;/p&gt;
&lt;h3 id=&quot;74-quick-model-reading-intel--amd--nvidia&quot;&gt;7.4 Quick Model Reading: Intel / AMD / NVIDIA&lt;/h3&gt;
&lt;p&gt;One overall rule first: naming conventions change with each year, suffixes evolve too. If you see a new suffix, check official docs instead of guessing.&lt;/p&gt;
&lt;p&gt;For Intel CPU, read three parts: series, generation, suffix. &lt;code&gt;i3/i5/i7/i9&lt;/code&gt; are broad positioning, but the same i7 across generations can differ a lot. In examples like &lt;code&gt;i5-12400&lt;/code&gt;, &lt;code&gt;i7-13700K&lt;/code&gt;, &lt;code&gt;i7-13620H&lt;/code&gt;, &lt;code&gt;i5-1340P&lt;/code&gt;, check generation first, then suffix: &lt;code&gt;K&lt;/code&gt; often means unlocked overclocking, &lt;code&gt;F&lt;/code&gt; often means no iGPU, laptop &lt;code&gt;H/HX&lt;/code&gt; usually performance-focused, &lt;code&gt;U&lt;/code&gt; low-power, &lt;code&gt;P&lt;/code&gt; in-between.&lt;/p&gt;
&lt;p&gt;AMD CPU is similar: start with &lt;code&gt;Ryzen 3/5/7/9&lt;/code&gt; positioning, then generation numbers. For models like &lt;code&gt;Ryzen 5 5600&lt;/code&gt;, &lt;code&gt;Ryzen 7 7700X&lt;/code&gt;, &lt;code&gt;Ryzen 7 7840HS&lt;/code&gt;, &lt;code&gt;Ryzen 5 7530U&lt;/code&gt;, numbers broadly represent generation and class; laptop suffixes often include &lt;code&gt;H/HS/U&lt;/code&gt;. Also know APU (stronger integrated graphics) exists; it helps with light graphics and light editing tasks.&lt;/p&gt;
&lt;p&gt;For NVIDIA GPU, the easiest mistake is this: bigger number isn’t always stronger unless you compare generation first. &lt;code&gt;GTX&lt;/code&gt; is generally older generation, &lt;code&gt;RTX&lt;/code&gt; usually includes newer feature sets. Example &lt;code&gt;RTX 3060&lt;/code&gt; vs &lt;code&gt;RTX 4060&lt;/code&gt;: identify generation first, then compare &lt;code&gt;60/70/80/90&lt;/code&gt; tiers within the same generation. &lt;code&gt;Ti/SUPER&lt;/code&gt; are usually enhanced variants in that generation. Also remember &lt;code&gt;Laptop GPU&lt;/code&gt; with same name is not equal to desktop performance. For AI, VRAM matters a lot: 8GB is entry level, 12GB is much more comfortable, and 16GB+ gives better room for larger models/images.&lt;/p&gt;
&lt;h3 id=&quot;75-self-check-and-remote-use-task-manager-device-manager-rdp-server&quot;&gt;7.5 Self-check and Remote Use: Task Manager, Device Manager, RDP, Server&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Check memory and storage first: &lt;code&gt;16GB RAM + 512GB SSD&lt;/code&gt; is a stable baseline.&lt;/li&gt;
&lt;li&gt;Then check CPU generation and class: don’t judge by &lt;code&gt;i7/i9&lt;/code&gt; label alone.&lt;/li&gt;
&lt;li&gt;Only if your tasks are AI/gaming/rendering, prioritize dGPU; NVIDIA ecosystem is often more convenient.&lt;/li&gt;
&lt;li&gt;If portability and battery matter more, iGPU laptops can absolutely handle programming study.&lt;/li&gt;
&lt;li&gt;Finally check display, ports, and weight based on your usage scenario.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Your current computer is very likely enough to start learning. No need to wait for a “perfect machine” to begin.&lt;/p&gt;
&lt;p&gt;Now that you’ve learned CPU/GPU/memory/storage concepts, next step is mapping them on your own machine. It’s not complicated. Three entry paths are enough.&lt;/p&gt;
&lt;p&gt;A) Task Manager -&gt; Performance (most common)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Method A: right-click Start menu, open Task Manager.&lt;/li&gt;
&lt;li&gt;Method B: &lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;taskmgr&lt;/code&gt;, press Enter.&lt;/li&gt;
&lt;li&gt;If you only see simplified view, click “More details” first.&lt;/li&gt;
&lt;li&gt;Go to &lt;code&gt;Performance&lt;/code&gt;, then click &lt;code&gt;CPU / Memory / Disk / GPU&lt;/code&gt; one by one.&lt;/li&gt;
&lt;li&gt;You’ll see: CPU model and base speed, total memory capacity, disk model and active time, GPU name and VRAM usage.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/programming-7-4-performance.png&quot; alt=&quot;Task Manager performance page&quot;&gt;&lt;/p&gt;
&lt;p&gt;B) Device Manager (hardware list and driver state)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Method A: &lt;code&gt;Win + X&lt;/code&gt; menu -&gt; Device Manager.&lt;/li&gt;
&lt;li&gt;Method B: &lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;devmgmt.msc&lt;/code&gt;, press Enter.&lt;/li&gt;
&lt;li&gt;Expand &lt;code&gt;Display adapters / Processors / Disk drives / Network adapters&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You’ll see device name lists; yellow exclamation usually means abnormal status.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;C) Third-party tool: TUZB Toolbox (optional)&lt;/p&gt;
&lt;p&gt;If you want one-screen overview, use it as supplementary tool. Download: &lt;a href=&quot;https://www.tbtool.cn/&quot;&gt;https://www.tbtool.cn/&lt;/a&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Method A: open browser and visit the official URL above.&lt;/li&gt;
&lt;li&gt;Method B: &lt;code&gt;Win + R&lt;/code&gt;, directly enter &lt;code&gt;https://www.tbtool.cn/&lt;/code&gt;, press Enter.&lt;/li&gt;
&lt;li&gt;After opening, check pages like hardware overview/sensors to compare CPU, memory, disk, and GPU.&lt;/li&gt;
&lt;li&gt;If values differ slightly from Task Manager, trust system entries first and use third-party data as cross-check.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Display details vary by brand/device, but entry path is stable: check performance page first, then hardware list, then optional third-party cross-check.&lt;/p&gt;
&lt;p&gt;First skill: open it. Three methods, pick one:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;Ctrl + Shift + Esc&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Right-click taskbar -&gt; Task Manager.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;taskmgr&lt;/code&gt;, Enter.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Second skill: know which tabs to read:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Processes&lt;/code&gt;: sort by CPU/memory to find what’s consuming resources.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Performance&lt;/code&gt;: watch real-time CPU/memory/disk/GPU usage.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Startup&lt;/code&gt;: startup apps (name may vary slightly by Windows version).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Third skill: end frozen apps correctly:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Confirm it’s an app you recognize and it’s frozen (e.g. browser/editor).&lt;/li&gt;
&lt;li&gt;Select the process.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;End task&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You should see app window disappear and CPU/memory usage drop.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;One safety line: don’t end unknown system processes casually, like &lt;code&gt;System&lt;/code&gt;, &lt;code&gt;Service Host&lt;/code&gt;, &lt;code&gt;Windows Explorer&lt;/code&gt;. If unsure, search process name first or take a screenshot for record. A process is basically an “instance of a running program.”
If you’re not sure whether it’s a system process, don’t end it first; copy process name and search it, you can usually judge in 30 seconds.&lt;/p&gt;
&lt;p&gt;A common scene: PC suddenly becomes very laggy. Open &lt;code&gt;Processes&lt;/code&gt;, sort by CPU, find one process staying above 90%. Save your current work first, then end that process. Usually this brings the machine back to usable.&lt;/p&gt;
&lt;p&gt;Device Manager is not a “magic driver installer.” Its first value is helping you verify whether hardware state is normal.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Method A: &lt;code&gt;Win + X&lt;/code&gt; -&gt; Device Manager.&lt;/li&gt;
&lt;li&gt;Method B: &lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;devmgmt.msc&lt;/code&gt;, press Enter.&lt;/li&gt;
&lt;li&gt;Focus on four categories: &lt;code&gt;Display adapters&lt;/code&gt; (GPU), &lt;code&gt;Processors&lt;/code&gt; (CPU), &lt;code&gt;Disk drives&lt;/code&gt; (storage), &lt;code&gt;Network adapters&lt;/code&gt; (network card).&lt;/li&gt;
&lt;li&gt;If you see a yellow exclamation mark: right-click device -&gt; &lt;code&gt;Properties&lt;/code&gt; -&gt; &lt;code&gt;Device status&lt;/code&gt;, read system-provided cause first.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Beginner-safe order for driver updates:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Get drivers from hardware vendor or laptop OEM official site first.&lt;/li&gt;
&lt;li&gt;Avoid unknown third-party driver packages.&lt;/li&gt;
&lt;li&gt;Windows Update may provide drivers too, but not always the latest.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you see two GPUs (iGPU + dGPU), in most cases that’s normal and aligns with automatic switching logic discussed above.&lt;/p&gt;
&lt;p&gt;One-sentence definition: remote desktop means “use another computer as if it were your own,” with display/keyboard/mouse behavior similar to local operation.&lt;br&gt;
Typical use cases: connect to home/company PC for files, connect to lab machine for tasks, connect to cloud server for deployment and maintenance.&lt;/p&gt;
&lt;p&gt;Most common Windows connection steps are straightforward:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press &lt;code&gt;Win + R&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;mstsc&lt;/code&gt;, press Enter to open Remote Desktop Connection.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;Computer&lt;/code&gt;, enter target machine IP or hostname.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Show Options&lt;/code&gt; (optional) to fill username and avoid retyping.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Connect&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Enter password and confirm certificate prompt on first connection.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You should see: a new window pops up, showing the other machine’s desktop, where you can open apps/files like local.&lt;/p&gt;
&lt;p&gt;Four common pitfalls:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Target machine is off or asleep: connection fails directly.&lt;/li&gt;
&lt;li&gt;Remote Desktop not enabled on target: enable it in “Settings -&gt; System -&gt; Remote Desktop.”&lt;/li&gt;
&lt;li&gt;Network unreachable causes timeout; in public network, port forwarding/tunneling may be needed.&lt;/li&gt;
&lt;li&gt;Account permission insufficient can also deny access; not all Windows editions are suitable as remote host.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Security-wise, keep it simple: don’t store passwords everywhere, and use strong passwords whenever possible.&lt;/p&gt;
&lt;p&gt;You can think of a server as a “24/7 working machine.” It prioritizes stability, continuous operation, and remote maintainability, not direct sitting-in-front interaction experience.&lt;/p&gt;
&lt;p&gt;The easiest beginner misunderstanding: servers are not mysterious. At core they are still CPU + memory + storage computers. Difference is mainly usage and operation mode. Your laptop is a personal workstation; a server is a long-running production machine.&lt;/p&gt;
&lt;p&gt;Many servers have no monitor/keyboard attached, not because they can’t, but because daily operations don’t need it. Admins typically use SSH or RDP for config, deployment, and logs.&lt;/p&gt;
&lt;p&gt;Once you connect the full flow, it’s clear: write code locally -&gt; push to GitHub -&gt; deploy to server. You’re moving a program from your dev machine to another machine that runs continuously.&lt;/p&gt;
&lt;p&gt;Desktop PC keywords are expandability, cooling, and cost efficiency. Great for fixed long-term development, multi-monitor setup, and gradual hardware upgrades.&lt;br&gt;
Laptops emphasize portability, with a balance between performance and battery life. Suitable for study, classes, and mobile work.&lt;br&gt;
Phones are mostly ARM-based and better for “using services” than as primary dev devices. They work well as auxiliary terminals via remote control/cloud services.&lt;br&gt;
Workstations target professional loads like rendering, simulation, and AI, where stability and expansion matter more. Don’t be intimidated by the name; match it to your actual tasks.&lt;br&gt;
Servers are about long uptime, remote administration, and stability. Many scenarios use Linux, often without GUI or with minimal graphical environment.&lt;/p&gt;
&lt;p&gt;A practical decision framework for beginners:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ask first: am I learning programming, or already doing heavy rendering/training tasks?&lt;/li&gt;
&lt;li&gt;For study and daily projects, prioritize usability: &lt;code&gt;16GB&lt;/code&gt; RAM + enough SSD usually matters more than chasing top-tier model names.&lt;/li&gt;
&lt;li&gt;If you need fixed desk and multi-monitor setup, lean desktop; if you move often, lean laptop.&lt;/li&gt;
&lt;li&gt;Only consider workstation/server when your task clearly requires them.&lt;/li&gt;
&lt;li&gt;In most cases, the computer you already have is enough to start building projects.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;If you can follow this article once from start to finish — even just once — set up your environment, run &lt;code&gt;python&lt;/code&gt; in terminal, write a loop in VS Code, create a repository on GitHub, and submit successfully, then you’ve already completed the core of “getting started.”&lt;/p&gt;
&lt;p&gt;Many people think programming entry means “memorizing syntax,” but I prefer seeing it as a practical life skill: can you break down a problem, find references, verify attempts, stay calm with errors, and finally reproduce results? You’ll find that real gap usually comes not from raw cleverness, but from whether this workflow is stable.&lt;/p&gt;
&lt;p&gt;One final line: tools are means. Using Python, VS Code, GitHub, or AI plugins is all fine. The key is not “what tool I used,” but “did I understand the problem clearly and build a working result.”&lt;/p&gt;
&lt;p&gt;To reduce your psychological burden, I want to be direct: this blog site and this article were also heavily AI-assisted. ChatGPT helped me write a lot, and it worked very well. It saved me significant time that I could spend on other things, and it improved my efficiency in a very direct way.&lt;/p&gt;</content:encoded><category>code</category><category>guide</category><category>EN</category></item><item><title>How I Turned My Tablet into a Second Monitor with Sunshine</title><link>https://danarnoux.com/blog/how-i-turned-my-tablet-into-a-second-monitor-with-sunshine-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/how-i-turned-my-tablet-into-a-second-monitor-with-sunshine-en/</guid><description>A practical guide and troubleshooting notes on building a tablet-as-second-monitor setup using Sunshine streaming and a virtual display driver.</description><pubDate>Mon, 16 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;preface&quot;&gt;Preface&lt;/h2&gt;
&lt;p&gt;I have been using a laptop for both work and entertainment for years. Because I move between places a lot, I never bought a dedicated external monitor. Part of it was me being picky, and part of it was the classic “if I buy one, I probably need two” dilemma.&lt;/p&gt;
&lt;p&gt;At some point, the single-screen setup just became annoying. Gaming felt cramped, coding felt cramped, everything felt cramped. I started regretting not buying a monitor earlier.&lt;/p&gt;
&lt;p&gt;I only took this seriously after trying Apple Vision Pro and learning what Sunshine could do for low-latency streaming. I still did not want to overcomplicate things, but the idea stayed in my head.&lt;/p&gt;
&lt;p&gt;My tablet is a Huawei MatePad 11, with a 2560x1600 panel, close enough to my laptop’s workflow needs. I tested 90Hz streaming at that resolution and saw around 6ms delay in the path I measured. In real use it felt smooth enough to be useful, not just “tech demo smooth.”&lt;/p&gt;
&lt;p&gt;I do not use this setup every single day, but if you want a portable second screen without adding more cables to your desk, it is a very practical option.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;what-i-want-from-a-second-screen-experience&quot;&gt;What I Want from a Second-Screen Experience&lt;/h2&gt;
&lt;p&gt;I wanted a true extended screen, not a remote-control mirror. I did not want accidental touches on the tablet to mess with my main cursor. I wanted the tablet to sit on my left side and behave like a natural extension of my desktop space.&lt;/p&gt;
&lt;p&gt;The ideal use case for me is simple: the main screen for active work, the side screen for docs, serial logs, dashboards, or reference windows. Since it is an actual extended display, dragging content across is fast and natural.&lt;/p&gt;
&lt;p&gt;I also wanted it wireless. I like being able to pick up the tablet and move around when needed. A cable works, but for this use case it quickly becomes visual and practical clutter.&lt;/p&gt;
&lt;h2 id=&quot;solution-overview&quot;&gt;Solution Overview&lt;/h2&gt;
&lt;p&gt;One-line topology:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;PC -&gt; Sunshine (encoding) -&gt; LAN -&gt; Moonlight -&gt; Tablet&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;            |&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;        Parsec-VDD (virtual display)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Role split:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Parsec-VDD: creates the second display target&lt;/li&gt;
&lt;li&gt;Sunshine: captures and encodes that display&lt;/li&gt;
&lt;li&gt;Moonlight: decodes and shows it on the tablet&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;preparation&quot;&gt;Preparation&lt;/h2&gt;
&lt;h3 id=&quot;hardware-requirements&quot;&gt;Hardware Requirements&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A GPU that supports hardware encoding&lt;/li&gt;
&lt;li&gt;A local network (5GHz recommended)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;software-list&quot;&gt;Software List&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Sunshine&lt;/li&gt;
&lt;li&gt;Moonlight&lt;/li&gt;
&lt;li&gt;Parsec-VDD&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once your hardware is ready, the rest is mostly configuration and a bit of verification.&lt;/p&gt;
&lt;h3 id=&quot;how-to-install-and-configure-sunshine&quot;&gt;How to Install and Configure Sunshine&lt;/h3&gt;
&lt;p&gt;I use Windows for this setup, so these are Windows-first steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install Sunshine from the official release.&lt;/li&gt;
&lt;li&gt;Launch Sunshine. The first-time WebUI is usually at &lt;a href=&quot;https://localhost:47990&quot;&gt;&lt;code&gt;https://localhost:47990&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Create your admin account on first login.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;Settings&lt;/code&gt; / &lt;code&gt;Configuration&lt;/code&gt;:
&lt;ul&gt;
&lt;li&gt;In &lt;code&gt;General&lt;/code&gt;, confirm the service is running and enable start-with-system if you want auto-start.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;Video&lt;/code&gt; / &lt;code&gt;Encoder&lt;/code&gt;, choose your encoder backend.&lt;/li&gt;
&lt;li&gt;Keep default ports until the full chain is stable.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;Applications&lt;/code&gt;, click &lt;code&gt;Add&lt;/code&gt; / &lt;code&gt;New&lt;/code&gt; / &lt;code&gt;+&lt;/code&gt;, add &lt;code&gt;Desktop&lt;/code&gt;, then save.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Useful links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/LizardByte/Sunshine&quot;&gt;Sunshine GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/LizardByte/Sunshine/releases&quot;&gt;Sunshine Releases&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Build choice on Windows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;Installer&lt;/code&gt;: best default choice. Easier service setup and easier updates.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Portable&lt;/code&gt;: useful for no-install environments, but you manage more manually.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Service mode in plain terms: Sunshine keeps running in the background as a service, so Moonlight can connect without you re-opening the UI every time.&lt;/p&gt;
&lt;p&gt;WebUI and ports:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Default WebUI is &lt;code&gt;47990&lt;/code&gt; (HTTPS).&lt;/li&gt;
&lt;li&gt;If you change ports later, update firewall rules accordingly.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Encoder choice:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;NVENC&lt;/code&gt; (NVIDIA hardware video encoder)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AMF&lt;/code&gt; (AMD media framework encoder path)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;QSV&lt;/code&gt; (Intel Quick Sync Video encoder path)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After selecting encoder settings, click &lt;code&gt;Save&lt;/code&gt; / &lt;code&gt;Apply&lt;/code&gt;. Do not leave the page without saving.&lt;/p&gt;
&lt;p&gt;NVENC preset:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start with low-latency presets.&lt;/li&gt;
&lt;li&gt;Move toward higher quality only after stability is good.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Bitrate baseline I use:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;1080p60: 20-35 Mbps&lt;/li&gt;
&lt;li&gt;1440p60: 35-55 Mbps&lt;/li&gt;
&lt;li&gt;1600p90: 45-75 Mbps&lt;/li&gt;
&lt;li&gt;4K60: 60-100+ Mbps&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Practical codec pick:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;HEVC / H.265 for better compression efficiency at the same quality.&lt;/li&gt;
&lt;li&gt;H.264 when compatibility or decode stability matters more.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Audio setup (important):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Sunshine &lt;code&gt;Audio&lt;/code&gt;, set output device explicitly (avoid auto if you want predictable routing).&lt;/li&gt;
&lt;li&gt;If you want sound only on the PC, disable audio redirection.&lt;/li&gt;
&lt;li&gt;On Moonlight, go to &lt;code&gt;Settings -&gt; Audio Playback&lt;/code&gt; and disable playback there.&lt;/li&gt;
&lt;li&gt;In Windows, verify your default playback device is still the local speaker/headphone you want.&lt;/li&gt;
&lt;li&gt;Save/Apply Sunshine audio settings after each change.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This avoids the common issue where both PC and tablet play sound at the same time.&lt;/p&gt;
&lt;h3 id=&quot;how-to-install-and-configure-moonlight&quot;&gt;How to Install and Configure Moonlight&lt;/h3&gt;
&lt;p&gt;Moonlight setup is lightweight. Pairing and network correctness are the main points.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install Moonlight on the tablet.&lt;/li&gt;
&lt;li&gt;Make sure tablet and PC are on the same LAN.&lt;/li&gt;
&lt;li&gt;Open Moonlight and let it auto-discover the host.&lt;/li&gt;
&lt;li&gt;If auto-discovery fails, add host manually with your PC IPv4 address.&lt;/li&gt;
&lt;li&gt;Enter the pairing PIN in Sunshine WebUI.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Manual IP steps on Windows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press &lt;code&gt;Win + R&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;cmd&lt;/code&gt;, press Enter.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;ipconfig&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Find the active adapter and read &lt;code&gt;IPv4 Address&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Use that IPv4 address in Moonlight &lt;code&gt;Add Host&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Moonlight links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/moonlight-stream/moonlight-qt&quot;&gt;Moonlight-qt Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/moonlight-stream&quot;&gt;Moonlight Organization&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/moonlight-stream/moonlight-qt/releases&quot;&gt;Moonlight-qt Releases&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;First-pass stream settings:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Start at 1080p, 60fps, moderate bitrate.&lt;/li&gt;
&lt;li&gt;Scale up after it is stable.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Parameter behavior that matters:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Keep source/output/client resolution aligned when possible.&lt;/li&gt;
&lt;li&gt;Keep refresh rates aligned (or integer-related) to avoid uneven cadence.&lt;/li&gt;
&lt;li&gt;Watch frame pacing (frame time consistency), not just average FPS.&lt;/li&gt;
&lt;li&gt;If bandwidth is tight, reduce resolution/FPS before crushing bitrate.&lt;/li&gt;
&lt;li&gt;V-Sync on for smooth office-style use, off for lower interactive latency if needed.&lt;/li&gt;
&lt;li&gt;HDR is optional; keep SDR first until the chain is stable.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;how-to-install-and-configure-parsec-vdd&quot;&gt;How to Install and Configure Parsec-VDD&lt;/h3&gt;
&lt;p&gt;Parsec-VDD is the piece that makes Windows think a second display exists.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install Parsec-VDD.&lt;/li&gt;
&lt;li&gt;Reboot the PC (important: driver enumeration is cleaner after reboot).&lt;/li&gt;
&lt;li&gt;Open Windows Display Settings and confirm a new display appears.&lt;/li&gt;
&lt;li&gt;Switch display mode to &lt;code&gt;Extend these displays&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set resolution and refresh rate on the virtual display.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Useful link:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/nomi-san/parsec-vdd&quot;&gt;Parsec-VDD Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;How the virtual display appears:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After driver install + reboot, Windows display stack enumerates it as an available display output.&lt;/li&gt;
&lt;li&gt;If your VDD build has an enable toggle/tool, enable the virtual screen there first, then return to Windows Display Settings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the important part: mapping Windows display to Sunshine display ID.&lt;/p&gt;
&lt;p&gt;Windows numbers (&lt;code&gt;1/2/3&lt;/code&gt;) are logical labels. Sunshine often lists outputs by its own enumeration order (for example &lt;code&gt;Display 0/1/2&lt;/code&gt; or &lt;code&gt;\\.\\DISPLAY1/2&lt;/code&gt;). They are often related, but not guaranteed to match one-to-one.&lt;/p&gt;
&lt;p&gt;Reliable mapping workflow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Windows, make the virtual display easy to recognize:
&lt;ul&gt;
&lt;li&gt;set a unique resolution (for example 1280x720), or&lt;/li&gt;
&lt;li&gt;switch it to portrait, or&lt;/li&gt;
&lt;li&gt;drag it to the far left in display arrangement.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;In Sunshine WebUI, go to &lt;code&gt;Settings/Configuration -&gt; Video/Display/Capture&lt;/code&gt; (wording may vary by version).&lt;/li&gt;
&lt;li&gt;Find the target selector (&lt;code&gt;Display&lt;/code&gt; / &lt;code&gt;Monitor&lt;/code&gt; / &lt;code&gt;Output&lt;/code&gt;) and pick one display ID.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Save&lt;/code&gt; / &lt;code&gt;Apply&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Connect from Moonlight and verify what you see.&lt;/li&gt;
&lt;li&gt;If it is the wrong screen, switch to the next display ID in Sunshine, save again, reconnect, and verify again.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This takes a minute once, then stays stable.&lt;/p&gt;
&lt;p&gt;Known recovery trick when extend mode does not react:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Windows Display Settings, switch to &lt;code&gt;Show only on 2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click Apply.&lt;/li&gt;
&lt;li&gt;Switch back to &lt;code&gt;Extend these displays&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This often refreshes display state and brings the virtual output back into a usable state.&lt;/p&gt;
&lt;p&gt;If still broken, check:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You rebooted after VDD install.&lt;/li&gt;
&lt;li&gt;Virtual display is not disabled.&lt;/li&gt;
&lt;li&gt;Advanced display settings show valid refresh modes.&lt;/li&gt;
&lt;li&gt;Manually disable/re-enable the virtual screen once.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;performance-tuning-notes&quot;&gt;Performance Tuning Notes&lt;/h3&gt;
&lt;p&gt;The goal is stable low latency, not maximum numbers on paper.&lt;/p&gt;
&lt;p&gt;Tuning order I use:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Network first
&lt;ul&gt;
&lt;li&gt;PC on Ethernet if possible.&lt;/li&gt;
&lt;li&gt;Tablet on 5GHz/6GHz Wi-Fi.&lt;/li&gt;
&lt;li&gt;Avoid heavy transfers on the same LAN while streaming.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Stream parameters second
&lt;ul&gt;
&lt;li&gt;Lock stable 60fps first, then push 90/120.&lt;/li&gt;
&lt;li&gt;Raise bitrate gradually.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Encoding path third
&lt;ul&gt;
&lt;li&gt;Prefer hardware encoding.&lt;/li&gt;
&lt;li&gt;Avoid software encoding (CPU path) for this use case.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;System power and load
&lt;ul&gt;
&lt;li&gt;Keep laptop plugged in.&lt;/li&gt;
&lt;li&gt;Use high-performance power mode.&lt;/li&gt;
&lt;li&gt;Close heavy background workloads.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Bandwidth reality:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Codec bitrate is baseline demand, not total overhead-inclusive traffic.&lt;/li&gt;
&lt;li&gt;Keep practical throughput headroom (around 25%-40%).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Latency usually accumulates from:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Encode queue&lt;/li&gt;
&lt;li&gt;Wireless contention&lt;/li&gt;
&lt;li&gt;Router queueing/forwarding&lt;/li&gt;
&lt;li&gt;Decode + display sync&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Wi-Fi 5 vs Wi-Fi 6 in this use case:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wi-Fi 5 can be enough.&lt;/li&gt;
&lt;li&gt;Wi-Fi 6 tends to reduce jitter under multi-device load.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Monitor GPU correctly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Watch &lt;code&gt;Video Encode&lt;/code&gt; engine utilization, not only 3D usage.&lt;/li&gt;
&lt;li&gt;If encode is saturated, lower resolution/FPS/bitrate before anything else.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;technical-notes-optional-read&quot;&gt;Technical Notes (Optional Read)&lt;/h2&gt;
&lt;h3 id=&quot;why-this-feels-lower-latency&quot;&gt;Why This Feels Lower-Latency&lt;/h3&gt;
&lt;p&gt;The path is designed for real-time frame delivery.&lt;/p&gt;
&lt;p&gt;High-level flow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;App renders frame.&lt;/li&gt;
&lt;li&gt;Compositor outputs to target display surface.&lt;/li&gt;
&lt;li&gt;Sunshine captures that frame buffer.&lt;/li&gt;
&lt;li&gt;Hardware encoder (NVENC/AMF/QSV) compresses the frame.&lt;/li&gt;
&lt;li&gt;Stream crosses LAN.&lt;/li&gt;
&lt;li&gt;Moonlight decodes and presents.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Latency behavior comes from each queue in that path.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lower-latency encoder presets reduce internal buffering and lookahead.&lt;/li&gt;
&lt;li&gt;Network jitter is handled by a jitter buffer on the client side.&lt;/li&gt;
&lt;li&gt;Bigger jitter buffer improves stability but adds delay.&lt;/li&gt;
&lt;li&gt;Smaller jitter buffer cuts delay but can increase visible hiccups.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Why traditional remote desktop paths often feel slower in this context:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They are generally optimized for desktop readability, reliability, and compatibility.&lt;/li&gt;
&lt;li&gt;Their buffering/retransmission behavior is usually more conservative.&lt;/li&gt;
&lt;li&gt;That helps office remoting quality, but it is not tuned for minimum interactive frame latency.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;wrap-up&quot;&gt;Wrap-up&lt;/h3&gt;
&lt;p&gt;For me, this setup is not a gimmick. It is a practical second screen that I can carry around.&lt;/p&gt;
&lt;p&gt;The upside is clear: wireless workflow, low-latency feel, and enough control to tune for your own network and hardware.&lt;/p&gt;
&lt;p&gt;It works especially well if you move between places and do not want to buy duplicate monitor setups.&lt;/p&gt;
&lt;p&gt;The main thing to remember is that stability comes from process: get the virtual display right, map display ID correctly, then tune bitrate/FPS step by step.&lt;/p&gt;
&lt;p&gt;Once configured properly, daily use is mostly just connect and go.&lt;/p&gt;</content:encoded><category>sunshine</category><category>tools</category><category>guide</category><category>screen-streaming</category><category>virtual-display</category><category>EN</category></item><item><title>How I Keep My Anime Watching Stable</title><link>https://danarnoux.com/blog/how-i-keep-my-anime-watching-stable-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/how-i-keep-my-anime-watching-stable-en/</guid><description>A practical, slightly nerdy, and hopefully friendly guide to watching anime more steadily with the tools I actually use.</description><pubDate>Sat, 14 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;How do you keep up with anime, or more importantly, how do you keep up &lt;em&gt;consistently&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;When a new show starts, sometimes it needs a paid membership on one app, sometimes it is not even licensed in your region yet, and sometimes even after licensing, you still wait extra weeks for delayed release windows. A classic case for me was &lt;em&gt;Lycoris Recoil&lt;/em&gt;. Every week I was waiting for the newest episode like my life depended on it.&lt;/p&gt;
&lt;p&gt;I even tried watching Japanese TV broadcasts directly with my very questionable Japanese skills. That ended exactly how you expect: confusion, panic, and me staring at the screen like a lost NPC.&lt;/p&gt;
&lt;p&gt;So yes, I was in a hurry. Platforms like Bilibili could work, but often lagged behind official release timing by weeks. And if you know that show, you know why being late felt rough. I felt like a clown by the time I caught up.&lt;/p&gt;
&lt;p&gt;Have you had this too: you search a title, click a random site, and the video quality is blurry, unstable, or heavily edited; subtitles are inconsistent; and if you like watching with danmaku, the experience is all over the place. The good news is these problems can be improved. This post is basically how I made my anime-watching flow less chaotic and more reliable.&lt;/p&gt;
&lt;hr&gt;
&lt;blockquote class=&quot;markdown-alert markdown-alert-warning&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;warning&lt;/p&gt;
&lt;p&gt;This post only shares personal workflow and tool usage ideas. It does not provide unauthorized content sources. Please follow local laws and platform terms in your region.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;1-how-i-get-content&quot;&gt;1. How I Get Content&lt;/h2&gt;
&lt;p&gt;Let me be clear first: this is not a piracy tutorial. This is a “how to reduce chaos” tutorial.&lt;/p&gt;
&lt;p&gt;My order is simple: check legal options in my region first, then decide whether I need local playback for better quality/subtitle control.&lt;/p&gt;
&lt;h3 id=&quot;why-do-i-still-download-for-local-playback&quot;&gt;Why do I still download for local playback?&lt;/h3&gt;
&lt;p&gt;Not everyone needs local playback. But if you care about quality consistency, subtitle control, release timing, and archive stability, local playback helps a lot.&lt;/p&gt;
&lt;p&gt;I treat it like this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Platform streaming: fast and convenient, great for casual watching.&lt;/li&gt;
&lt;li&gt;Local playback: better control, better consistency, better for rewatching.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you watch casually, streaming may be enough. If you are picky like me, local playback is often worth it.&lt;/p&gt;
&lt;h3 id=&quot;what-is-a-magnet-link&quot;&gt;What is a magnet link?&lt;/h3&gt;
&lt;p&gt;A magnet link (Magnet URI) is a technical identifier. It tells a client what content hash to look for; it does not automatically mean “this is where to legally get content.”&lt;/p&gt;
&lt;p&gt;You will often see it with P2P workflows. P2P (Peer-to-Peer) means participants exchange data with each other instead of relying only on one central server. So speed can change based on peers online, their upload rates, and your network path.&lt;/p&gt;
&lt;p&gt;Technology itself is neutral. Usage still needs to be legal.&lt;/p&gt;
&lt;h3 id=&quot;so-how-do-i-get-anime-magnet-links-then&quot;&gt;So how do I get anime magnet links then?&lt;/h3&gt;
&lt;p&gt;I do not provide unauthorized source instructions here.&lt;/p&gt;
&lt;p&gt;My practical approach: confirm licensing in your region first, then use legal channels. If you just want to start watching today, these are common legitimate platforms to check first:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.bilibili.com/anime/&quot;&gt;Bilibili Anime&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://v.qq.com/channel/cartoon&quot;&gt;Tencent Video Anime&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.iqiyi.com/dongman/&quot;&gt;iQIYI Anime&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youku.com/channel/webcomic&quot;&gt;Youku Anime&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.netflix.com/browse/genre/7424&quot;&gt;Netflix Anime Category&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.crunchyroll.com/&quot;&gt;Crunchyroll&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Catalogs vary a lot by region, which is normal. I usually build a weekly watchlist first, then map each title to whichever legal platform actually has it.&lt;/p&gt;
&lt;h4 id=&quot;what-are-fansub-groups-what-does-dual-chinese-internal-subtitles-mean&quot;&gt;What are fansub groups? What does dual Chinese internal subtitles mean?&lt;/h4&gt;
&lt;p&gt;You will see these terms sooner or later.&lt;/p&gt;
&lt;p&gt;A fansub group usually handles translation, timing, editing, and packaging. “Internal subtitles” means subtitle tracks are embedded in the media container. “Dual Chinese” often means both Simplified and Traditional subtitle tracks are included.&lt;/p&gt;
&lt;p&gt;If subtitles exist but look terrible, check three things first: subtitle renderer, missing fonts, and whether you selected the correct subtitle track.&lt;/p&gt;
&lt;h3 id=&quot;how-do-i-download-from-a-magnet-link&quot;&gt;How do I download from a magnet link?&lt;/h3&gt;
&lt;p&gt;I will only cover tool usage here, not source discovery.&lt;/p&gt;
&lt;p&gt;The practical idea is simple: use one stable downloader and keep your path settings consistent. That way your player, danmaku workflow, and RSS setup all stay clean.&lt;/p&gt;
&lt;h4 id=&quot;qbittorrent&quot;&gt;qbittorrent&lt;/h4&gt;
&lt;p&gt;qBittorrent is still my primary client. It feels like a proper tool: clean, transparent, and direct.&lt;/p&gt;
&lt;p&gt;Official download links:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.qbittorrent.org/&quot;&gt;qBittorrent official site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.qbittorrent.org/download&quot;&gt;qBittorrent download page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/qbittorrent/qBittorrent/releases&quot;&gt;qBittorrent GitHub Releases&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If the official site is inaccessible for you, GitHub releases work fine. On Windows, use this quick rule:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open Releases and pick the latest stable version (not pre-release).&lt;/li&gt;
&lt;li&gt;Expand &lt;code&gt;Assets&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;For most users, download the installer: usually &lt;code&gt;qbittorrent_&amp;#x3C;version&gt;_x64_setup.exe&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you want portable mode, download the &lt;code&gt;x64.zip&lt;/code&gt; build and run &lt;code&gt;qbittorrent.exe&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Do &lt;strong&gt;not&lt;/strong&gt; download &lt;code&gt;Source code (zip/tar.gz)&lt;/code&gt; unless you actually plan to build from source.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If this is your first time, here is the beginner-friendly flow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install qBittorrent.&lt;/li&gt;
&lt;li&gt;Go to &lt;code&gt;Tools -&gt; Options -&gt; Downloads&lt;/code&gt;, set a default save path (for example &lt;code&gt;AnimeWorkspace/_incoming&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Copy your magnet link.&lt;/li&gt;
&lt;li&gt;qBittorrent usually pops up an “Add Torrent” window automatically.&lt;/li&gt;
&lt;li&gt;If it does not pop up, click the chain/link icon and paste it manually.&lt;/li&gt;
&lt;li&gt;In the dialog, check save path, file list, and whether to start immediately.&lt;/li&gt;
&lt;li&gt;Click confirm and watch status.&lt;/li&gt;
&lt;li&gt;When status changes from downloading to seeding, download is complete.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;What I check before moving a file into my main library:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;File size looks reasonable.&lt;/li&gt;
&lt;li&gt;Video duration makes sense.&lt;/li&gt;
&lt;li&gt;Subtitle track exists and is usable.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Pros in plain language:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Stable for long-running tasks.&lt;/li&gt;
&lt;li&gt;Highly controllable paths and categories.&lt;/li&gt;
&lt;li&gt;Great RSS automation support for weekly updates.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Cons in plain language:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;UI is not “cute beginner mode”; it looks technical.&lt;/li&gt;
&lt;li&gt;Speed fluctuates with peer/network conditions.&lt;/li&gt;
&lt;li&gt;If you hate all settings screens, it may feel a bit nerdy.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;About those country flags in peers list (this confuses many people):&lt;/p&gt;
&lt;p&gt;The flag usually represents the IP geolocation of connected peers. In plain words, it shows where those network nodes are estimated to be.&lt;/p&gt;
&lt;p&gt;It is &lt;em&gt;not&lt;/em&gt; a legal guarantee, not a quality score, and not always perfectly accurate.&lt;/p&gt;
&lt;h4 id=&quot;quark-drive-non-sponsored&quot;&gt;Quark Drive (non-sponsored)&lt;/h4&gt;
&lt;p&gt;I use Quark as an acceleration option in some cases, mostly for convenience.&lt;/p&gt;
&lt;p&gt;In my home setup (gigabit line), with membership, I can often see around &lt;code&gt;50-60 MB/s&lt;/code&gt; on many tasks.&lt;/p&gt;
&lt;p&gt;Compared with qBittorrent, the difference is often not “which app is objectively stronger” but “how the backend works.” Quark can feel more stable in speed because part of the process is platform-assisted. qBittorrent is direct P2P, so it can be very fast on good swarms and slower on weak ones.&lt;/p&gt;
&lt;p&gt;Download link:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.quark.cn/&quot;&gt;Quark official site&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;xunlei-non-sponsored&quot;&gt;Xunlei (non-sponsored)&lt;/h4&gt;
&lt;p&gt;Xunlei is often called “leech thunder” in old P2P discussions. That label comes from long-running debates about fairness in sharing behavior.&lt;/p&gt;
&lt;p&gt;The core argument is simple: if too many clients take bandwidth but contribute less back, swarm health goes down and everyone eventually suffers.&lt;/p&gt;
&lt;p&gt;Download link:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.xunlei.com/&quot;&gt;Xunlei official site&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;2-choose-your-player&quot;&gt;2. Choose Your Player&lt;/h2&gt;
&lt;p&gt;Downloading is only step one. Playback quality is where your daily experience is won or lost.&lt;/p&gt;
&lt;h3 id=&quot;potplayer&quot;&gt;potplayer&lt;/h3&gt;
&lt;p&gt;PotPlayer is my main local player when I care about details.&lt;/p&gt;
&lt;p&gt;Official download:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://potplayer.daum.net/&quot;&gt;PotPlayer official site&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Beginner install path:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download Windows installer from the official page.&lt;/li&gt;
&lt;li&gt;Run installer and keep default options unless you have specific needs.&lt;/li&gt;
&lt;li&gt;Open one known-good video first before touching advanced settings.&lt;/li&gt;
&lt;li&gt;After confirming playback works, do basic tuning.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Basic setup I recommend first:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Associate common formats (&lt;code&gt;mkv&lt;/code&gt;, &lt;code&gt;mp4&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Enable auto-loading same-name subtitle files.&lt;/li&gt;
&lt;li&gt;Ensure hardware decoding stays enabled.&lt;/li&gt;
&lt;li&gt;Keep audio output defaults initially.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Why it is good:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Strong decoding compatibility.&lt;/li&gt;
&lt;li&gt;Excellent subtitle styling control.&lt;/li&gt;
&lt;li&gt;Fast switching between tracks/subtitles.&lt;/li&gt;
&lt;li&gt;Stable local experience without platform UI drama.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Common beginner issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Stutter: check hardware decode and heavy filters.&lt;/li&gt;
&lt;li&gt;Weird subtitle rendering: check renderer mode and fonts.&lt;/li&gt;
&lt;li&gt;Audio oddities: switch output device or test another track.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;My normal use is boring and reliable: open file, confirm subtitle/audio tracks, only tweak settings if needed.&lt;/p&gt;
&lt;h3 id=&quot;dandanplay&quot;&gt;dandanplay&lt;/h3&gt;
&lt;p&gt;dandanplay is very anime-friendly. It combines playback, danmaku, and show metadata in one place.&lt;/p&gt;
&lt;p&gt;Official download:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://www.dandanplay.com/&quot;&gt;dandanplay official site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/kaedei/dandanplay/releases&quot;&gt;GitHub Releases (Windows builds)&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you download from GitHub on Windows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Pick the latest release with &lt;code&gt;windows-&lt;/code&gt; in the tag/title.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;Assets&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Prefer installer &lt;code&gt;.exe&lt;/code&gt; with &lt;code&gt;Setup&lt;/code&gt; in filename.&lt;/li&gt;
&lt;li&gt;On 64-bit Windows, prefer &lt;code&gt;x64&lt;/code&gt; builds when available.&lt;/li&gt;
&lt;li&gt;If you want portable mode, choose &lt;code&gt;.zip&lt;/code&gt; and run &lt;code&gt;dandanplay.exe&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Do &lt;strong&gt;not&lt;/strong&gt; download &lt;code&gt;Source code (zip/tar.gz)&lt;/code&gt; for normal use.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Initial setup flow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install app and launch.&lt;/li&gt;
&lt;li&gt;Add your anime folder to library.&lt;/li&gt;
&lt;li&gt;Let it scan once.&lt;/li&gt;
&lt;li&gt;Open one episode and verify match.&lt;/li&gt;
&lt;li&gt;Adjust danmaku opacity/speed/font size to comfort.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Why it is good:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Anime-focused workflow out of the box.&lt;/li&gt;
&lt;li&gt;Better title/episode matching than many generic players.&lt;/li&gt;
&lt;li&gt;Danmaku integration is smooth.&lt;/li&gt;
&lt;li&gt;Lower setup friction for regular users.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If danmaku looks chaotic at first, that is usually settings, not app failure. Lower speed a bit, reduce track count, and increase transparency.&lt;/p&gt;
&lt;h3 id=&quot;quark-drive&quot;&gt;Quark Drive&lt;/h3&gt;
&lt;p&gt;I use this as a light playback fallback on other devices.&lt;/p&gt;
&lt;p&gt;Convenient for quick switching, less ideal for fine subtitle/decoder control.&lt;/p&gt;
&lt;h2 id=&quot;3-how-to-configure-danmaku-in-dandanplay&quot;&gt;3. How to Configure Danmaku in dandanplay&lt;/h2&gt;
&lt;p&gt;Danmaku quality is all about tuning. Good settings feel immersive; bad settings feel noisy.&lt;/p&gt;
&lt;h3 id=&quot;what-is-danmaku&quot;&gt;What is danmaku?&lt;/h3&gt;
&lt;p&gt;Danmaku is timestamped viewer commentary synchronized to specific timeline moments.&lt;/p&gt;
&lt;p&gt;The fun part is you can still “watch with others” asynchronously.&lt;/p&gt;
&lt;h3 id=&quot;what-is-a-danmaku-source&quot;&gt;What is a danmaku source?&lt;/h3&gt;
&lt;p&gt;It is where danmaku data comes from. Different sources vary in volume, quality, moderation style, and timing precision.&lt;/p&gt;
&lt;h3 id=&quot;choosing-a-danmaku-source&quot;&gt;Choosing a danmaku source&lt;/h3&gt;
&lt;p&gt;My practical order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check timeline alignment first on one test episode.&lt;/li&gt;
&lt;li&gt;Check text quality (spam/repeat/noise).&lt;/li&gt;
&lt;li&gt;Only then evaluate quantity.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I recommend keeping 1-2 stable sources instead of switching every week.&lt;/p&gt;
&lt;h2 id=&quot;4-what-is-rss-subscription&quot;&gt;4. What is RSS Subscription?&lt;/h2&gt;
&lt;p&gt;RSS in plain English: automatic update notifications.&lt;/p&gt;
&lt;p&gt;Think of it as a subscription inbox. When a source updates, you get a structured feed item without manually checking pages every day.&lt;/p&gt;
&lt;p&gt;Technically it is a standardized feed format (often XML-based, such as RSS or Atom). It helps discover updates; it does not automatically download files by itself.&lt;/p&gt;
&lt;h3 id=&quot;how-to-use-qbittorrent-for-anime-rss-subscriptions&quot;&gt;How to use qBittorrent for anime RSS subscriptions?&lt;/h3&gt;
&lt;p&gt;In qBittorrent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;RSS discovers new items.&lt;/li&gt;
&lt;li&gt;Download rules decide what to grab.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Windows-friendly setup flow:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open qBittorrent &lt;code&gt;View&lt;/code&gt; and enable &lt;code&gt;RSS Reader&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add your legal feed URL in RSS panel.&lt;/li&gt;
&lt;li&gt;Confirm feed updates are visible.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;RSS Downloader&lt;/code&gt; (auto-download rules) and create one rule.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I recommend starting with these fields:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Must contain: title + season keyword.&lt;/li&gt;
&lt;li&gt;Optional contains: &lt;code&gt;1080p&lt;/code&gt;, language tags, preferred release tags.&lt;/li&gt;
&lt;li&gt;Must not contain: trailers/NCOP/other unwanted items.&lt;/li&gt;
&lt;li&gt;Save path: your fixed download folder.&lt;/li&gt;
&lt;li&gt;Smart episode filter: avoid duplicates.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Start conservative:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run manually for 3-7 days.&lt;/li&gt;
&lt;li&gt;Check mis-matches.&lt;/li&gt;
&lt;li&gt;Tighten or relax keywords.&lt;/li&gt;
&lt;li&gt;Only then enable full auto-download.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Quick troubleshooting list:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Feed does not update: verify URL/network/source activity.&lt;/li&gt;
&lt;li&gt;Items appear but nothing downloads: rule mismatch.&lt;/li&gt;
&lt;li&gt;Wrong versions downloaded: tighten must-contain filters.&lt;/li&gt;
&lt;li&gt;Duplicate downloads: enable smart filters.&lt;/li&gt;
&lt;li&gt;Wrong folder: set per-rule path explicitly.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once this is tuned, weekly tracking becomes much easier. You move from “daily manual searching” to “quick weekly rule maintenance,” which is honestly a huge quality-of-life upgrade.&lt;/p&gt;</content:encoded><category>anime</category><category>p2p</category><category>tools</category><category>guide</category><category>EN</category></item><item><title>How to Build a Personal Blog Website</title><link>https://danarnoux.com/blog/how-to-build-a-personal-blog-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/how-to-build-a-personal-blog-en/</guid><description>Build a personal blog with Astro and Tailwind CSS, without dealing with your own server and domain setup from day one.</description><pubDate>Thu, 12 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;preface&quot;&gt;Preface&lt;/h2&gt;
&lt;p&gt;When I realized I was remembering less and less of my technical ideas, I started writing things down in my phone notes during sleepless nights. But phone notes are limited, and I could not access everything smoothly across devices.&lt;/p&gt;
&lt;p&gt;In January this year, during another late night, I thought: if I get some time, I should build a personal blog. I want to write down meaningful things for myself, for students I have taught, and maybe for students I will teach in the future.&lt;/p&gt;
&lt;p&gt;The problem was: I was very busy. I had just returned from a business trip in Jiangsu. One night, still unable to sleep, I remembered this plan again. It was already very late, so I did not want to disturb friends who had built blogs before. I guessed the whole thing might take around a week.&lt;/p&gt;
&lt;p&gt;The next morning, I asked my high school friend Herbert Skyper. His answer: around one week too. He hand-built his version with Vue (no mature blog framework, mostly for frontend fun). When I visited him later, we talked more. Domain cost is usually not expensive per year, but server/public IP/stability are often the annoying parts.&lt;/p&gt;
&lt;p&gt;One of the biggest headaches of running a website is exactly this: domain name, reliable always-on machine (or server), public network accessibility, and so on. There are ways to solve all of these, but if you can avoid extra operations in the early stage, that is usually better.&lt;/p&gt;
&lt;p&gt;Skyper mentioned some classmates using &lt;a href=&quot;https://docs.astro.build/&quot;&gt;Astro&lt;/a&gt;, which is a mature framework. Later my friend kymi replied too; he writes with &lt;a href=&quot;https://hexo.io/&quot;&gt;Hexo&lt;/a&gt; and has a related tutorial: &lt;a href=&quot;https://licyk.github.io/2024/06/26/how-to-deploy-hexo/&quot;&gt;How to Deploy a Blog with Hexo&lt;/a&gt;. He also said deployment on GitHub is not too time-consuming, and it avoids server/domain costs at the start.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;requirements-analysis&quot;&gt;Requirements Analysis&lt;/h2&gt;
&lt;h3 id=&quot;what-exactly-do-i-need&quot;&gt;What exactly do I need?&lt;/h3&gt;
&lt;p&gt;I need something like a “pro memo” that I can read anytime, and others can read too, without costing too much time or money.&lt;/p&gt;
&lt;p&gt;Content comes first, but I also want a little personality in the design. Something simple, rational, and restrained, but still gentle, with small colorful details that can make people smile.&lt;/p&gt;
&lt;h3 id=&quot;technical-route&quot;&gt;Technical Route&lt;/h3&gt;
&lt;p&gt;So why did I choose Astro?&lt;/p&gt;
&lt;p&gt;I compared several blog frameworks first: their pros, cons, and which one fits me best. Since I have used ChatGPT for years, it has a decent idea of my technical level, and I organized its suggestions into the table below.&lt;/p&gt;
&lt;h4 id=&quot;blog-framework-comparison&quot;&gt;Blog Framework Comparison&lt;/h4&gt;


















































































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Framework&lt;/th&gt;&lt;th&gt;Tech Stack&lt;/th&gt;&lt;th&gt;Build Speed&lt;/th&gt;&lt;th&gt;Writing Experience&lt;/th&gt;&lt;th&gt;Component/Interaction Power&lt;/th&gt;&lt;th&gt;Extensibility&lt;/th&gt;&lt;th&gt;GitHub Pages Fit&lt;/th&gt;&lt;th&gt;Best For&lt;/th&gt;&lt;th&gt;Common Pitfalls&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Hexo&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Node.js&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Easy to start, many themes&lt;/td&gt;&lt;td&gt;Weaker (template-centric)&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Mature and stable&lt;/td&gt;&lt;td&gt;Pure writing, Chinese ecosystem&lt;/td&gt;&lt;td&gt;Node dependencies may be annoying&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Hugo&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Go&lt;/td&gt;&lt;td&gt;Very fast&lt;/td&gt;&lt;td&gt;Clear structure&lt;/td&gt;&lt;td&gt;Moderate (content-driven)&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Very stable&lt;/td&gt;&lt;td&gt;Speed-focused, low maintenance&lt;/td&gt;&lt;td&gt;Theme config can feel too engineering-ish&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Astro&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Modern frontend (React/Vue/Svelte)&lt;/td&gt;&lt;td&gt;Fast&lt;/td&gt;&lt;td&gt;Great Markdown/MDX experience&lt;/td&gt;&lt;td&gt;Strong (component mixing)&lt;/td&gt;&lt;td&gt;Strong&lt;/td&gt;&lt;td&gt;Need to handle &lt;code&gt;base&lt;/code&gt; carefully&lt;/td&gt;&lt;td&gt;Frontend developers&lt;/td&gt;&lt;td&gt;High freedom means more decisions&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Next.js / Nuxt&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;React / Vue full-stack&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Good&lt;/td&gt;&lt;td&gt;Very strong&lt;/td&gt;&lt;td&gt;Very strong&lt;/td&gt;&lt;td&gt;Static export needs prefix care&lt;/td&gt;&lt;td&gt;People planning larger platforms&lt;/td&gt;&lt;td&gt;Slightly heavy for pure blogs&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;VitePress / Docusaurus&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Vite / React&lt;/td&gt;&lt;td&gt;Fast&lt;/td&gt;&lt;td&gt;Excellent for documentation&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Very stable&lt;/td&gt;&lt;td&gt;Technical docs-style content&lt;/td&gt;&lt;td&gt;Less “blog vibe”&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Jekyll&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Ruby&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Traditional Markdown&lt;/td&gt;&lt;td&gt;Weaker&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Native support&lt;/td&gt;&lt;td&gt;Minimal deployment overhead seekers&lt;/td&gt;&lt;td&gt;Less modern by today’s standards&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;h4 id=&quot;decision-oriented-summary&quot;&gt;Decision-Oriented Summary&lt;/h4&gt;



































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Requirement Type&lt;/th&gt;&lt;th&gt;Recommended Option&lt;/th&gt;&lt;th&gt;Why&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Pure writing, mature theme ecosystem&lt;/td&gt;&lt;td&gt;Hexo / Hugo&lt;/td&gt;&lt;td&gt;Classic and stable&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lots of technical posts, fastest builds&lt;/td&gt;&lt;td&gt;Hugo&lt;/td&gt;&lt;td&gt;Extremely fast build speed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Blog + project showcase + interactions&lt;/td&gt;&lt;td&gt;&lt;strong&gt;Astro&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;Markdown + components is very strong&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Might evolve into personal platform&lt;/td&gt;&lt;td&gt;Next.js / Nuxt&lt;/td&gt;&lt;td&gt;Strong full-stack capability&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;More documentation-oriented&lt;/td&gt;&lt;td&gt;VitePress / Docusaurus&lt;/td&gt;&lt;td&gt;Great structure and TOC management&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;ChatGPT told me Astro’s flexibility can feel like a pitfall because you need to make more choices yourself. For me, that is actually an advantage: I can choose the components and style I like.&lt;/p&gt;
&lt;p&gt;At first I considered Cloudflare. But once I decided to push the project to GitHub anyway, GitHub Pages became super convenient: configure once, then update via &lt;code&gt;push&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&quot;deployment-cost-snapshot&quot;&gt;Deployment Cost Snapshot&lt;/h4&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Item&lt;/th&gt;&lt;th&gt;Reality&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Server cost&lt;/td&gt;&lt;td&gt;Usually 0 with GitHub Pages / Cloudflare Pages / Vercel&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Domain cost&lt;/td&gt;&lt;td&gt;&lt;code&gt;username.github.io&lt;/code&gt; is free; custom domains usually cost money&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Maintenance overhead&lt;/td&gt;&lt;td&gt;Almost 0 for static sites&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Astro supports modern frontend component ecosystems, so which components should you choose?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Your technical route shapes your blog’s personality and tone.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One key mindset correction first&lt;/strong&gt;: this is Astro’s strength, not a limitation.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Astro is not “a Vue-based blog framework”. It is:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;👉 &lt;strong&gt;Astro = static-site framework + optional Vue components when needed&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;ChatGPT recommended &lt;a href=&quot;https://tailwindcss.com/plus/ui-blocks/marketing&quot;&gt;Tailwind CSS&lt;/a&gt; and suggested a style that is timeless, professional, and easy to live with in the long term. I agree.&lt;/p&gt;
&lt;p&gt;At this stage, I still prefer introducing only a small number of components to avoid complexity.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Less is more.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h4 id=&quot;development-environment&quot;&gt;Development Environment&lt;/h4&gt;
&lt;p&gt;I use &lt;strong&gt;VS Code&lt;/strong&gt; as my text editor, and I installed the Astro extension.&lt;/p&gt;
&lt;blockquote class=&quot;markdown-alert markdown-alert-note&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;note&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Node.js&lt;/strong&gt; - &lt;code&gt;v18.20.8&lt;/code&gt;, &lt;code&gt;v20.3.0&lt;/code&gt;, &lt;code&gt;v22.0.0&lt;/code&gt;, or higher (&lt;code&gt;v19&lt;/code&gt; and &lt;code&gt;v21&lt;/code&gt; are not supported).&lt;/p&gt;
&lt;p&gt;Astro is built with Vite. Vite targets modern JavaScript browsers by default. See the browser support list in Vite docs: &lt;a href=&quot;https://cn.vite.dev/guide/build#browser-compatibility&quot;&gt;Browser Compatibility&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Terminal&lt;/strong&gt; - Astro is operated via CLI.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id=&quot;let-ai-code-build-the-first-skeleton-for-you&quot;&gt;Let AI Code Build the First Skeleton for You&lt;/h2&gt;
&lt;p&gt;Once your requirements and technical direction are clear, you can treat AI as a “scaffolding assistant” and let it create a runnable version first.&lt;/p&gt;
&lt;p&gt;My habit is simple: let AI produce a quick first draft, then do a second refinement pass manually. This is much more efficient and helps you avoid getting stuck at step one.&lt;/p&gt;
&lt;h3 id=&quot;prompt-set-i-actually-use-copy-paste-ready&quot;&gt;Prompt Set I Actually Use (Copy-Paste Ready)&lt;/h3&gt;
&lt;p&gt;You can paste this to AI tools like ChatGPT, Codex, or Cursor:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;You are a senior frontend engineer. Help me build an Astro personal blog project from 0 to 1.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Goals:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1) Tech stack: Astro + Tailwind CSS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2) Content: Markdown-based writing&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;3) Deployment: GitHub Pages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4) Requirements: beginner-friendly maintenance, clear project structure, clean and restrained style&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Output format:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1) First, provide the project directory tree&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2) Then provide commands to run (in order)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;3) Then provide full content for key files (astro.config.mjs, package.json, basic pages, blog content dirs)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4) Explain &quot;why&quot; for every step&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;5) Finally provide a troubleshooting checklist (common errors + fixes)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Constraints:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;- Do not skip steps&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;- Do not omit key configurations&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;- All commands must be directly runnable&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;- Prioritize stable solutions over fancy tricks&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;second-round-prompt-ask-ai-to-improve-not-rewrite&quot;&gt;Second-Round Prompt (Ask AI to Improve, Not Rewrite)&lt;/h3&gt;
&lt;p&gt;After the first version runs, give AI this:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;This is my current project state. Please make incremental changes on top of the existing structure. Do not rewrite from scratch.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Goals:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1) Keep existing routes unchanged&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2) Improve homepage layout and blog list style&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;3) Add tags page&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4) Ensure npm run build passes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Output requirements:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1) Only list files that need modification&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2) For each file, provide minimal diff&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;3) Include verification commands after changes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This “incremental modification” style prompt is important. Otherwise AI may accidentally replace things you already wrote.&lt;/p&gt;
&lt;p&gt;For example, this is the kind of effect I got when I locked requirements and asked Codex to scaffold it. It is great for getting started. If you feel stuck during debugging, ask AI to help write a precise prompt first. It is often more effective than saying “move this thing a bit left/right.” AI code assistants are smart, but they cannot see your screen.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-build-step2.png&quot; alt=&quot;step2&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;
&lt;h3 id=&quot;install-nodejs-windows&quot;&gt;Install Node.js (Windows)&lt;/h3&gt;
&lt;p&gt;Node.js download page:
&lt;a href=&quot;https://nodejs.org/en/download&quot;&gt;https://nodejs.org/en/download&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The simplest way is opening that page and clicking &lt;strong&gt;Windows Installer (.msi)&lt;/strong&gt;.&lt;/p&gt;
&lt;h4 id=&quot;steps&quot;&gt;Steps&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Double-click the installer.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Next&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Accept the license and click &lt;code&gt;Next&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Default path is usually &lt;code&gt;C:\Program Files\nodejs\&lt;/code&gt; (you can change it).&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Install&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Finish&lt;/code&gt; when done.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote class=&quot;markdown-alert markdown-alert-tip&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;tip&lt;/p&gt;
&lt;p&gt;After installation, test Node/NPM in &lt;code&gt;cmd&lt;/code&gt; or PowerShell.
The fastest way to open &lt;code&gt;cmd&lt;/code&gt;: &lt;code&gt;Win + R&lt;/code&gt;, type &lt;code&gt;cmd&lt;/code&gt;, press Enter.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;node&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -v&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -v&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# example&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C:\Users\Dan&gt;node -v&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;v24.13.0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;if-network-is-slow-downloadinstall-timeout&quot;&gt;If Network Is Slow (download/install timeout)&lt;/h4&gt;
&lt;p&gt;This is a very common beginner issue and not your fault.
Often the connection to the official npm registry is simply slow.&lt;/p&gt;
&lt;p&gt;You can switch npm registry to a domestic mirror first:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# check current registry&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; config&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; get&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; registry&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# switch to npmmirror&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; config&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; registry&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://registry.npmmirror.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# verify again&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; config&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; get&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; registry&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to switch back to the official registry later:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; config&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; registry&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://registry.npmjs.org&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;install-vs-code&quot;&gt;Install VS Code&lt;/h3&gt;
&lt;p&gt;Download from the official site (Stable recommended):&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://code.visualstudio.com/&quot;&gt;https://code.visualstudio.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Quick Windows setup:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click &lt;code&gt;Download for Windows&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run the installer and mostly &lt;code&gt;Next&lt;/code&gt; all the way.&lt;/li&gt;
&lt;li&gt;Recommended checkboxes:
&lt;code&gt;Add &quot;Open with Code&quot;&lt;/code&gt;, &lt;code&gt;Add to PATH&lt;/code&gt;, &lt;code&gt;Register Code as an editor&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Open VS Code, then &lt;code&gt;File -&gt; Open Folder&lt;/code&gt; and choose your blog project folder.&lt;/li&gt;
&lt;li&gt;Open terminal (&lt;code&gt;Ctrl + ~&lt;/code&gt;) and run:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -v&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;node&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -v&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If versions show up correctly, your environment is ready.&lt;/p&gt;
&lt;p&gt;Extensions I personally use (minimal but effective):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Astro&lt;/code&gt; (official syntax support)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Tailwind CSS IntelliSense&lt;/code&gt; (class name suggestions)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Markdown All in One&lt;/code&gt; (better Markdown writing flow)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are interested in learning programming from scratch, I will publish a future post called &lt;strong&gt;“How to Start Programming”&lt;/strong&gt; with more detailed guidance.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;install-astro&quot;&gt;Install Astro&lt;/h3&gt;
&lt;p&gt;I recommend using the &lt;strong&gt;CLI wizard&lt;/strong&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open terminal in your target folder (for me: &lt;code&gt;F:\project\Blog&lt;/code&gt;) and run:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6A737D;--shiki-dark:#6A737D&quot;&gt;# create a new Astro project&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; create&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; astro@latest&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Choose your project name and select &lt;strong&gt;Use blog template&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-build-step1.png&quot; alt=&quot;step1&quot;&gt;&lt;/p&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;After project creation, when terminal is ready again (cursor blinking), continue.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;C:\Users\Dan&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Enter your project folder and install dependencies:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;F:\project\Blog&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; astro-blog&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;F:\project\Blog\astro-blog&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At this point, the local site should already run:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Open &lt;code&gt;http://localhost:4321/&lt;/code&gt; in browser. If it looks normal, move on.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;deploy-to-github-pages&quot;&gt;Deploy to GitHub Pages&lt;/h2&gt;
&lt;h3 id=&quot;prepare-accounts-and-tools-first-beginner-friendly-order&quot;&gt;Prepare Accounts and Tools First (Beginner-Friendly Order)&lt;/h3&gt;
&lt;h4 id=&quot;1-create-a-github-account&quot;&gt;1. Create a GitHub Account&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;a href=&quot;https://github.com/&quot;&gt;https://github.com/&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Sign up&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Enter email, password, and username (username appears in your blog URL).&lt;/li&gt;
&lt;li&gt;Finish verification and email confirmation.&lt;/li&gt;
&lt;li&gt;Remember your username, you will use it in repo URL and Astro &lt;code&gt;site&lt;/code&gt; config.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote class=&quot;markdown-alert markdown-alert-tip&quot;&gt;
&lt;p class=&quot;markdown-alert-title&quot;&gt;tip&lt;/p&gt;
&lt;p&gt;If you plan long-term maintenance, enable 2FA in &lt;code&gt;Settings&lt;/code&gt; for better account safety.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;2-install-git-windows&quot;&gt;2. Install Git (Windows)&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Download from &lt;a href=&quot;https://git-scm.com/downloads&quot;&gt;https://git-scm.com/downloads&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Run installer; default options are usually fine.&lt;/li&gt;
&lt;li&gt;Verify in terminal:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --version&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then configure identity (one-time):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; config&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --global&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; user.name&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;Your Name&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; config&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --global&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; user.email&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;your-email@example.com&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;3-install-github-desktop-optional-very-beginner-friendly&quot;&gt;3. Install GitHub Desktop (Optional, very beginner-friendly)&lt;/h4&gt;
&lt;p&gt;If you do not want to memorize many commands at first, GitHub Desktop is a great bridge.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download: &lt;a href=&quot;https://desktop.github.com/&quot;&gt;https://desktop.github.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Sign in with your GitHub account.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;File -&gt; Add local repository...&lt;/code&gt;, choose your project folder.&lt;/li&gt;
&lt;li&gt;After edits, review changes, write a &lt;code&gt;Summary&lt;/code&gt;, click &lt;code&gt;Commit to main&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Push origin&lt;/code&gt; to upload.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I still use CLI in daily work, but for beginners I often recommend Desktop first. No mental burden needed. Efficiency matters: commit, push, and move forward.&lt;/p&gt;
&lt;h3 id=&quot;initialize-repository-and-first-push-cli--desktop&quot;&gt;Initialize Repository and First Push (CLI / Desktop)&lt;/h3&gt;
&lt;p&gt;If this is your first time, follow this flow (skip if repo already exists).&lt;/p&gt;
&lt;p&gt;Create an empty repository on GitHub first, then replace the URL below.&lt;/p&gt;
&lt;h4 id=&quot;option-a-cli&quot;&gt;Option A: CLI&lt;/h4&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; init&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; .&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; commit&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -m&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;init astro blog&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; branch&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -M&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; main&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; remote&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; origin&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://github.com/&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;your-github-usernam&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;your-repo-nam&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;.git&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; push&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -u&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; origin&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; main&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;option-b-github-desktop-gui&quot;&gt;Option B: GitHub Desktop (GUI)&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;In GitHub Desktop, &lt;code&gt;Add local repository&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;For first commit, use a message like &lt;code&gt;init astro blog&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Publish repository&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Next updates are simply &lt;code&gt;Commit&lt;/code&gt; + &lt;code&gt;Push origin&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;My recommendation: keep repository name simple and lowercase, which helps avoid mistakes when configuring &lt;code&gt;base&lt;/code&gt; later.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-build-step4.png&quot; alt=&quot;step4&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;use-my-blog-project-as-a-reference-clone-first-then-customize&quot;&gt;Use My Blog Project as a Reference: Clone First, Then Customize&lt;/h3&gt;
&lt;p&gt;If you want to learn from my current project structure directly, quickest way:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; clone&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://github.com/Dancncn/DansBlog.git&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; DansBlog&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After local startup, open &lt;code&gt;http://localhost:4321/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Project link:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/Dancncn/DansBlog&quot;&gt;https://github.com/Dancncn/DansBlog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If this tutorial or project helps you, I would really appreciate a &lt;code&gt;Star&lt;/code&gt; on the repo.&lt;/p&gt;
&lt;p&gt;Then convert it to your own repo:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new empty repository in your own GitHub account (for example &lt;code&gt;my-blog&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Update these fields in &lt;code&gt;astro.config.mjs&lt;/code&gt;:
&lt;code&gt;site: &apos;https://&amp;#x3C;your-username&gt;.github.io&apos;&lt;/code&gt;
&lt;code&gt;base: &apos;/&amp;#x3C;your-repo-name&gt;/&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Replace remote URL:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; remote&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; set-url&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; origin&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://github.com/&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;your-usernam&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x3C;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;your-repo-nam&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;.git&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; push&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -u&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; origin&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; main&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;Go to &lt;code&gt;Settings -&gt; Pages&lt;/code&gt; and set Source to &lt;code&gt;GitHub Actions&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Wait until Actions finishes, then visit:
&lt;code&gt;https://&amp;#x3C;your-username&gt;.github.io/&amp;#x3C;your-repo-name&gt;/&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;configure-site-and-base-in-astro-critical&quot;&gt;Configure &lt;code&gt;site&lt;/code&gt; and &lt;code&gt;base&lt;/code&gt; in Astro (Critical)&lt;/h3&gt;
&lt;p&gt;If you deploy as a project repo (for example &lt;code&gt;https://&amp;#x3C;username&gt;.github.io/&amp;#x3C;repo&gt;/&lt;/code&gt;), you must configure &lt;code&gt;base&lt;/code&gt;, otherwise static assets often return 404.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;astro.config.mjs&lt;/code&gt; example:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; REPO_BASE&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;/&amp;#x3C;your-repo-name&gt;/&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt; defineConfig&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  site: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;https://&amp;#x3C;your-github-username&gt;.github.io&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  base: &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;REPO_BASE&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  trailingSlash: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;always&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  output: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;static&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you use a user-site repo (&lt;code&gt;&amp;#x3C;username&gt;.github.io&lt;/code&gt;), &lt;code&gt;base&lt;/code&gt; is usually &lt;code&gt;/&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;auto-deploy-with-github-actions&quot;&gt;Auto Deploy with GitHub Actions&lt;/h3&gt;
&lt;p&gt;I personally prefer automation: one &lt;code&gt;push&lt;/code&gt;, one deployment.&lt;/p&gt;
&lt;p&gt;Create file: &lt;code&gt;.github/workflows/deploy.yml&lt;/code&gt;&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;Deploy to GitHub Pages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  push&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    branches&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: [&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  workflow_dispatch&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;permissions&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  contents&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;read&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  pages&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;write&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  id-token&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;write&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;concurrency&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  group&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;pages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  cancel-in-progress&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;false&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;jobs&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  build&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    runs-on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    steps&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;actions/checkout@v4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;actions/setup-node@v4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        with&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;          node-version&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;20&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;          cache&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;npm&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;actions/configure-pages@v5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;npm ci&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;run&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;npm run build&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;uses&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;actions/upload-pages-artifact@v3&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        with&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;          path&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;./dist&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;  deploy&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    needs&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;build&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    runs-on&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;ubuntu-latest&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    environment&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;      name&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;github-pages&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;      url&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;${{ steps.deployment.outputs.page_url }}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;    steps&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;      - &lt;/span&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;deployment&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#22863A;--shiki-dark:#85E89D&quot;&gt;        uses&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;actions/deploy-pages@v4&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you started from Astro’s blog template, this file may already exist. Check first before editing.&lt;/p&gt;
&lt;h3 id=&quot;enable-github-pages&quot;&gt;Enable GitHub Pages&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Open your repo, click &lt;code&gt;Settings&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Find &lt;code&gt;Pages&lt;/code&gt; in left sidebar.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Source&lt;/code&gt; to &lt;code&gt;GitHub Actions&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Go back to &lt;code&gt;Actions&lt;/code&gt; and wait for workflow success.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After that, your site is usually available at:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/how-to-build-step3.png&quot; alt=&quot;step3&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;https://&amp;#x3C;your-github-username&gt;.github.io/&amp;#x3C;your-repo-name&gt;/&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;pitfalls-i-personally-hit&quot;&gt;Pitfalls I Personally Hit&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Site opens but CSS is missing: &lt;code&gt;base&lt;/code&gt; is wrong.&lt;/li&gt;
&lt;li&gt;Images 404: wrong Markdown image path, prefer relative paths.&lt;/li&gt;
&lt;li&gt;Action failed: most often dependency install or Node version issue.&lt;/li&gt;
&lt;li&gt;Fresh deployment still 404: wait 1-2 minutes; Pages can lag.&lt;/li&gt;
&lt;li&gt;Pushed code but site did not update: likely pushed to wrong branch (not &lt;code&gt;main&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Works locally, white screen online: &lt;code&gt;site&lt;/code&gt; + &lt;code&gt;base&lt;/code&gt; combination is wrong.&lt;/li&gt;
&lt;li&gt;Project path with Chinese chars/spaces: can trigger weird script issues on Windows.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;npm install&lt;/code&gt; is very slow/stuck: check network first, then switch registry.&lt;/li&gt;
&lt;li&gt;Changed config but no effect: some files (like &lt;code&gt;astro.config.mjs&lt;/code&gt;) require dev server restart.&lt;/li&gt;
&lt;li&gt;Random file-name case changes: Windows is case-insensitive, Linux (Pages) is not, causing online 404.&lt;/li&gt;
&lt;li&gt;Editing config directly on GitHub web too often: easy to conflict with local changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2 id=&quot;deploying-to-cloudflare-pages-recommended-stronger-cdn--less-maintenance&quot;&gt;Deploying to Cloudflare Pages (Recommended: Stronger CDN &amp;#x26; Less Maintenance)&lt;/h2&gt;
&lt;p&gt;If GitHub Pages is already working for you, this is a practical upgrade path worth trying. In real-world use, Cloudflare Pages usually gives you a smoother deployment loop and stronger global delivery out of the box.&lt;/p&gt;
&lt;h3 id=&quot;why-consider-cloudflare-pages&quot;&gt;Why Consider Cloudflare Pages?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Global CDN: static assets are distributed closer to visitors worldwide.&lt;/li&gt;
&lt;li&gt;Automatic HTTPS: certificate and TLS are managed for you.&lt;/li&gt;
&lt;li&gt;Automatic deployment from Git: push to branch, trigger build, ship.&lt;/li&gt;
&lt;li&gt;Performance and basic security benefits: caching, compression, and edge protection are easier to get right.&lt;/li&gt;
&lt;li&gt;Future scalability: you can extend with Pages Functions / Workers and pair with D1 / KV / R2 when needed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For access quality, keep expectations realistic: international performance is usually excellent; mainland China is often more usable than GitHub Pages, but this is still not the same as a mainland CDN setup with ICP filing.&lt;/p&gt;
&lt;h3 id=&quot;step-by-step-deployment-guide&quot;&gt;Step-by-Step Deployment Guide&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Create a Cloudflare account and enter the dashboard.&lt;/li&gt;
&lt;li&gt;In the left menu, open &lt;code&gt;Workers &amp;#x26; Pages&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Choose &lt;code&gt;Pages&lt;/code&gt;. In the newer UI, this entry may appear under &lt;code&gt;Looking to deploy Pages? Get started&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Import an existing Git repository&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Connect your GitHub account and select your blog repository.&lt;/li&gt;
&lt;li&gt;Configure build settings:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Framework preset&lt;/code&gt;: &lt;code&gt;Astro&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Build command&lt;/code&gt;: &lt;code&gt;npm run build&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Build output directory&lt;/code&gt;: &lt;code&gt;dist&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Production branch&lt;/code&gt;: &lt;code&gt;main&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Start deployment. After success, open the generated &lt;code&gt;*.pages.dev&lt;/code&gt; URL.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;My recommendation: validate everything on the default &lt;code&gt;pages.dev&lt;/code&gt; domain first, then bind custom domain later.&lt;/p&gt;
&lt;h3 id=&quot;the-most-common-pitfall-base-path-issues&quot;&gt;The Most Common Pitfall: Base Path Issues&lt;/h3&gt;
&lt;p&gt;This is the one that gets almost everyone once.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHub Pages project sites usually live under a subpath like &lt;code&gt;/DansBlog/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Cloudflare Pages usually serves your site from root path &lt;code&gt;/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;base&lt;/code&gt; still points to &lt;code&gt;/DansBlog/&lt;/code&gt;, your page loads as blue links / raw HTML with missing CSS/JS.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use an environment-based &lt;code&gt;base&lt;/code&gt; switch in &lt;code&gt;astro.config.mjs&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;js&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; { defineConfig } &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;astro/config&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; isCfPages&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; process.env.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;CF_PAGES&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; ===&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;1&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; isGithubProd&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; !&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;isCfPages &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;&amp;#x26;&amp;#x26;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; process.env.&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;NODE_ENV&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; ===&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;production&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; base&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; isCfPages &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;/&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt; isGithubProd &lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;?&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;/DansBlog/&apos;&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &apos;/&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt; default&lt;/span&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt; defineConfig&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;({&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  site: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;https://your-domain-or-pages-domain&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  base,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  trailingSlash: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;always&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;  output: &lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;static&apos;&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Behavior of this setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cloudflare build: &lt;code&gt;base = &quot;/&quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;GitHub Pages production build: &lt;code&gt;base = &quot;/DansBlog/&quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Local dev: &lt;code&gt;base = &quot;/&quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also avoid hardcoded &lt;code&gt;&quot;/DansBlog&quot;&lt;/code&gt; in links/components. Prefer &lt;code&gt;import.meta.env.BASE_URL&lt;/code&gt; or relative paths.&lt;/p&gt;
&lt;h3 id=&quot;how-to-validate-the-deployment&quot;&gt;How to Validate the Deployment&lt;/h3&gt;
&lt;p&gt;Local simulation first (Windows CMD):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;cmd&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;set &lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;CF_PAGES&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm run build&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npx astro preview&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Optional PowerShell equivalent:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;powershell&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt;env:&lt;/span&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;CF_PAGES&lt;/span&gt;&lt;span style=&quot;color:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt;&apos;1&apos;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npm run build&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#24292E;--shiki-dark:#E1E4E8&quot;&gt;npx astro preview&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Online validation checklist:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open your &lt;code&gt;pages.dev&lt;/code&gt; URL.&lt;/li&gt;
&lt;li&gt;Open DevTools -&gt; &lt;code&gt;Network&lt;/code&gt;, confirm 404 count is &lt;code&gt;0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;View page source and search for &lt;code&gt;&quot;/DansBlog&quot;&lt;/code&gt;; it should not appear in Cloudflare deployment output.&lt;/li&gt;
&lt;li&gt;Test key routes: home page, article page, tag page, pagination.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;pagesdev-domain--custom-domain&quot;&gt;pages.dev Domain &amp;#x26; Custom Domain&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pages.dev&lt;/code&gt; is the default free subdomain.&lt;/li&gt;
&lt;li&gt;Renaming the project usually changes the subdomain prefix.&lt;/li&gt;
&lt;li&gt;If you want your own domain, you usually need to purchase one first.&lt;/li&gt;
&lt;li&gt;Cloudflare Pages supports custom domain binding directly in project settings.&lt;/li&gt;
&lt;li&gt;Regarding domain acquisition and setup, please consult the guide on &lt;strong&gt;&lt;a href=&quot;https://danarnoux.com/blog/how-to-register-a-cloudflare-domain-en/&quot;&gt;How to Register a Cloudflare Domain&lt;/a&gt;&lt;/strong&gt;, which includes a video tutorial.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;accessibility-for-international--mainland-china-users&quot;&gt;Accessibility for International &amp;#x26; Mainland China Users&lt;/h3&gt;
&lt;p&gt;Practical expectations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;International visitors: usually very strong performance.&lt;/li&gt;
&lt;li&gt;Mainland China users: often more usable than GitHub Pages.&lt;/li&gt;
&lt;li&gt;Without ICP备案 and mainland CDN architecture, do not expect domestic-CDN-level stability everywhere.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Low-cost improvements that help a lot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Self-host fonts instead of relying on Google Fonts.&lt;/li&gt;
&lt;li&gt;Minimize third-party external scripts.&lt;/li&gt;
&lt;li&gt;Leverage static asset caching (hashed file names + long cache headers).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;wrap-up&quot;&gt;Wrap-up&lt;/h2&gt;
&lt;p&gt;By now you already have a very practical workflow:
local writing -&gt; &lt;code&gt;git push&lt;/code&gt; -&gt; GitHub auto build + deploy.&lt;/p&gt;
&lt;p&gt;From here, keep writing and gradually polish your style.
Technology is the skeleton; content is the soul.
First make it run, then make it beautiful.&lt;/p&gt;
&lt;p&gt;I hope you can use AI code tools without psychological pressure. They can significantly improve productivity. For example, this site reached a usable Home/Blog/About structure in about 4 hours on day one, then I spent day two and day three refining details and mobile adaptation.&lt;/p&gt;
&lt;p&gt;But do not forget your original goal for building a blog:
reliable publishing and reading comes first.
Fancy features are optional personal fun. Add them if you want, skip them if you do not.&lt;/p&gt;</content:encoded><category>Astro</category><category>blog</category><category>github-pages</category><category>guide</category><category>EN</category></item><item><title>GoFile Download Tool -- Complete Usage Guide</title><link>https://danarnoux.com/blog/gofile-download-tool-guide-en/</link><guid isPermaLink="true">https://danarnoux.com/blog/gofile-download-tool-guide-en/</guid><description>A step-by-step guide to downloading files from GoFile using a Python script, with environment setup and practical examples.</description><pubDate>Wed, 11 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;h2 id=&quot;1-getting-the-project&quot;&gt;1. Getting the Project&lt;/h2&gt;
&lt;p&gt;The project is hosted on GitHub:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/rkwyu/gofile-dl&quot;&gt;https://github.com/rkwyu/gofile-dl&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You have two ways to obtain it.&lt;/p&gt;
&lt;h3 id=&quot;method-1--download-zip-recommended&quot;&gt;Method 1 — Download ZIP (Recommended)&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Open the repository page&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Code&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Download ZIP&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Extract it to any folder&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/gofile-step1.png&quot; alt=&quot;step1&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;method-2--clone-via-git&quot;&gt;Method 2 — Clone via Git&lt;/h3&gt;
&lt;p&gt;If Git is installed:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; clone&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://github.com/rkwyu/gofile-dl&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2 id=&quot;2-install-dependencies&quot;&gt;2. Install Dependencies&lt;/h2&gt;
&lt;p&gt;Open the project folder.&lt;/p&gt;
&lt;p&gt;Click the address bar, type:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;cmd&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Press Enter.&lt;/p&gt;
&lt;p&gt;Then install dependencies:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;python&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -m&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; pip&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; requirements.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wait until installation finishes.&lt;/p&gt;
&lt;p&gt;If Python is not recognized:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;python&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --version&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reinstall Python and enable:&lt;/p&gt;
&lt;p&gt;Add Python to PATH&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;3-run-the-downloader&quot;&gt;3. Run the Downloader&lt;/h2&gt;
&lt;p&gt;Execute:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;python&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run.py&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -i&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;output_filename.zip&quot;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://gofile.io/d/your_link_id&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;python&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; run.py&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -i&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; &quot;example.zip&quot;&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; https://gofile.io/d/abcd1234&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Downloaded files will appear in:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;outputs/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://img.danarnoux.com/posts/gofile-step3.png&quot; alt=&quot;step3&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;4-common-issues&quot;&gt;4. Common Issues&lt;/h2&gt;
&lt;h3 id=&quot;python-not-found&quot;&gt;Python Not Found&lt;/h3&gt;
&lt;p&gt;Reinstall Python and configure PATH properly.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;pip-installation-errors&quot;&gt;pip Installation Errors&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes github-light github-dark&quot; style=&quot;background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#6F42C1;--shiki-dark:#B392F0&quot;&gt;python&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; -m&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; pip&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#005CC5;--shiki-dark:#79B8FF&quot;&gt; --upgrade&lt;/span&gt;&lt;span style=&quot;color:#032F62;--shiki-dark:#9ECBFF&quot;&gt; pip&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2 id=&quot;workflow-summary&quot;&gt;Workflow Summary&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Get repository&lt;/li&gt;
&lt;li&gt;Install dependencies&lt;/li&gt;
&lt;li&gt;Run download command&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That’s all.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;notes&quot;&gt;Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;This tool is intended for downloading publicly accessible files.&lt;/li&gt;
&lt;li&gt;Ensure you comply with applicable laws and platform terms of
service.&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>tools</category><category>download</category><category>gofile</category><category>guide</category><category>EN</category></item></channel></rss>