Claude Code शुरुआती गाइड: इंस्टॉल, सुरक्षित अनुमतियाँ और पहले 30 मिनट
Claude Code शुरू करने की गाइड: इंस्टॉल, पहला प्रॉम्प्ट, सुरक्षित अनुमतियाँ, पुराने कोड को पढ़ना और आम गलतियाँ.
Claude Code terminal में चलने वाला AI coding agent है। यह सिर्फ chat नहीं है जहाँ आप code paste करते हैं। यह project files पढ़ सकता है, repository में search कर सकता है, changes suggest कर सकता है, आपकी अनुमति मिलने पर files edit कर सकता है, और tests या build commands चला सकता है।
Beginners की सबसे common problem installation नहीं, बल्कि पहला task बहुत बड़ा रखना है। अगर पहला prompt है “पूरी app improve कर दो”, तो diff इतना बड़ा हो सकता है कि review करना मुश्किल हो जाए। बेहतर शुरुआत है: project पढ़ना, structure समझना, एक छोटा task चुनना, और result verify करना।
यह guide official setup, common workflows, और CLI usage docs के आधार पर लिखी गई है। इसके बाद CLAUDE.md guide और context management guide पढ़ना उपयोगी रहेगा।
Claude Code को कैसे समझें
Claude Code छोटे और clear tasks में बहुत अच्छा है: existing codebase समझना, important files ढूँढना, छोटा bug fix करना, tests जोड़ना, README सुधारना, या PR summary बनाना।
Safe beginner flow:
| Step | काम | कारण |
|---|---|---|
| 1 | Install और login | tool चलता है या नहीं |
| 2 | Read-only समझना | edit से पहले context |
| 3 | छोटा task चुनना | risk कम करना |
| 4 | diff और test देखना | evidence से verify |
| 5 | rules लिखना | अगली session बेहतर |
पहले दिन goal automation नहीं, trust बनाना है।
तैयारी
Production branch पर शुरू न करें। एक safe branch बनाएँ:
git status
git switch -c try-claude-code
पुराने Git में:
git checkout -b try-claude-code
ये भी check करें:
- Claude Code access वाला Claude account
- internet connection
- project root folder
- Git काम कर रहा हो
- test या build command पता हो
.env, secrets, customer data protected रहें
Windows में PowerShell और CMD commands अलग हो सकती हैं। PS C:\ दिखे तो PowerShell है।
इंस्टॉल करें
macOS, Linux, WSL:
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell:
irm https://claude.ai/install.ps1 | iex
फिर verify करें:
claude --version
claude doctor
claude doctor शुरुआती समय में बहुत उपयोगी है क्योंकि यह setup और configuration problems जल्दी दिखाता है।
npm install भी available है:
npm install -g @anthropic-ai/claude-code
लेकिन कोई खास reason न हो तो official native installer से शुरू करें। sudo npm install -g avoid करें, क्योंकि इससे permission और security problems आ सकती हैं।
पहले 30 मिनट
Project root में जाएँ:
cd my-project
claude
Login के बाद तुरंत feature build न करवाएँ। पहले read-only prompt दें:
मैं इस project में नया हूँ।
अभी कोई file edit मत करें। सिर्फ पढ़कर explain करें:
- project क्या करता है
- main directories और roles
- dev, test, build commands के candidates
- कौन सी files बदलना risky लगता है
- पहले पढ़ने लायक 5 files
हर बात के साथ file path evidence दें और uncertainty हो तो guess न करें।
फिर छोटे tasks माँगें:
इस repository में beginners के लिए 5 अच्छे tasks suggest करें।
हर task:
- लगभग 30 minutes में हो
- max 2 files बदले
- test या manual verification हो
- auth, billing, secrets, production data से दूर रहे
risk level और verification steps भी दें।
इस तरह Claude Code onboarding assistant बनता है, uncontrolled generator नहीं।
सुरक्षित अनुमतियाँ
Claude Code commands चला सकता है और files edit कर सकता है, इसलिए permissions बहुत जरूरी हैं। शुरुआत में safe mode:
claude --permission-mode plan
Session में:
/permissions
bypassPermissions और --dangerously-skip-permissions से सावधान रहें। इन्हें सिर्फ isolated container या VM में use करें जहाँ नुकसान न हो।
Conservative permission example:
{
"permissions": {
"allow": [
"Bash(git status)",
"Bash(git diff *)",
"Bash(npm run test *)",
"Bash(npm run build *)"
],
"deny": [
"Bash(git push *)",
"Bash(rm -rf *)",
"Read(.env)",
"Read(**/.env)"
]
}
}
Principle simple है: low-risk checks allow करें, secrets block करें, destructive actions manual रखें।
उदाहरण 1: README सुधारना
README first task के लिए अच्छा है।
मैं README.md improve करना चाहता हूँ।
पहले README.md और package.json पढ़ें।
क्या missing है list करें, अभी edit न करें।
मेरी approval के बाद सिर्फ README.md edit करें।
Approval के बाद scope छोटा करें:
README.md में सिर्फ दो sections जोड़ें:
- local development
- test command
सिर्फ package.json में दिखने वाले commands use करें।
नए tools या deployment steps invent न करें।
उदाहरण 2: छोटा bug fix
Bug clear हो तो result बेहतर होता है:
इस bug को investigate करें।
Problem:
- search input में सिर्फ spaces हों तो app सभी results दिखाती है।
Expected:
- spaces-only input empty search जैसा behave करे।
Constraints:
- पहले probable cause explain करें।
- max 1 file edit करें।
- fix के बाद test या manual checks बताएं।
Diff देखें:
git diff
फिर review कराएँ:
Current git diff review करें।
Unexpected changes, over-engineering, missing tests, edge cases देखें।
सब ठीक हो तो 3 manual verification steps दें।
तीन उपयोग के मामले
Claude Code को पहले दिन इन तीन वास्तविक कामों में आज़माएँ। तीनों में synthetic या sample data रखें, production branch, billing, customer data और secrets से दूर रहें।
उपयोग मामला 1: README और onboarding सुधारना
समस्या: नए developer को project चलाने के लिए किस command की जरूरत है, यह README में साफ नहीं है।
Claude Code को क्या करने दें: README.md, package.json और docs folder पढ़कर missing setup steps की list बनवाएँ। approval के बाद सिर्फ README में local development और test command जोड़वाएँ।
मानव को क्या approve करना है: commands सच में project में मौजूद हैं या नहीं, कोई unsupported deployment claim तो नहीं जुड़ा, और README में secret या internal URL तो नहीं आ गया।
उपयोग मामला 2: छोटा validation bug ठीक करना
समस्या: search box में सिर्फ spaces हों तो page गलत result दिखाता है या form validation user को confuse करता है।
Claude Code को क्या करने दें: पहले probable file बताने दें, फिर maximum 1 file में trim या validation logic बदलने दें। test मौजूद हो तो test जोड़ने को कहें।
मानव को क्या approve करना है: auth, billing, production data और customer records वाली files touched नहीं हुईं। git diff में सिर्फ expected logic और test दिख रहे हैं।
उपयोग मामला 3: article या docs में next action CTA जोड़ना
समस्या: reader ने guide पढ़ ली, लेकिन अगला कदम clear नहीं है।
Claude Code को क्या करने दें: existing article pages में CTA pattern खोजने दें, फिर उसी style में एक CTA जोड़ने दें: free PDF, paid guide, training या consultation की ओर natural link।
मानव को क्या approve करना है: tone बहुत sales जैसा नहीं है, link सही locale में है, और CTA article के promise से match करता है।
उदाहरण 3: PDF, product या consultation CTA
Content site या documentation में Claude Code next action improve कर सकता है।
इस article को पढ़कर beginners के लिए 3 CTA suggest करें।
Goals:
- first-time user की anxiety कम करना
- free PDF, paid resource, consultation से natural connection
- हर CTA 80 characters से कम
- aggressive sales tone न हो
फिर existing pattern follow कराएँ:
Article pages में existing CTA pattern खोजें।
उसी tone में इस article के end पर एक CTA add करें।
नया component न बनाएँ और global styles न बदलें।
सामान्य गलतियाँ और सुधार
पहली गलती: task बहुत बड़ा। “app improve करो” task नहीं है। “search spaces case fix करो” task है।
दूसरी गलती: read-only phase छोड़ना। अगर Claude Code architecture explain नहीं कर सकता, तो edit अभी जल्दी है।
तीसरी गलती: permissions बहुत जल्दी खोल देना। Fast automation से ज्यादा जरूरी समझने योग्य diff है।
चौथी गलती: final message पर भरोसा। Tests, build, browser या git diff में से कुछ जरूर देखें।
पाँचवीं गलती: लंबी conversation खींचते रहना। Topic बदल जाए तो summarize करें और clean session शुरू करें। Detail के लिए context management पढ़ें।
समस्या आने पर checklist
- क्या
claude --versionचलता है? claude doctorक्या कहता है?- क्या आप project root में हैं?
- क्या
git statusसमझ आता है? - क्या PowerShell और CMD commands mix हुईं?
- क्या WSL, SSH या container login flow अलग है?
- क्या
.envया keys पढ़ने की कोशिश हो रही है? - क्या dangerous permission mode on है?
- क्या test command सच में exist करती है?
Diagnosis prompt:
Claude Code expected तरीके से काम नहीं कर रहा।
Files edit न करें। सिर्फ diagnosis में help करें।
Environment:
- OS:
- shell:
- command:
- error message:
- expected behavior:
सबसे safe checks पहले list करें।
हाथों-हाथ verification note
इस refresh में official setup, common workflows और CLI usage links देखे गए, install commands को fenced code blocks में रखा गया, Hindi leakage hold हटाने से पहले headings localized की गईं, और internal links /hi/blog/... locale में रखे गए।
यह verification कोई benchmark नहीं है। यहाँ checked items हैं: frontmatter date, Hindi title और description, three use cases, pitfall corrections, code fences, CTA link, और command syntax. Real project में final approval अभी भी human को करना चाहिए।
Next Step
आज एक non-critical repository खोलें, read-only project map बनवाएँ, 30-minute improvement चुनें, और diff review करें।
Quick reference चाहिए तो free Claude Code Quick Reference Cheatsheet डाउनलोड करें। Team adoption, training, या real project workflow के लिए site की resources और consultation links से आगे बढ़ें।
संबंधित लेख
Claude Code को पहला task सौंपने के लिए ऐसा brief लिखें
पहले request में हादसा न हो, इसके लिए मकसद, छूने की हद, proof और rollback को एक पेज में लिखने का brief format—copy-paste उदाहरण के साथ।
Claude Code First Week Command Map: beginners के लिए 12 commands का सही क्रम
Claude Code beginners के लिए first-week command map: inspect, edit, verify और handoff को क्रम में करें।
Claude Code first repo audit checklist: पहली edit से पहले codebase map करें
20 मिनट में scope, risk area, proof command और revenue CTA जांचने की beginner-friendly checklist.
मुफ़्त PDF: Claude Code cheatsheet
Email डालें और commands, review habits तथा safe workflow वाली एक-page PDF पाएँ.
हम आपका data सुरक्षित रखते हैं और spam नहीं भेजते.
लेखक के बारे में
Masa
Claude Code workflow और team adoption पर काम करने वाला engineer.