xavier collantes

Claude Code Cheatsheet

By Xavier Collantes

8/6/2025


Claude Code logo

Download CLI

Bash
1npm install -g @anthropic-ai/claude-code
2
snippet hosted withby Xavier
Native install:
Bash
1# MacOS, Linux
2curl -fsSL claude.ai/install.sh | bash
3
4# Windows. I recommend using the Windows Linux Subsystem.
5irm https://claude.ai/install.ps1 | iex
6
snippet hosted withby Xavier
Running this should start the CLI:
Bash
1claude
2
snippet hosted withby Xavier
If you run into issues, you can add the following to your .zshrc or .bashrc:

Path may vary depending on your node version.

Bash
1alias claude='~/.nvm/versions/node/v22.18.0/bin/claude'
2
Path may vary depending on your node version. hosted withby Xavier

Basic Commands

Bash
1claude --help
2
snippet hosted withby Xavier

Extended Thinking

Claude LLMs have "thinking" variants which can reason about the codebase and provide more accurate responses.
In Cursor you would select the "thinking" variant. In Claude Code, you can ask the LLM to "think" about the codebase with phrases like intensifying phrases such as “think more”, “think a lot”, “think harder”, or “think longer” triggers deeper thinking.

Run Parallel Processes

You can run parallel sessions in the CLI. You can use git worktree to create a new branch and run a parallel session in that branch.

Pipe In And Out

Bash
1cat app.log | claude -p 'what is the error?' > output.txt
2
snippet hosted withby Xavier

CLAUDE.md

The project or repo level file named CLAUDE.md is used to set up your project for programming conventions, instructions, and how to structure your codebase.
You can run /init in the Claude CLI to initialize a CLAUDE.md file.
  • Write most used commands (build, test, lint) to specify which commands to use (Pytest vs Unittest, etc.)
  • Naming convention such as snake_case or camelCase
  • How the codebase is structured
In the Cladue CLI, use /memory to read the memories in the CLAUDE.md file.
Here are the templates I use for my projects.
Python:

Loading gist...

Github:

Loading gist...

Github Integration

Tell Claude Code to create a PR: "create a pr"
Tell Claude Code to create a branch: "create a branch for the feature..."
Tell Claude Code to create a Github Issue: "create a github issue about the bug..."

Use Claude As Part of Checks

Related Articles

Related by topics:

llm
ai
claude
How I Built My Own MCP Server

MCP server for embedding free stock images in Claude Code.

By Xavier Collantes8/24/2025
thingsIBuilt
llm
ai
+7

HomeFeedback