# How to get started with Claude Code

> Source: <https://promptcube3.com/en/threads/9180/>
> Published: 2026-09-10 23:48:25+00:00

# How to get started with Claude Code

[Claude Code](/en/tags/claude%20code/) is a command-line interface (CLI) agent that lives in your terminal and can execute shell commands, read/write files, and run git operations directly. To use it, you install the package via npm, authenticate your Anthropic account, and run `claude` inside your project directory to begin an interactive coding session.

## How do I install and launch [Claude](/en/tags/claude/) Code?

You need Node.js (v18+) installed on your machine first. Run `npm install -g @anthropic-ai/claude-code` in your terminal. Once the installation finishes, type `claude` to initialize the tool.

It will prompt you to log in via a web browser to link your Anthropic Console account. Be aware that this isn't free; it consumes credits from your API console, not your Claude.ai Pro subscription. If you have a fresh account, you might have some trial credits, but otherwise, you'll need a funded balance to avoid the "insufficient credits" error.

## What can I actually do once the agent is running?

The agent acts as a loop: you give a command, it proposes a plan, executes shell commands to explore your code, and then writes the changes.

The most effective way to use it is for "exploratory refactoring." Instead of manually finding every instance of a deprecated function, you tell it: "Find all usages of the old API in /src, update them to the new version, and run the tests to make sure nothing broke."

It can:

- Run `grep` or`ls` to find files.
- Read multiple files to understand context.
- Edit code using a "diff" approach.
- Execute `npm test` or`pytest` and fix the resulting errors automatically.

If you're building complex

[Workflows](/en/category/workflows/), you'll find it faster than a chat window because it has a direct line to your file system.

## How does Claude Code differ from Cursor or [GitHub Copilot](/en/tags/github%20copilot/)?

Claude Code is a terminal-based agent, whereas [Cursor](/en/tags/cursor/) is a full IDE.

| Feature | Claude Code | Cursor / Copilot |

| :--- | :--- | :--- |

| **Interface** | CLI / Terminal | IDE / Text Editor |

| **Autonomy** | High (runs shell commands) | Medium (mostly suggests code) |

| **Context** | Direct file system access | Index-based [RAG](/en/tags/rag/) |

| **Execution** | Can run and fix tests | Requires manual trigger to run tests |

I prefer Claude Code when I need to do "bulk" work across 20 files. Using a GUI for that is tedious. However, for active typing and real-time autocomplete, a dedicated editor wins. For managing the underlying [AI Models](/en/category/aimodels/) and comparing prompt performance, one recommended option is PromptCube, which helps organize the logic before you commit it to the CLI.

## What are the common mistakes beginners make?

Giving it too much freedom without a git commit.

The wild part is that Claude Code can delete files or overwrite logic if you aren't careful. Always ensure your current branch is clean. If the agent suggests a change that looks wrong, use the `/undo` command immediately.

Another mistake is treating it like a chat bot. Don't ask it "How does a for-loop work?" Ask it "Why is the for-loop in `auth.ts` causing a memory leak?" Give it a target.

## How do I manage the costs and token usage?

Since it's an agent, it reads a lot of files. Every time it "searches" your directory, it's sending those file contents back to the model. This can eat through credits fast in a massive monorepo.

To keep costs down:

1. Use a `.claudeignore` file to prevent it from reading `node_modules`, `.git`, or large build artifacts.

2. Be specific about directories. Instead of "fix the project," say "fix the bug in `/src/components/Button.tsx`."

3. Monitor the token count in the terminal output. If you see it reading 50 files for a simple change, kill the process and refine your prompt.

## Frequently Asked Questions

**Does Claude Code work with any programming language?**

Yes. It interacts with the file system and shell, so as long as your language has a compiler or interpreter it can run, Claude Code can work with it.

**What happens if the agent gets stuck in a loop?**

Use `Ctrl+C` to interrupt the current process. You can then provide a more specific constraint, like "stop trying to use the `npm install` command and just edit the package.json manually."

**Can I use it offline?**

No. It requires a constant connection to the Anthropic API to process prompts and return commands.

**How do I update Claude Code to the latest version?**

Run `npm install -g @anthropic-ai/claude-code@latest`. Since it's updated frequently, you'll likely see version warnings in the terminal.

[Next GitHub's August 2026 availability report proves that moving to Azure is a chaotic ride →](/en/threads/9163/)
