2026 में Claude Code की शुरुआत: setup से पहले commit तक
- Claude Code, Anthropic का terminal-native agentic coding tool है. यह आपके shell में चलता है, files पढ़ता है, code लिखता है, commands run करता है, और जब तक task पूरा नहीं हो जाता, खुद को iterate करता रहता है.
- Setup पाँच steps में पूरा होता है: install, authenticate, एक CLAUDE.md लिखें, इसे एक असली task दें, फिर Anthropic console में cost check करें. पूरा सिलसिला 20 मिनट से कम में हो जाता है.
- शुरुआती लोगों की सबसे बड़ी गलती है — एक धुँधले task से शुरुआत करना. Scoped और specific instructions के साथ Claude Code काफी बेहतर perform करता है, और यही चीज़ एक अच्छी CLAUDE.md देती है.
Claude Code असल में है क्या
Claude Code कोई chat interface नहीं है. यह एक command-line agent है जो आपके filesystem को पढ़ता है, bash commands execute करता है, files edit करता है, और अपनी ही output पर तब तक iterate करता रहता है जब तक आपके बताए हुए goal तक नहीं पहुँच जाता. आप इसे एक project directory में start करते हैं, इसे एक task देते हैं, और यह step by step उस problem पर काम करता है — मौजूदा code पढ़ना, बदलाव करना, tests चलाना, और अगर कुछ fail हो तो वापस loop में आना.
व्यावहारिक मतलब यह है कि Claude Code असली, scoped problems पर असली codebases में सबसे अच्छा काम करता है. इसे "मेरे project में help करो" बोलना सिर्फ़ drift पैदा करता है. इसे "src/api/users.ts में createUser function में input validation add करो और उसके tests update करो" बोलना — यह असली results देता है.
Step 1 — Install
Claude Code के लिए Node.js 18 या उससे नया version चाहिए. आगे बढ़ने से पहले node --version से verify कर लें. फिर CLI को globally install करें.
npm install -g @anthropic-ai/claude-code
Confirm करें कि install सफल रहा:
claude --version
# → claude-code 1.x.x
अगर macOS या Linux पर permissions error आती है, तो standard fix यह है कि sudo से npm चलाने के बजाय npm की global directory की ownership adjust की जाए. Anthropic की documentation में prerequisites section में यह cover है. Windows पर terminal को administrator के रूप में run करने से अधिकतर permission issues हल हो जाते हैं, लेकिन भारी agentic use के लिए WSL2 का path ज़्यादा reliable है.
Step 2 — Authenticate
Claude Code आपके Anthropic account के against authenticate करता है. आपके पास या तो Claude Pro subscription होना चाहिए (जिसमें usage allowance शामिल है), या direct API billing के लिए एक Anthropic API key होनी चाहिए.
claude login
यह OAuth complete करने के लिए एक browser window खोलता है. Complete होते ही credentials ~/.claude/ में save हो जाते हैं और जब तक आप account switch नहीं करते, इस step को दोबारा करने की ज़रूरत नहीं पड़ेगी.
अगर आप API key को directly use कर रहे हैं — मसलन CI environment में या ऐसी machine पर जहाँ browser access नहीं है — तो environment variable set करें:
export ANTHROPIC_API_KEY="sk-ant-api03-..."
Claude Pro subscription tier में एक monthly token allowance शामिल है जो moderate individual use के लिए काफी है. अगर आप बड़े codebases पर Claude Code चला रहे हैं, बहुत सारे tests लिख रहे हैं, या इसे loops में चला रहे हैं, तो आप Pro की limit जल्दी hit कर लेंगे और API credits से supplement करना पड़ेगा. Anthropic console real time में आपका usage दिखाता है — पहले कुछ sessions के बाद इसे ज़रूर check करें ताकि अंदाज़ा लग जाए.
Step 3 — अपनी CLAUDE.md लिखें
आपके project root में एक CLAUDE.md file ही वो तरीका है जिससे आप Claude Code को बताते हैं — यह किस तरह का project है, कौनसी commands use करनी हैं, किसे कभी नहीं छूना है, और tests कैसे चलाने हैं. इसके बिना, Claude Code आपके tokens उस context को figure out करने में लगाता है जो उसे मुफ़्त में दिया जा सकता था.
एक minimal लेकिन प्रभावी CLAUDE.md पाँच चीज़ें cover करती है:
# Project: [name]
## Stack
- Runtime: Node 20, TypeScript 5.3
- Framework: Next.js 14 (App Router)
- Database: PostgreSQL via Prisma
- Tests: Vitest, run with `npm test`
## Commands
- Dev server: `npm run dev`
- Build: `npm run build`
- Lint: `npm run lint` — commit से पहले fix करें
- Migrate: `npx prisma migrate dev`
## Rules
- सभी नए API routes src/app/api/ में जाएँगे
- हर input validation के लिए Zod — कोई raw req.body access नहीं
- /legacy/ directory को कभी मत छुओ
- error handlers में console.error calls मत हटाओ
## Do not
- पहले पूछे बिना npm install से packages add मत करो
- .env files modify मत करो
- बिना confirmation के database migrations मत चलाओ
"Do not" section वही है जिसे ज़्यादातर developers पहले pass में skip कर देते हैं — और यही section महँगी गलतियों को रोकता है. अगर ऐसी files हैं जिन्हें Claude कभी नहीं छूना चाहिए, तो उनके नाम लिख दें. अगर ऐसी commands हैं जो उसे autonomously नहीं चलानी चाहिए, तो साफ़ शब्दों में बता दें.
CLAUDE.md structure पर deeper treatment के लिए हमारी post देखें — एक ऐसी CLAUDE.md लिखना जो वाकई काम करे. Septim Starter pack ($9) में पाँच common project types — Next.js, Python Flask, Rails, Go, और plain Node — के लिए battle-tested templates हैं, ताकि आप blank file से शुरुआत न करें.
Step 4 — इसे एक असली task दें
अपनी project directory में navigate करें और interactive session launch करें. Claude Code startup पर आपकी CLAUDE.md अपने आप पढ़ लेता है.
cd ~/projects/my-app
claude
Prompt पर ऐसा task दें जो इतना specific हो कि उसका clear done-state हो. Beginners के लिए अच्छे first tasks:
/api/loginroute में rate limiter add करें — हर IP के लिए मिनट में 5 attempts, exceed होने पर 429src/lib/date-utils.tsके हर function के लिए unit tests लिखें — target 90% branch coveragesrc/components/UserTable.tsxको refactor करें ताकि raw fetch calls के बजाय React Query use हो
Claude Code relevant files पढ़ेगा, बदलावों का प्रस्ताव देगा, और disk पर लिखने या commands चलाने से पहले permission माँगेगा. Default configuration में, यह हर write operation से पहले confirm करेगा — सीखने के लिए यही सही mode है. एक बार जब आप tool का behavior समझ लेते हैं, तो ~/.claude/settings.json में इन permissions को ढीला या tight कर सकते हैं.
Agentic loop के दौरान क्या होता है
एक typical Claude Code task इस cycle से गुज़रता है:
- मौजूदा structure समझने के लिए relevant source files पढ़ना
- एक implementation plan प्रस्तुत करना और उन files को list करना जिन्हें वह touch करेगा
- एक-एक file में बदलाव लिखना, हर बदलाव के साथ explanation
- Test suite चलाना (अगर CLAUDE.md में configured है) और failures पर iterate करना
- Completion report देना और हर बदली हुई file list करना
सीधे tasks पर — एक form में field add करना, एक छोटा utility function लिखना, एक type error fix करना — यह दो मिनट से भी कम में चलता है. बड़े tasks (एक module को refactor करना, end-to-end एक feature add करना) पर 5-15 मिनट और कुछ rounds के iteration की उम्मीद रखें.
Step 5 — अपनी costs check करें
Claude Code को scale पर run करना मुफ़्त नहीं है, और beginner sessions अक्सर उम्मीद से ज़्यादा tokens consume करते हैं क्योंकि context window file reads, tool outputs और conversation history से भर जाता है.
Anthropic console console.anthropic.com पर आपका token usage model और तारीख के हिसाब से breakdown में दिखाता है. पहले दो-तीन sessions के बाद dashboard ज़रूर check करें ताकि लंबे tasks के लिए Claude Code use करने से पहले अपने burn rate का अंदाज़ा लग जाए.
अप्रत्याशित cost के तीन pattern होते हैं:
- Context में बड़ी files. अगर Claude Code एक 10,000-line file को पढ़कर एक function के बारे में सवाल answer करता है, तो आपने 10,000 lines के input tokens के लिए payment किया. पूरे codebase के बारे में broad सवाल पूछने के बजाय इसे specific files पर point करें.
- बार-बार context rebuild होना. Session में हर नया message पूरी conversation history दोबारा भेजता है. लंबे sessions महँगे पड़ते हैं. एक ही session पूरे दिन चलाने के बजाय असंबंधित tasks के लिए fresh sessions शुरू करें.
- Sub-agent spawn होना. Claude Code parallel काम के लिए sub-agents spawn कर सकता है. हर sub-agent अपना context रखता है. अगर आप कई agents चला रहे हैं, तो आपकी cost उसी हिसाब से बढ़ती है. Tokenocalypse guide इसे विस्तार से cover करती है — देखें sub-agent cost breakdown.
एक well-scoped coding task आम तौर पर file size और complexity के अनुसार $0.05–$0.40 के API credits में होता है. एक ऐसा session जहाँ आप Claude Code से कुछ करने से पहले पूरा codebase समझने को कहते हैं, कई dollars में जा सकता है. आपने step 3 में जो CLAUDE.md लिखी है, वह इस दूसरे pattern को काफी कम करती है — पहले से दिया गया context, exploration पर खर्च होने वाले tokens की जगह ले लेता है.
Septim Starter — $9 pay-once
Claude Code beginners के लिए एक structured onboarding kit: पाँच project types के CLAUDE.md templates, एक permission-settings reference, 30-task practice sequence, और एक cost-calibration worksheet. Purchase पर GitHub repo invite मिलता है — कोई subscription नहीं, कोई expiry नहीं.
Septim Starter — $9 लें →पहले session की common गलतियाँ
Claude Code से कहना — "मेरा project देखो और बताओ क्या गड़बड़ है"
यह context window को एक fishing expedition पर ज़ाया कर देता है. Output एक general code review होगी जो शायद कुछ असली issues identify करे, लेकिन काफी token cost पर. Structured code-review exercises के लिए Septim Drills ($29) use करें, या Claude Code को एक specific सवाल के साथ एक specific file पर point करें.
Plan को approve करने से पहले उसे न पढ़ना
Claude Code execute करने से पहले एक plan present करता है. उसे पढ़िए. Complex tasks पर plan में कभी-कभी ऐसे steps शामिल होते हैं जो आप sanction नहीं करेंगे — एक table drop करना, एक cache layer हटाना, एक ऐसी file को छूना जिसे आपने specifically exclude किया था. Plan stage पर इसे पकड़ना मुफ़्त है. Writes हो जाने के बाद पकड़ना — एक git revert.
Version control के बिना इसे चलाना
Claude Code disk पर लिखता है. इसे केवल उन repositories में चलाएँ जिनकी working tree clean हो ताकि आप हर बदलाव पर git diff कर सकें और जो आपको पसंद न आए उसे git checkout . से वापस ला सकें. अगर आप अभी तक git use नहीं कर रहे, तो अपना पहला session शुरू करने से पहले एक repository initialize करें.
CLAUDE.md skip करना
CLAUDE.md के बिना, Claude Code project context को file exploration से infer करता है. वह inference tokens लेती है और conventions, forbidden commands और test runners के बारे में अक्सर ग़लत होती है. Step 3 में CLAUDE.md पर 20 मिनट खर्च करना — यह आपके पहले हफ़्ते के use में उससे ज़्यादा बचा देगा.
आगे कहाँ जाएँ
एक बार जब आप कुछ tasks सफलतापूर्वक पूरे कर लेते हैं, तो स्वाभाविक अगला step है Claude Code को MCP servers के साथ extend करना — ऐसे integrations जो इसे आपके database, GitHub, या browser जैसे external tools तक access देते हैं. एक practical walkthrough के लिए MCP server tutorial देखें.
अगर आप एक team के अंदर Claude Code चला रहे हैं और automated PR review set up करना चाहते हैं, तो PR review setup guide GitHub Action configuration को end to end cover करती है.
Scale पर cost management के लिए — जब आप beginner phase से आगे निकल चुके हों और रोज़ाना Claude Code use करते हों — cost monitoring guide और context management post देखें.
Septim Starter — $9 · CLAUDE.md templates + onboarding kit
पाँच project-type templates, beginners के लिए scoped 30-task practice sequence, permission-settings reference, और एक cost-calibration worksheet. Pay once, indefinitely use करें.
Septim Starter — $9 खरीदें → या structured practice के लिए Septim Drills ($29) पर जाएँ →