“Vibe coding” 指的是讓強大的 AI 承擔繁重工作,而你用簡單的英文來引導、測試與迭代。它是新的、正流行,而且——沒錯——你這個週末就能用它做出一個小型行動應用程式。
對非技術的初學者而言,這是張金票。你不再需要花六個月去學會分辨「float」和「string」的差別。只要你能描述你想要什麼,你就能把它做出來。本指南將帶你了解這股趨勢的最新動態,並提供專業、逐步的路線圖,教你打造第一個微型行動 App。
什麼是 Vibe Coding,為什麼大家都在談論它?
"Vibe coding" 不只是俚語;它代表人類與電腦協作創造軟體的一次根本性轉變。由 AI 研究員 Andrej Karpathy 於 2025 年初提出,其理念很簡單:你專注於意圖("vibe"),AI 處理語法("code")。
在傳統程式設計中,你像是工地上的技工,親手砌好每一塊磚(每一行程式碼)。在 vibe coding 中,你是「建築師」。你告訴 AI:「我想要一個能眺望海景的現代化客廳」,它就會立即把房間蓋出來。若你不喜歡沙發,你不需要自己拆掉它;你只要說:「把沙發改成藍色。」
Vibe coding 與 “no-code” 或 “low-code” 有何不同?
- No-code:拖曳式建構器、預先定義的積木,對初學者非常友善,但在自訂行為上有限。
- Low-code:視覺化工具 + 程式碼的混合,適合想兼顧速度與自訂能力的進階使用者。
- Vibe coding:以自然語言 → 生成 AI 程式碼(潛力無限),但你必須驗證與測試成果。它尚未取代軟體工程——只是工具箱裡另一個強大的工具。
對完全的初學者來說安全嗎?
是的——用於原型製作、學習、與發佈微型 App 都很適合——但有一些注意事項:
- 你可以很快獲得可運作的 App,這對提升動力很有幫助。
- 你必須測試功能並理解限制:AI 可能會引入安全漏洞、草率的架構,若使用大量運算也可能帶來驚人的成本。
我應該用哪些工具來做 vibe code——以及它們要花多少錢?
核心工具是什麼(以及為什麼)?
工具:LLM assistants (ChatGPT / Gemini / Claude / open-source models) + Expo (React Native) 或 Flutter + Supabase/Firebase 後端。
為什麼選這些:你能指定任何需求,同時仍可依靠 AI 撰寫可運行的程式碼。這條路很適合想學一點程式但主要以與 LLM 對話為主的人。用 LLM 生成小模組、在本機測試並迭代。對行動端而言,Expo(React Native)是友善的選擇,因為它讓裝置測試變得容易。若你想要拖曳式視覺設計加上可匯出的程式碼,可搭配 FlutterFlow。
以下是一套面向非技術初學者、希望用「vibe coding」做行動 App 的極簡實用工具鏈:
- Cursor —— 具代理與 Tab 補全的本機/雲端 AI 程式開發 IDE。非常適合互動式、代理型的工作流程;有免費方案可試用;若需要更高用量可選擇 Pro 方案。
- Claude Code (Anthropic) —— 代理型的程式助理/CLI 與網頁體驗,擅長高階、結構化的程式碼生成與迭代提示。可作為 Cursor 的替代或並行工具。
- Expo (React Native) —— 初學者最容易上手的跨平台行動 App 路線。Expo 處理建置、透過 Expo Go 在你的手機上測試,且有相當慷慨的免費方案。
- Firebase(可選後端) —— 簡單的身分驗證/資料庫/儲存。用於小型原型可使用免費 Spark 方案;若擴張則採用 Blaze 按用量付費。
成本如何?
推薦入門堆疊(打造微型行動 App 的最快路線):
- Cursor:免費起步;若需要更多代理用量,Pro 每月 $20(另有 Pro+ 與 Ultra 方案)。
- Claude:提供 Free/Pro/Max 方案;大量使用可能需要付費方案(Max 方案可能超過每月 $100)。也留意大量代理的每週上限。
- Expo:以相同的 JavaScript 程式碼在 iOS 與 Android 上運行,優秀的開發工具與透過 Expo Go 的裝置預覽。免費入門;CI/CD/建置點數的付費方案約每月 $19 起。
- Firebase:測試用免費 Spark;正式環境用 Blaze(按單位付費)。
- Replit(可選)—— 瀏覽器編輯器 + 主機代管,若不想在本機安裝任何工具會很有用;有免費方案,付費方案約每月 $20 起。
- GitHub/GitHub Copilot(可選)—— 原始碼控管與在編輯器內的 AI 程式助理(Copilot 付費方案約每月 $10;也有免費層)。
實際估算:你可以在免費方案上以 $0 成本進行原型製作。小量使用約 $0–$50/月;若訂閱 Cursor Pro 則約 $20/月,或在需要更多建置時使用 Expo Starter 約 $19/月。若大量使用 Claude Code,成本可能快速上升(留意 token/運算用量)。
應用商店發佈費用(真實世界)
- Apple Developer Program:每年 $99 USD 以在 App Store 發佈。
- Google Play Console:一次性註冊費 $25 USD 以在 Google Play 發佈。
對一位獨立初學者打造微型 App 並同時在兩大商店發佈的整體預估:第一年 $0–$200,視你是否使用付費 LLM 功能或付費建置/發佈方案而定。免費方案與試用可以支撐初期開發。
打造你的第一個行動 App 的逐步流程是什麼?📱
我們來打造一款 "Daily Vibe Check" App。這個 App 讓使用者以表情符號記錄心情並附註短字,儲存到清單中。
第 1 階段:設定(尚不寫程式)
- 下載 Cursor:前往 cursor.com 並安裝。它看起來像 VS Code(標準的程式碼編輯器)。
- 安裝 Node.js:你需要它來執行程式。從 nodejs.org 下載「LTS」版本。
- 安裝 Expo App:在你真實的手機(iOS 或 Android)下載「Expo Go」App。
第 2 階段:「Vibing」專案
打開 Cursor。
你會看到右側的「Chat」窗格(通常用 Cmd+L 或 Ctrl+L 開啟)。魔法就在這裡發生。你不寫程式碼;你寫一份 PRD(Product Requirements Document) 提示。
把以下提示複製並貼到 Cursor:
"I want to start a new React Native project using Expo.
The app is called 'DailyVibe'.App Goal: A simple mood tracker where users can log their daily mood.**Features:**1) A home screen showing a list of past mood logs (Date + Emoji + Note).
2) A 'Log Mood' button that opens a modal or new screen.
3) In the logging screen, let me pick from 5 emojis (Happy, Sad, Neutral, Excited, Tired) and type a short text note.
4) Save the data locally on the device for now using AsyncStorage.Design Vibe: Minimalist, pastel colors, soft rounded corners.Please guide me step-by-step on how to initialize this project and give me the code for the first screen."
第 3 階段:「複製-貼上」迴圈
Cursor 很可能會要你執行一個建立專案的指令。它看起來會像這樣:
npx create-expo-app@latest DailyVibe
該怎麼做:
- 在 Cursor 打開「Terminal」(
Ctrl + ~或Terminal > New Terminal)。 - 貼上該指令並按下 Enter。
- 等待完成。
- 在 Cursor 中打開新資料夾
DailyVibe。
接著,Cursor 會提供你的 App 程式碼。
它通常會提供一個名為 app/index.tsx 或 App.js 的檔案。
你的工作流程:
- 閱讀:看看 Cursor 生成的程式碼。
- 套用:Cursor 的聊天視窗裡有「Apply」按鈕。點擊它。它會自動把程式碼寫入你的檔案。
- 執行:在終端機輸入
npx expo start。 - 查看:會出現 QR Code。用手機上的 Expo Go 掃描。搞定。你的 App 已在你的手機上。
第 4 階段:微調 vibe(「Coding」部分)
這就是「vibe coding」大顯身手的地方。
你會在手機上看到 App。
也許按鈕太小了。
**不要嘗試手動改像素值。**只要告訴 Cursor:
"The buttons on the home screen are too small and they look ugly. Can you make them big, full-width, and give them a soft purple shadow? Also, add a title 'My Vibe Log' at the top."
Cursor 會更新程式碼。你按「Apply」。手機上的 App 會即時重新載入並呈現新的設計。
第 5 階段:增加複雜度
現在你想要儲存資料。
你可以這樣問:
"I want to save these logs so they don't disappear when I close the app. Create a storage helper file using AsyncStorage and update the home screen to load data from there."
Cursor 會生成新的檔案(例如 storage.ts)並修改你的主畫面。
範例 App.js(精簡、初學者驗證)
以下是一個你可以貼到 Expo 專案中的小型、獨立範例。它刻意保持簡單,讓你能理解每一行。(建議你先使用這段程式,再請 LLM 視需要擴充或重構。)
import React, { useState, useEffect } from 'react';
import { SafeAreaView, View, TextInput, Button, FlatList, Text, TouchableOpacity, StyleSheet } from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
export default function App() {
const [text, setText] = useState('');
const [notes, setNotes] = useState([]);
useEffect(() => {
(async () => {
try {
const saved = await AsyncStorage.getItem('@mood_notes');
if (saved) setNotes(JSON.parse(saved));
} catch (e) { console.warn('Load failed', e); }
})();
}, []);
const saveNotes = async (newNotes) => {
setNotes(newNotes);
try {
await AsyncStorage.setItem('@mood_notes', JSON.stringify(newNotes));
} catch (e) { console.warn('Save failed', e); }
};
const addNote = () => {
if (!text.trim()) return;
const newNotes = [{ id: Date.now().toString(), text: text.trim() }, ...notes];
saveNotes(newNotes);
setText('');
};
const deleteNote = (id) => {
saveNotes(notes.filter(n => n.id !== id));
};
return (
<SafeAreaView style={styles.container}>
<View style={styles.inputRow}>
<TextInput
style={styles.input}
placeholder="你現在感覺如何?"
value={text}
onChangeText={setText}
/>
<Button title="新增" onPress={addNote} />
</View>
<FlatList
data={notes}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<View style={styles.note}>
<Text style={styles.noteText}>{item.text}</Text>
<TouchableOpacity onPress={() => deleteNote(item.id)}>
<Text style={styles.delete}>刪除</Text>
</TouchableOpacity>
</View>
)}
ListEmptyComponent={() => <Text style={styles.empty}>目前沒有筆記 — 新增一則吧!</Text>}
/>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: { flex: 1, padding: 16 },
inputRow: { flexDirection: 'row', gap: 8, marginBottom: 12 },
input: { flex: 1, borderWidth: 1, borderColor: '#ccc', padding: 8, borderRadius: 6 },
note: { padding: 12, borderBottomWidth: 1, borderColor: '#eee', flexDirection: 'row', justifyContent: 'space-between' },
noteText: { flex: 1 },
delete: { color: 'red', marginLeft: 12 },
empty: { textAlign: 'center', marginTop: 40, color: '#666' }
});
注意:
- 安裝 AsyncStorage 請執行:
npx expo install @react-native-async-storage/async-storage。 - 貼上程式碼後,執行
npx expo start並用 Expo Go 掃描。Expo 文件中有完整步驟。
我該如何用 vibe coding 迭代?
- 若有錯誤,將錯誤訊息複製並貼到 LLM,並提供上下文:“I ran App.js and got this error: [paste error]. Here’s my
package.jsonand node version.” 請 LLM 提出修正建議。 - 請 LLM 重構:“Make the note rows a separate file
NoteRow.jsand use PropTypes.” - 請求測試或 QA 步驟:“Give me 5 manual test steps I should run on Android and iOS for this app.”
避免迷失的最佳做法?
即使在 vibe coding 中,也很容易「幻覺」或遇到錯誤。以下是保持專案在正軌上的方法:
1. 把 AI 當作初階工程師來溝通
不要只說「做一個 App」。要具體。與其說「讓它看起來漂亮」,不如說「使用以字體為主的版面,大量留白,並採用 San Francisco 字體」。
2. 「一次一個功能」規則
永遠不要一次要求五件事。
- 不好: "Add a login screen, a settings page, and a database."
- 好: "Let's start by adding a basic login screen with an email and password field."
3. 使用「錯誤貼上」方法
如果 App 當掉,不要嘗試自己修程式碼。將終端機的整段錯誤訊息複製,貼到 Cursor,並說:"I got this error. What happened and how do we fix it?"
4. 版本控管(「存檔點」)
把你的 App 當成一款電玩。使用 Git(或 Cursor 內建的版本功能)建立「存檔點」。如果新增功能把一切弄壞,你可以直接「回滾」到當時 vibe 還不錯的狀態。
最後想法:你該今天開始嗎?
從「不懂程式」到「打造自己的新創」的距離,從未如此短。Vibe coding 讓你專注於你要解決的問題,而不是解決方案的語法。
若你有一個「微型」行動 App 點子——澆花提醒器、健身追蹤器、或個人日記——現在就是開始的時候。不要擔心自己不夠「技術」。開始 vibing 吧。
CometAPI 能如何幫助你?CometAPI 是一站式的 LLM 模型 API 聚合平台,支援調用各種主流 AI 模型。你可以以低於官方的價格存取 Gemini API、Claude API 與 ChatGPT。你可以將 CometAPI 與 Cursor 或 Claude Code 搭配使用以獲得效益。存取前請先登入 CometAPI 並取得 API 金鑰。CometAPI 提供遠低於官方的價格,協助你整合。
Ready to Go?→ Sign up for Vibe Coding via CometAPI today !
