2026 年乘搭飛機時用 AI 編碼:Wi-Fi 中斷前的 8 項 Mac 準備
Coding with AI on a flight in 2026: 8 Mac things I'd set up before the Wi-Fi drops
文章列出在 Mac 上乘搭飛機前,為離線或網絡不穩時使用 AI 編碼而應預先準備的 8 件事。準備包括同步程式碼庫與依賴項、預先下載 Ollama 本地模型,以及設定 Dash 或 DevDocs 離線查閲文件。
You open the laptop at 35,000 feet, type a prompt into your coding agent, and watch it spin. The in-flight Wi-Fi is either missing, slow, or about to eat your hotspot data.
Cloud coding agents need a connection, so a flight changes how you work. Here's what I'd set up on a Mac before boarding so the hours in the air still count.
Before you leave the gate
1. Prep the repo while you still have fast internet
This one is free and built in. Run git fetch --all and pull the branches you'll touch, install dependencies (npm ci, pip install -r requirements.txt, whatever your stack uses), and pull any Docker images your dev server needs. Nothing kills offline work faster than a missing package.
2. Ollama, with a local model already downloaded
Ollama runs open models locally on your Mac, and its docs show ollama launch claude connecting Claude Code to local or cloud models through an Anthropic-compatible API. Download the local model at home, not on the plane. Ollama's docs suggest a 64k+ context window for repository work, and speed depends on your hardware. ollama.com
3. Dash for offline docs
Dash is a documentation browser and snippet manager that gives you offline access to 200+ API docsets and 100+ cheat sheets. Pick the docsets for your stack before the trip and it keeps them updated when you're back online. kapeli.com/dash
4. DevDocs, if you'd rather stay in the browser
DevDocs is free and lets you enable individual documentation sets for offline use from its Offline page. Enable the exact versions you use (Node, Python, React, and so on) while you're still connected. devdocs.io/offline
Once you're in the air
5. TripMode for paid or tethered Wi-Fi
If you do buy in-flight Wi-Fi or tether to your phone, background updates and sync apps will happily burn through it. TripMode lets you choose which Mac apps can use the internet, blocks the rest, and can switch on automatically when you join a hotspot. It has a limited free mode, with paid plans after a trial. tripmode.ch
6. Amphetamine for long builds and downloads
A test suite or model download stalling because the lid dimmed is annoying. Amphetamine is a free keep-awake app that can keep your Mac awake indefinitely, for a set time, while a file is downloading, or while a specific app is running. App Store
7. Low Power Mode
Also built in. Low Power Mode reduces energy use to stretch battery life, which matters more than raw speed on a long flight with no seat power. Turn it on in System Settings > Battery. Apple Support
For the landing
8. TokenBar, so you know where your limits stand
The plan I'd make on the plane depends on one question: when I land and reconnect, will my Claude or Codex window have reset? TokenBar is a menu bar app that shows usage and reset times for Claude, Codex, Cursor, Gemini and Copilot, so a quick glance before boarding tells you whether to save the big agent task for arrival. It doesn't give you extra quota, it just shows where you stand. It's built on Peter Steinberger's open-source, MIT-licensed CodexBar and credits Pixel Agents. $5/month Basic or $15 lifetime Pro, macOS 14+. tokenbar.site
Quick picker
| If you want to... | Use |
|---|---|
| Avoid a missing-package dead end | Pre-flight repo prep |
| Keep an AI assistant offline | Ollama + local model |
| Read docs offline (native app) | Dash |
| Read docs offline (browser) | DevDocs |
| Protect a tethered connection | TripMode |
| Keep long jobs running | Amphetamine |
| Stretch battery | Low Power Mode |
| Know if your limits reset by landing | TokenBar |
What's the one thing you always forget to download before a flight?
來源:DEV Community · dev.to
