Chuleta de Claude Code y referencia rapida

Configuración y Acceso

$curl -fsSL https://claude.ai/install.sh | bash
$curl -fsSL https://claude.ai/install.sh | bash

Instalar Claude Code de forma nativa en macOS, Linux o WSL con actualizaciones automáticas en segundo plano.

$irm https://claude.ai/install.ps1 | iex

Instalar Claude Code con el instalador nativo desde Windows PowerShell con actualizaciones automáticas en segundo plano.

$curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Instalar Claude Code con el instalador nativo desde Windows CMD con actualizaciones automáticas en segundo plano.

$brew install --cask claude-code
$brew install --cask claude-code

Instalar Claude Code con Homebrew.

$brew upgrade claude-code
$brew upgrade claude-code

Las instalaciones de Homebrew no se actualizan automáticamente. Ejecute este comando para obtener las características más recientes y parches de seguridad.

$winget install Anthropic.ClaudeCode

Instalar Claude Code con WinGet en Windows.

$winget upgrade Anthropic.ClaudeCode

Las instalaciones de WinGet no se actualizan automáticamente. Ejecute este comando para obtener las características más recientes y parches de seguridad.

$claude

Iniciar una sesión interactiva de Claude Code en el proyecto actual.

$claude -v

Mostrar la versión instalada de Claude Code.

$claude update

Actualizar manualmente Claude Code a la versión más reciente.

$claude --init

Ejecutar ganchos de inicialización e iniciar modo interactivo.

$claude auth login

Inicie sesión en su cuenta de Claude desde la terminal. Use --email para rellenar previamente el correo electrónico o --sso para forzar autenticación SSO.

$claude auth status --text

Mostrar estado de autenticación como JSON. Use --text para salida legible. Sale con código 0 si está conectado, 1 si no.

$claude "write a test for this function"

Ejecutar una tarea única y obtener una respuesta sin iniciar una sesión interactiva.

$claude commit

Crear una confirmación de Git con Claude Code escribiendo el mensaje de confirmación.

/init

Inicializar archivos de guía de proyecto para el proyecto actual.

/memory

Abrir administración de memoria de Claude desde dentro de la sesión.

/login

Inicie sesión en su cuenta de Anthropic.

/logout

Cierre sesión de su cuenta de Anthropic.

/mobile
/ios
/android

Mostrar código QR para descargar la aplicación móvil de Claude.

/import codex
/import gemini
/import cursor

Bring configuration from OpenAI Codex, Google Gemini CLI, or Cursor into Claude Code, including instruction files, MCP servers, commands, subagents, and skills.

Solicitud e Entrada

$claude -p "explain this function"

Ejecutar Claude una vez en modo de impresión y salir con una única respuesta.

Ctrl + G
Ctrl + X then Ctrl + E

Abrir el mensaje actual en su editor de texto predeterminado.

/btw what was the name of that config file again?

Haga una pregunta lateral sin agregarla al historial principal de conversación. Puede ejecutarse mientras Claude trabaja.

Ctrl + K

Eliminar desde el cursor hasta el final de la línea.

Ctrl + U

Eliminar toda la línea actual.

Ctrl + Y

Pegar texto eliminado con comandos de muerte de readline.

Alt + Y

Ciclar a través de entradas de anillo de muerte anterior después de pegar.

Alt + B

Mover el cursor hacia atrás una palabra.

Alt + F

Mover el cursor hacia adelante una palabra.

Ctrl + V or Cmd + VAlt + VCtrl + V or Alt + V

Pegar una imagen desde el portapapeles.

\ + Enter
Shift + Enter
Ctrl + J
Option + EnterShift + EnterShift + Enter

Insertar una nueva línea para entrada multilínea.

/

Abrir el selector de comando de barra diagonal desde el inicio del mensaje.

!

Ingresar modo bash desde el inicio del mensaje.

@

Activar autocompletado de ruta de archivo.

Tab

Aceptar una sugerencia de mensaje para editar.

Enter

Aceptar una sugerencia de mensaje y enviarla inmediatamente.

Escape
Backspace
Ctrl + U

Salir del modo bash cuando el mensaje esté vacío.

/voice

Alternar dictado de voz push-to-talk.

Space
Enter
Escape

Descartar una superposición de pregunta lateral /btw y volver al mensaje principal.

/goal all tests passing
/goal clear

Set a goal: Claude keeps working across turns until the condition is met. Pass clear to remove an active goal early.

/loop 5m check if the deploy finished

Run a prompt repeatedly while the session stays open, with an interval such as 5m, or let Claude self-pace. Alias: /proactive.

/schedule

Create, update, list, or run routines, which execute in the cloud on a schedule. Alias: /routines.

/deep-research compare state of the art RAG approaches

Fan out web searches on a question, fetch and cross-check sources, and synthesize a cited report.

Ctrl + S

Stash the current prompt for later. With text in the input, stashes it and clears the prompt; pressed again on an empty prompt, restores the stashed text.

Ctrl + A

Move the cursor to the start of the current line. In multiline input, moves to the start of the current logical line.

Ctrl + E

Move the cursor to the end of the current line. In multiline input, moves to the end of the current logical line.

Ctrl + W

Delete back to the previous whitespace. One press removes a whole path or --flag=value.

Alt + D

Delete to the end of the current word, or to the end of the next word when the cursor is between words.

Ctrl + _
Ctrl + Shift + -

Undo the last input edit, restoring the previous input text and cursor position.

Ctrl + Enter
Ctrl + X then Ctrl + S

Send your queued messages, and your draft with them, right away while Claude is still working.

$claude -p "query" --output-format json

Get JSON output from print mode for scripts and automation.

$claude -p --fallback-model sonnet "query"

Enable automatic fallback to a specified model when the default model is overloaded (print mode only).

$claude -p --max-turns 3 "query"
$claude -p --max-budget-usd 5.00 "query"

Limit agentic turns or set a spending cap for print mode runs.

Sesiones y Contexto

$claude -c
$claude --continue

Continuar la conversación más reciente en el directorio actual.

$claude --resume auth-refactor
$claude -r

Reanudar una sesión específica por ID o nombre, o mostrar un selector interactivo para elegir una sesión.

/clear
/reset
/new

Limpiar la sesión actual e iniciar una conversación nueva.

/compact "keep only the important parts"

Compactar la conversación actual para mantener solo el contexto importante.

/resume
/continue

Reanudar otra conversación desde dentro de la sesión actual.

/rename feature-auth

Renombrar la conversación actual.

/fork bug-investigation

Copy the current conversation into a new background session and keep working here. Pass a prompt to start the copy on it immediately. To switch into a branch yourself, use /branch; to hand a task to a subagent that reports back, use /subtask.

/context

Mostrar cuánto contexto se está utilizando actualmente.

/plan fix the auth bug

Enter plan mode, optionally passing a task description to start planning immediately.

/tasks

Abrir la lista de tareas para la sesión actual.

/copy

Copy the last assistant response to the clipboard. Pass a number N to copy the Nth-latest response, or pick individual code blocks from the interactive picker.

/export notes.txt

Exportar la respuesta actual a un archivo.

/desktop
/app

Transferir una sesión de terminal a la aplicación de escritorio o web para revisión de diferencias visuales y trabajo continuo.

/add-dir <path>

Agregar un nuevo directorio de trabajo a la sesión actual.

/branch feature-auth
/fork

Crear una rama de la conversación actual en este punto.

/remote-control
/rc

Habilitar control remoto de la sesión actual desde claude.ai.

Esc + Esc

Retroceder o resumir desde el teclado.

/background

Detach the current session to run as a background agent and free your terminal. Pass a prompt to send one more instruction before detaching. Alias: /bg.

/subtask refactor the auth module

Spawn a forked subagent that inherits the full conversation and works on the task while you keep working. Its result returns to this conversation when it finishes.

/cd ../other-project

Move the session to a new working directory while keeping the conversation.

/recap

Generate a one-line summary of the current session on demand.

/teleport

Pull a cloud session from claude.ai into this terminal. Opens a picker, then fetches the branch and conversation. Alias: /tp.

/autocompact 500k
/autocompact auto

Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as 500k, or auto for the model-tuned default.

$claude -w feature-auth
$claude --worktree

Start Claude in an isolated git worktree at .claude/worktrees/<name> so parallel sessions do not conflict. If no name is given, one is auto-generated.

$claude -n "my-feature-work"

Set a display name for the session, shown in /resume and the terminal title. Resume it later with claude --resume <name>.

$claude --resume abc123 --fork-session

When resuming, create a new session ID instead of reusing the original, keeping the original conversation untouched.

$claude --from-pr 123

Resume sessions linked to a specific GitHub PR (auto-linked when created via gh pr create).

$claude --teleport

Resume a web session from claude.ai in your local terminal.

$claude --remote "Fix the login bug"

Create a new web session on claude.ai with the provided task description.

$claude --remote-control "My Project"

Start an interactive session with Remote Control enabled so you can also control it from claude.ai or the Claude app.

Navegación y Control

Ctrl + C

Cancelar la entrada o generación actual.

Ctrl + F

Matar todos los agentes de fondo.

Ctrl + D

Salir de la sesión de Claude Code.

/exit
/quit

Salir de Claude Code desde el símbolo del sistema.

Ctrl + L

Limpiar la pantalla del terminal manteniendo el historial de conversación.

Ctrl + O

Alternar salida detallada para detalles de ejecución de herramientas.

Ctrl + B

Tareas en ejecución en segundo plano. Los usuarios de Tmux presionan Ctrl+B dos veces.

Ctrl + T

Mostrar u ocultar la lista de tareas.

Ciclar a través de pestañas en diálogos y menús.

Navegar por el historial de comandos.

Ctrl + Z

Suspend Claude Code to your shell (Unix only). Run fg to resume.

Revisión y Diagnósticos

/diff

Mostrar la diferencia actual dentro de Claude.

/rewind
/checkpoint
/undo

Retroceder la conversación a un punto de control anterior.

/doctor
/checkup

Run a setup checkup that diagnoses installation, settings, extension, and CLAUDE.md problems and proposes fixes Claude applies after you confirm.

/status

Mostrar estado de sesión y cuenta de Claude actual.

/stats

Mostrar estadísticas detalladas de conversación y uso incluyendo historial de sesión y racha.

/insights

Generar un informe analizando sesiones de Claude Code, patrones de interacción y puntos de fricción.

/usage

Mostrar información de uso actual.

/cost

Mostrar información de gasto y costo actual.

/security-review

Revisar la rama actual para problemas de seguridad.

Cmd + ClickCtrl + ClickCtrl + Click

Abrir la solicitud de extracción vinculada desde el pie de página.

/code-review
/code-review high 1234
/code-review ultra --fix
/review

Review the current diff, or a PR number, branch, or path, for correctness bugs. Pass --fix to apply findings, --comment to post them on the PR, or ultra for a deep multi-agent cloud review. Alias: /review.

/simplify

Review the changed code for cleanup opportunities and apply the fixes. Four agents run in parallel covering reuse, simplification, efficiency, and abstraction level. Does not look for correctness bugs; use /code-review for those.

/verify

Confirm a code change does what it should by building the app, running it, and observing the result, rather than relying on tests or type checks.

/debug login fails on safari

Enable debug logging for the current session and troubleshoot issues by reading the session debug log. Optionally describe the issue to focus the analysis.

Búsqueda Inversa

Ctrl + R

Iniciar búsqueda inversa a través del historial de comandos o ciclar a través de coincidencias más antiguas.

Tab
Esc

Aceptar la coincidencia de búsqueda inversa actual para editar.

Enter

Aceptar la coincidencia de búsqueda inversa actual y ejecutarla.

Backspace

Salir de la búsqueda inversa cuando la consulta esté vacía.

Ctrl + C

Cancelar búsqueda inversa y restaurar la entrada original.

Configuración e Integraciones

/config
/settings
/config theme=dark

Open the Settings interface, or pass key=value pairs to set a setting directly, such as /config thinking=false or /config model=sonnet.

/theme

Abrir el selector de tema.

/color orange

Establecer el tema de color de la interfaz.

/keybindings

Abrir configuración de enlace de teclas.

/terminal-setup

Instalar enlaces específicos de terminal como soporte Shift+Enter.

/model

Cambiar modelos desde dentro de la sesión actual.

/effort high

Cambiar el nivel de esfuerzo de razonamiento actual.

/fast on

Alternar modo rápido en la sesión actual.

/permissions
/allowed-tools

Abrir configuración de permisos.

/sandbox

Abrir configuración de sandbox.

/mcp

Administrar integraciones del servidor MCP.

/plugin

Administrar complementos desde dentro de la sesión.

/reload-plugins

Recargar complementos instalados.

/ide

Conectar Claude Code a su IDE.

/agents

Abrir opciones de agente y compañero de equipo.

/hooks

Ver configuraciones de gancho para eventos de herramientas y automatizaciones.

/config

Toggle between Vim and Normal editing modes from the Settings interface. Removed as the /vim command in v2.1.92.

/statusline

Configurar la visualización de línea de estado de Claude Code en su símbolo del sistema de shell.

Shift + Tab
Alt + M

Alternar modos de permiso.

Option + PAlt + PAlt + P

Cambiar modelos sin limpiar el mensaje actual.

Option + TAlt + TAlt + T

Alternar modo de pensamiento extendido.

Ctrl + T

Alternar resaltado de sintaxis dentro del selector de tema.

/usage-credits

Configure usage credits, or request them from your admin, when you hit a rate limit. Previously /extra-usage.

/output-style concise

List output styles or switch to one.

/update-config allow npm test without prompting

Describe a settings change, such as allowing a command or adding a hook, and Claude edits the matching settings.json file. For theme and model, use /config instead.

/fewer-permission-prompts

Scan your transcripts for common read-only Bash and MCP tool calls, then add a prioritized allowlist to project settings to reduce permission prompts.

/skill-doctor

Show what each of your skills costs in context and how often it gets used, so you can find skills to turn off.

/list-agents
/peers

List the subagents, agent team teammates, and other Claude Code sessions Claude can message, with the name to use for each. Alias: /peers.

Option + OAlt + OAlt + O

Toggle fast mode on or off.

$claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'

Define custom subagents dynamically at launch via JSON, using the same fields as subagent frontmatter plus a prompt field.

$claude --tools "Bash,Edit,Read"

Restrict which built-in tools Claude can use. Use "" to disable all, "default" for all, or list tool names.

$claude --effort high

Set the effort level for the session at launch: low, medium, high, or max (Opus only, session-scoped).

$claude --add-dir ../apps ../lib

Add additional working directories for Claude to access at launch.

$claude --permission-mode plan

Begin the session in a specified permission mode, such as plan.

$claude --mcp-config ./mcp.json
$claude --strict-mcp-config --mcp-config ./mcp.json

Load MCP servers from JSON files or strings, optionally ignoring all other MCP configuration.

Ayuda y Descubrimiento

/help

Abrir la ayuda del comando de barra diagonal integrada.

/skills

Abrir la lista de habilidades disponibles.

/release-notes

Ver el registro de cambios completo con actualizaciones de versión reciente.

/feedback
/bug

Enviar comentarios o informar errores sobre Claude Code.

?

Abrir la leyenda de acceso directo para su entorno actual.