Claude Code इंस्टॉल करें और सुरक्षित पहला रन शुरू करें
Installation, authentication, gateway, reversible first edit और Git verification वाली Claude Code की वर्तमान गाइड।
Claude Code terminal और development environments के लिए Anthropic का coding agent है। Current client इंस्टॉल करें, छोटे Git project में default या plan से शुरू करें और हर पहला बदलाव git diff से जाँचें।
Claude Code के लिए अलग pay-as-you-go API चाहिए तो अपनी API Key बनाकर BetterToken Claude Code guide अपनाएँ। BetterToken Claude Code का Anthropic-compatible API path है; यह Claude Chat/Cowork enable नहीं करता और Claude subscription का विकल्प नहीं है।
इंस्टॉलेशन से पहले तैयारी
Terminal, बदलने योग्य छोटा Git project और संभव हो तो clean git status तैयार रखें। Official login के लिए supported Claude या Console account चाहिए; gateway अलग provider path है। Key को source, screenshot या shell history में न रखें।
macOS, Linux और WSL पर Native Install
Anthropic का recommended Native Install है:
यह केवल client इंस्टॉल करता है, browser login या provider configuration नहीं। पुराने npm निर्देश की जगह अन्य methods और dependencies के लिए current Docs देखें।
Windows PowerShell, CMD और WSL
PowerShell:
CMD:
Native Windows में Claude Code के Bash उपयोग के लिए Git for Windows recommended है। WSL में इसकी जरूरत नहीं; Linux client को WSL में इंस्टॉल करें और संभव हो तो project को WSL filesystem में रखें।
client और authentication जाँचें
नए terminal में चलाएँ:
फिर claude शुरू करके official browser login पूरा करें। Account बदलने के लिए session में /login उपयोग करें। API Key को सामान्य prompt या repository में न रखें।
third-party gateway कॉन्फ़िगर करें
Gateway के लिए API Key, supported Model ID और सही Base URL चाहिए। BetterToken में current guide अपनाकर Anthropic-compatible Base URL https://bettertoken.ai इस्तेमाल करें। यह raw Messages HTTP URL नहीं है; client protocol path जोड़ता है। Key, model और URL एक साथ न बदलें; छोटे request से जाँचें।
read-only पहला project
कहें: “Structure, entry point और startup command समझाएँ। Files न बदलें और network commands न चलाएँ।” Plan mode पढ़ता और explore करता है, पर source edit नहीं करता।
reversible पहला edit
अनुमत action देखने के बाद चलाएँ:
File boundary, content, secrets और अनपेक्षित configuration/dependency बदलाव जाँचें।
permission modes और safety boundary
default reading देता है और edit/command से पहले approval माँगता है। plan source बदले बिना research करता है। acceptEdits edits और सामान्य filesystem operations अपने आप स्वीकारता है; auto background safety checks वाला research preview है। bypassPermissions केवल isolated container या VM के लिए है। पहले run में default या plan रखें।
success signal और API verification
सही working folder, सफल login या provider request, केवल अनुमति वाली एक file का बदलाव और समझने योग्य diff सफलता के संकेत हैं। BetterToken में Dashboard और Usage History में model, status और input/output/cache token भी जाँचें। यह API path को साबित करता है, Chat/Cowork entitlement को नहीं।
layer-by-layer troubleshooting
claude न मिले तो terminal फिर खोलें और पुराने npm command के बजाय official installation help अपनाएँ। Login issue में Claude login, Console/API और gateway को अलग रखें। Provider error में पहले Key, फिर Base URL, फिर Model ID जाँचें। Claude बहुत files बदलना चाहे तो reject करें, Plan mode में लौटें और एक file, no network, no commit सीमा लिखें।
आगे के कदम और स्रोत
README diff साफ हो तो एक test या छोटा fix करें। Scope और autonomy एक-एक करके बढ़ाएँ; deployments, APIs और remote systems local files जैसे reversible नहीं हैं।