Developer Command Cheatsheet
A collection of 202 command cheatsheets covering Docker, Kubernetes, Git, Linux, Nginx, MySQL, Python, JavaScript and more. Find fast, copy directly.
Popular Cheatsheets
The 12 sheets search engines surface most — jump straight to the commands.
Find by task
Recently Updated
Original Guides View all guides →
Cheatsheets answer "how to write the command"; guides answer "what to do when things break" — original long-form troubleshooting with copy-ready commands.
Terraform State Management in Practice: Remote Backends and State Splitting
The state file is the source of truth in Terraform: it is the collaboration bottleneck and the file most likely to cause a catastrophe. A lost local state means orphaned resources, and concurrent applies mean two engineers acting on the same resource. This guide covers remote backend selection and configuration, the real semantics of state locking including who may unlock and how to unlock safely, correct state splitting by environment and by component, and how import blocks and moved blocks reshape resource addresses without recreating anything.
Version ControlTeam Git Workflows in Practice: Branching Models and Conflict Resolution
Branch model choice, the boundary between rebase and merge, and why conflicts keep recurring all point to the same underlying problem: a team without an explicit commit contract. This guide compares the applicable boundaries of trunk-based development and gitflow, gives concrete rules for "rebase locally, merge on shared branches", explains the destructive edge of history rewriting plus recovery options, analyzes common causes of conflict — parallel edits to the same file, formatters, case-insensitive filesystems — and lays out a message and formatting convention that keeps history readable.
Web ServicesCSS Grid Layout in Practice: From Two Columns to Fully Responsive
The hard part of CSS Grid is not syntax but how fr units distribute space, when auto and minmax are resolved, and how the implicit grid is filled. Starting from the coordinate system of a grid container, this guide explains the precise meaning of fr remainder distribution, why 1fr can overflow, the difference between minmax and auto-fill versus auto-fit, how grid-auto-flow changes placement, and closes with a copy-ready responsive recipe, canonical centering solutions, and a rule for choosing between Grid and Flexbox.
DatabasesMySQL Index Design in Practice: Composite Indexes and the Leftmost Prefix
Column order in a composite index is a structural decision, not a matter of taste, because it determines whether the index can be used at all. Starting from B+ tree ordering, this guide explains why the leftmost prefix rule holds, why a range condition stops further index usage, how to order columns by selectivity, equality, and sort direction, how covering indexes remove table lookups, and which scenarios genuinely break index usage: function wrapping, implicit type conversion, leading wildcards, and charset mismatches.
Version Control
2 cheatsheetsGit Cheatsheet - 80+ Commands, Branch & Rebase
80+ Git commands: commit, branch, merge, rebase, revert, remote and git log, grouped so the fix is one lookup away.
.gitignore Syntax Cheat Sheet - Patterns & Rules
.gitignore syntax cheat sheet: wildcards, directory rules, negation (!), global ignores and templates for Node, Python.
SysOps
41 cheatsheetsBash Cheatsheet - Shell Scripting Command Reference
Bash is the default entry point for automating ops and deploys, and the details that make a script robust — default variables, parameter expansion and string slicing, conditionals, and loops — are where the skill lives. This reference covers variables, branches, loops, functions, and common string/file operations for both writing scripts from scratch and debugging existing ones.
Linux Troubleshooting Cheatsheet - System Fault Diagnosis Command Reference
A one-stop Linux troubleshooting reference organized by process/load, port/network, disk/memory, and logs/services, helping you quickly spot performance bottlenecks, connection anomalies, and resource hogs during live incidents.
Vim Cheatsheet - Modes, Editing & Search Commands
Vim commands: motion, edit, search & replace, visual mode, save/exit, plus batch replace and sudo saves on servers.
Systemd Cheatsheet - systemctl, journalctl & Units
Systemd service reference: start/stop, boot-enabling, journalctl log queries, timer scheduling, targets, resource limits, reload vs restart explained.
Cron Cheatsheet - Expressions & Task Scheduling
Cron schedules in five fields: use */5 for every five minutes, @daily for midnight runs, and crontab -e to edit while MAILTO routes task output.
CI/CD Commands Cheatsheet - CI/CD Pipeline Debugging Reference
A debugging reference for GitHub Actions, GitLab CI, and Jenkins pipelines, covering job reruns and log extraction, runner online status, cache and disk usage, and local reproduction with act or gitlab-runner exec.
Languages
35 cheatsheetsPython Cheatsheet - Syntax, List, Dict & File Commands
For developers who use Python as their scripting and data-processing workhorse: covers venv/pip environments, built-in containers, list comprehensions, file and JSON I/O, exception handling, and common built-ins, ready to apply to real projects.
JavaScript Cheatsheet - ES6+ Command Reference
An ES6+ syntax reference for frontend and full-stack developers: let/const, arrow functions, destructuring, template literals, higher-order array methods, and Promise/async-await — the patterns used most in everyday React/Vue and Node code, ready to reuse.
Go Cheatsheet - Go Syntax & Concurrency Reference
For Go developers building backend services, cloud-native tooling, and CLIs: covers variables & types, control flow, functions and defer, structs & methods, interfaces, goroutine/channel concurrency, and error handling, organized by the coding scenarios you hit in practice.
NumPy Cheatsheet - NumPy Functions & Array Operations Reference
For Python developers doing data analysis, numerical computing, and scientific simulation: covers array creation, indexing & slicing, shape manipulation, math & statistics, random numbers, and the often-misunderstood broadcasting rule, arranged from creating an array to saving it to disk.
Java Cheatsheet - Java & JVM Command Reference
For Java backend and ops developers: covers compiling, running and packaging with javac/java/jar, Maven/Gradle build flows, JVM heap and GC tuning flags, and online troubleshooting with jps/jstack/jmap/jstat, organized in a build → run → tune → debug sequence you can copy.
PHP Cheatsheet - PHP & Composer Command Reference
For PHP developers and the ops people deploying PHP apps: covers running scripts and the built-in dev server, Composer dependency management, extension and ini config checks, php -l linting and phpinfo diagnostics, grouped by the real dev workflow.
Web Services
13 cheatsheetsNginx Cheatsheet - Nginx Configuration & Command Reference
An Nginx configuration handbook for backend, DevOps, and frontend-integration engineers, covering nginx -t/-s reload syntax validation and hot reload, location matching priority, proxy_pass reverse proxies, access/error log troubleshooting, and the common causes of 502/504.
curl / wget Cheatsheet - Command-line File Download & HTTP Requests
For engineers working without a browser who need to call APIs and download with resumable transfers — covering GET/POST requests, headers & cookies, resumable download, proxy auth, and debugging with both curl and wget, plus a side-by-side comparison so you pick the right tool per task.
curl Cheatsheet - curl HTTP Debugging Command Reference
A curl request and troubleshooting handbook for backend developers, testers, and ops, covering GET/POST request bodies, -v/-I/-w request details and timing analysis, -k/-x TLS and proxies, -u/-F/-o auth and upload, plus practical combinations of cookies, redirects, and timeout retries.
HTML Cheatsheet - HTML Tags & Attributes Reference
An HTML reference for building accessible, semantic web pages — document structure, text, lists, links & images, tables, forms, and the semantic tags that convey meaning to both browsers and screen readers.
CSS3 Cheatsheet - CSS3 Properties & Layout Reference
A CSS reference for styling pages without a framework, covering selectors, the box model, Flex/Grid layout, positioning, transitions & animation, and responsive patterns for both desktop and mobile.
Emmet Cheatsheet - Emmet Abbreviation & Syntax Reference
An Emmet abbreviation reference for anyone writing HTML/CSS by hand in VSCode, covering structure expansion, nesting & grouping, attribute and counter shortcuts, and CSS shorthand that turns long markup into a single keystroke.
Databases
9 cheatsheetsSQL Cheatsheet - Common Query Syntax & Examples
SQL query cheat sheet: SELECT, JOINs, GROUP BY traps, subqueries, window functions, NULL semantics and transactions.
MySQL Cheatsheet - Queries, Joins, Users & Indexes
A MySQL command handbook for DBAs, backends, and data analysts, covering database & table management, CRUD, index optimization and slow-query localization with EXPLAIN, user privileges, logical backup & recovery, and replication — highlighting operations that can lock tables or stall replication.
PostgreSQL Cheatsheet - PostgreSQL Command Reference
A PostgreSQL command handbook for backend engineers, DBAs, and data analysts, covering connection & role management, database & table operations, EXPLAIN analysis, lock & transaction troubleshooting, pg_dump/pg_restore backup & recovery, and streaming replication, with paths for locating lock waits and table bloat.
Redis Cheatsheet - 40+ Commands, Keys & Expire
40+ Redis commands: strings, hashes, lists, sets, expiry, persistence, memory, slowlog, cluster and replication.
MongoDB Cheatsheet - MongoDB Command Reference
A MongoDB reference for backend engineers, covering database & collection management, document CRUD, query operators, index strategies that keep queries off full collection scans, the aggregation pipeline, and replica-set vs sharded-cluster responsibilities.
Neo4j Cypher Cheatsheet - MATCH, CREATE & Indexes
Cypher for graph data in Neo4j: create nodes with CREATE, walk typed relationships with MATCH, match-or-create via MERGE, and index with CREATE INDEX.
Containers & Orchestration
4 cheatsheetsDocker CLI Cheatsheet - Run, Build & Compose Commands
A Docker command handbook for developers and operators, walking through image build, container lifecycle, networks & volumes, and Compose orchestration, with key flags and real-world troubleshooting for both local development and production deployment.
kubectl Cheatsheet - Pods, Deploy, Logs & Apply Commands
A kubectl command handbook for app developers and cluster operators, covering Pod query & log diagnosis, deployment scaling & rolling updates, context & namespace switching, and event troubleshooting, with full debugging paths for CrashLoopBackOff and ImagePullBackOff.
Docker Compose Cheatsheet - Command Reference
A Docker Compose command handbook for frontend, backend, and DevOps engineers who manage several services as one unit, covering multi-service orchestration, log tracking & status inspection, config validation & build, network & named volume management, and horizontal scaling, with mitigation and troubleshooting for frequent incidents like down -v data loss and --scale port conflicts.
Dockerfile Cheatsheet - Docker Image Build Reference
A Dockerfile writing reference for developers who package applications into images, covering base image selection, RUN execution, COPY/ADD file handling, ENV variables, port declaration, multi-stage builds, and layer size optimization — with the build cache and .dockerignore pitfalls that silently blow up image size.
Reference
15 cheatsheetsRegex Cheatsheet - Syntax, Patterns & Templates
Regex syntax and patterns: character classes like [abc], anchors ^ and $, quantifiers + and *, captured groups, and templates for email or URL.
HTTP Methods Cheatsheet - REST/HTTP Verbs & Idempotency
HTTP methods and REST semantics: GET/POST/PUT/PATCH/DELETE verbs, idempotency, safe methods, status-code pairing and common misuses. For choosing the right verb when designing APIs so retries and concurrency behave predictably. Pairs with the HTTP Status Codes sheet.
HTTP Status Codes Cheatsheet - HTTP Response Status Code Reference
Every HTTP response status code from 1xx to 5xx with its meaning, common cause and a debugging hint. Built for backend/frontend developers and Nginx/gateway ops to pinpoint why an API misbehaves — distinguishing 4xx from 5xx and checking whether redirects behave as expected.
Markdown Cheatsheet - Markdown Syntax Reference
A Markdown syntax reference covering headings, text formatting, links & images, lists, code blocks, tables, blockquotes and GFM extensions, with cross-platform caveats. For writing technical docs, READMEs and blog posts that stay clean and portable.
LaTeX Cheatsheet - LaTeX Academic Typesetting Reference
LaTeX commands for academic typesetting, grouped into document structure, text formatting, math formulas, list environments, tables/figures and references. For writing papers, reports and theses in LaTeX rather than fighting the tool.
ASCII Code Cheatsheet - ASCII Character Encoding Reference
ASCII codes for control and printable characters, each shown in decimal, hex, octal and HTML-entity forms, plus notes on Latin-1 extension and how to convert codes in common programming languages. For encoding and protocol debugging.
Dev Tools
18 cheatsheetsVS Code Cheatsheet - 50+ Keyboard Shortcuts
50+ VS Code shortcuts: editing, navigation, multi-cursor, refactor, debug, Git, views and terminal, plus settings tips.
Emacs Cheatsheet - Keybindings, Buffers & Org Mode
Emacs keystrokes covering file & buffer operations, cursor movement and editing, search/replace, window management, keyboard macros and Org-mode, with the C/M prefix conventions explained. For terminal or no-GUI editing where Vim-style modal editing is not an option.
ChatGPT Cheatsheet - Prompts, Models & API Reference
Prompt-design patterns and templates for ChatGPT: role assignment, task framing and step breakdown, output-format constraints, few-shot examples and chain-of-thought steering — with common office, coding and writing scenarios. For turning vague asks into consistent, controllable model output.
Pandoc Cheatsheet - Document Conversion Command Reference
Pandoc conversion commands across Markdown/HTML/PDF/DOCX/EPUB interchange, Chinese PDF typesetting and fonts, custom templates and styles, slides and e-books, citations and math. For converting documents without re-keying content or breaking layout.
Homebrew Cheatsheet - macOS Package Manager Reference
Homebrew commands for installing/updating/removing formulas, managing Cask GUI apps, starting and stopping services, switching to domestic mirrors, and inspecting dependencies and debugging broken installs. For keeping a macOS dev environment reproducible.
XPath Cheatsheet - Axes, Predicates & Functions
XPath selector reference: node paths, predicates, axes, string and node functions, wildcards and operators, plus examples for HTML and XML scraping.
Config Formats
6 cheatsheets.env & dotenv Cheatsheet - Load Order & Multi-Env
How dotenv works: .env load order, override rules, multi-env files, fixes for "variable not found" and security traps.
.dockerignore Cheatsheet - Docker Build Context Ignore Rules
For developers shipping with Docker and slimming images: explains .dockerignore glob matching, ignoring files and directories, differences from .gitignore, build-context slimming tips and common pitfalls. A correct ignore file sharply shrinks the context sent to the daemon.
YAML Cheatsheet - Syntax, Anchors, Lists & Examples
A YAML syntax reference for developers who write Docker Compose, Kubernetes and GitHub Actions configs, covering basic syntax, data types, lists, dicts, multiline strings, anchors and explicit type tags. Consult section by section while validating indentation and common write errors.
JSON Cheatsheet - Syntax, Data Types & Parsing Examples
A JSON reference for frontend/backend developers who handle API payloads and JSON config, covering data types, objects, arrays, nesting, common API response patterns, and validation/formatting commands. Consult section by section when a key quotation, comma or nested brace causes an error.
TOML Cheatsheet - Tables, Arrays & Cargo.toml
TOML reference for Rust/Cargo, Hugo and Python pyproject.toml: basic types, date-time, strings, arrays, tables, arrays of tables, Cargo.toml example.
INI Cheatsheet - Sections, Keys & Parser Quirks
INI config syntax: write sections like [section] and key = value pairs, comment with ; or #, and watch parser quirks such as BOM and duplicate keys.
AI CLI
41 cheatsheetsOpen Interpreter CLI Cheatsheet - Terminal AI Coding Agent Full Reference
Full command reference for Open Interpreter, a terminal AI coding agent: install and launch, --local local models, -y auto-accept, --os OS control, --api_base custom endpoint, resume --last session restore and /model interactive commands, all matched to official docs.
llama.cpp Cheatsheet - llama-cli Flags & GGUF
llamacpp how-to: llama-cli flags -m, -i, -ngl, -c, GGUF quantization picks and fixes for load and VRAM errors.
MLC-LLM CLI Cheatsheet - mlc_llm Compile and Serve Full Reference
Full command reference for MLC-LLM mlc_llm CLI: chat interactive, serve local server, convert model, plus --device, --quantization, --model-lib flags, all matched to official docs.
LocalAI CLI Cheatsheet - local-ai Self-hosted Inference Server Full Reference
Full command reference for LocalAI local-ai CLI: run and serve to start, models list/install/pull for management, api and finetune commands, all matched to official docs.
LM Studio CLI Cheatsheet - lms Model Management Full Reference
Full command reference for LM Studio lms CLI: status, ls and ps to list models, get to download, load and unload, server start, and terminal chat, all matched to official docs.
GPT Engineer CLI Cheatsheet - gpte Code Generation Full Reference
Full command reference for GPT Engineer gpte and gpt-engineer CLI: create projects, improve code with -i, --model selection, --steps workflows, and --temperature, all matched to official docs.
AI Prompts
14 cheatsheetsPrompt Engineering General Techniques Cheatsheet - Role/Structure/Constraints/CoT
Model-agnostic prompt engineering techniques covering role anchoring, structured output, explicit constraints, Few-shot, Chain of Thought, self-verification, and common pitfalls, not tied to any specific tool.
RAG Prompt Cheatsheet - Context-grounded Answers & Hallucination Control
Retrieval-Augmented Generation (RAG) prompt patterns covering answer-only-from-context, cite sources, handle no-answer, fuse multi-passage evidence, and flag conflicts — emphasizing traceability and hallucination control.
AI Agent System Prompt Cheatsheet - Role & Tools
Autonomous-agent system-prompt patterns covering goal/role definition, tool declarations, step-by-step decision loops, guardrails & permissions, error handling, and reflection — emphasizing control and safety.
Text-to-Image Prompt Cheatsheet - Style Guide
Model-agnostic text-to-image (Midjourney/Stable Diffusion/SDXL) prompt structure covering subject, style & artists, composition & lens, light & material, negative prompts, and common params.
Code-generation Prompt Cheatsheet & Best Practice
Code-generation prompt patterns covering requirement & context handoff, language/framework/version constraints, I/O contracts, edge cases & tests, and acceptance criteria — emphasizing compilable, runnable output.
DeepSeek Prompts Cheatsheet - R1 Reasoning & V3 Chat Writing Techniques
Prompt-writing reference for DeepSeek that distinguishes the reasoning model R1 (deepseek-reasoner) from the chat model V3 (deepseek-chat), covering R1 hard rules (no system prompt, instructions in user, no few-shot, temperature 0.6) and V3 system-lock, few-shot, and JSON/function calling.
Shortcuts
4 cheatsheetsmacOS Keyboard Shortcuts Cheatsheet - Finder & System
High-frequency macOS shortcuts across General, Finder, Screenshots, Window Management, System and Text Editing — 30+ bindings with what each does. Built for the everyday Mac inefficiency of hunting for the screenshot key or scattering files.
Windows Keyboard Shortcuts - 50+ Win Key Combos
50+ Windows keyboard shortcuts: Win key combos, File Explorer, screenshots, window management and CMD/PowerShell.
Chrome Keyboard Shortcuts Cheatsheet - 40+ Keys
40+ Chrome shortcuts: tabs, windows, browsing, address bar, DevTools and mouse, macOS ⇄ Windows side by side.
Slack Keyboard Shortcuts Cheatsheet - Channels & Search
A Slack keyboard-shortcut reference for team members who rely on Slack across many channels and threads, covering Messages, Channels, Navigation, Search and Formatting — 20+ high-frequency bindings on macOS and Windows.