An open API service indexing awesome lists of open source software.

https://github.com/abdosorour7/dev-commands-cheatsheet

The ultimate offline-ready Developer Cheatsheets for Git, Docker, and more: searchable, copy-ready, and organized for real-world workflows.
https://github.com/abdosorour7/dev-commands-cheatsheet

cheatsheet command-line-tool developer-tools docker git

Last synced: 29 days ago
JSON representation

The ultimate offline-ready Developer Cheatsheets for Git, Docker, and more: searchable, copy-ready, and organized for real-world workflows.

Awesome Lists containing this project

README

          

# ๐Ÿง  Dev Cheatsheets

### A fast, searchable, professional reference for everyday developer commands

[![Live Demo](https://img.shields.io/badge/๐ŸŒ_Live_Demo-Visit_Site-00ff9d?style=for-the-badge&labelColor=0a0e17)](https://abdosorour7.github.io/dev-commands-cheatsheet) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-00cfff?style=for-the-badge&labelColor=0a0e17)](https://github.com/abdosorour7/dev-commands-cheatsheet/issues)


**Sections:** Git ยท Docker โ€” and growing

**Data-driven ยท Fast search ยท Copy-ready ยท Multilingual**


![Preview of the cheatsheet UI](https://raw.githubusercontent.com/abdosorour7/dev-commands-cheatsheet/main/preview.png)

---

## ๐Ÿš€ Why This Repo

- Built for speed: open, search, copy, and move on
- Covers real daily workflows for the tools developers use most
- Easy to extend with **new sections** (Git, Docker, โ€ฆ) without touching the rendering code
- Designed to be contributor-friendly
- Clean UI that is readable for long sessions

---

## โœจ Features

- ๐Ÿ—‚๏ธ **Multiple sections** โ€” switch between **Git** and **Docker** cheatsheets with a single click; new sections drop in via a JSON manifest
- โœจ **Multilingual** โ€” switch between English ๐Ÿ‡ฌ๐Ÿ‡ง, Italian ๐Ÿ‡ฎ๐Ÿ‡น, French ๐Ÿ‡ซ๐Ÿ‡ท, and Spanish ๐Ÿ‡ช๐Ÿ‡ธ; your choice is remembered across visits
- ๐Ÿ” **Instant search** โ€” filter any command or description in real time, scoped to the active section
- ๐Ÿ“‹ **One-click copy** โ€” click any command to copy it to your clipboard
- โš ๏ธ **Danger warnings** โ€” destructive commands are clearly marked
- โŒจ๏ธ **Keyboard shortcut** โ€” press `/` to focus search instantly
- ๐Ÿ“ฑ **Fully responsive** โ€” works great on mobile and desktop
- ๐ŸŒ™ **Dark terminal theme** โ€” easy on the eyes, built for developers
- ๐Ÿ“ก **PWA / offline** โ€” installable, with service worker caching
- ๐Ÿงฉ **Modular architecture** โ€” separate data, rendering, state, and interactions

---

## ๐Ÿ—๏ธ Architecture

This project uses a clean static architecture with no framework and no build requirement.

- **`index.html`**: page shell, section pills, semantic structure
- **`assets/css/styles.css`**: visual design, layout, responsive styles
- **`assets/data/sections.json`**: manifest for each section (`key`, `title`, `logo`, `#RRGGBB` `color`, docs URL, `docsLabelKey`)
- **`assets/brands/`**: SVG marks for the section switcher (see `README.md` in that folder for attribution)
- **`assets/data/{section}.{lang}.json`**: per-section command data (e.g. `git.en.json`, `docker.en.json`)
- **`assets/data/ui.json`**: all UI strings keyed by locale (`en`, `it`, `fr`, `es`)
- **`assets/js/app.js`**: app bootstrap and orchestration (sections + language)
- **`assets/js/modules/`**:
- `paths.js` โ€” resolves `assets/data/โ€ฆ`, `assets/brands/โ€ฆ`, and other static URLs from the current page (GitHub Pagesโ€“friendly)
- `data-loader.js` โ€” loads `sections.json` and section data on demand (per language, with English fallback per command)
- `render.js` โ€” renders section pills, category tabs, and command cards
- `state.js` โ€” section, category, and search filtering state
- `interactions.js` โ€” copy, keyboard, scroll behavior
- `i18n.js` โ€” language switching, UI strings, and `localStorage` persistence (lang + section)

Scripts are loaded as **classic** `` files (not ES modules) so the app runs even when a simple local server serves `.js` as `text/plain` (common with `python -m http.server` on Windows). Strict MIME checks for `type="module"` do not apply.

This keeps the app easy to maintain, easy to extend, and contributor-friendly.

### โž• Adding a new section (e.g. Linux, Kubernetes)

1. Add an entry in `assets/data/sections.json` (each section needs a stable `key`, human `title`, `logo` path under `assets/brands/` or `assets/`, theme `color` as `#RRGGBB`, docs link, and `docsLabelKey` matching a key in `ui.json`):

```json
{
"key": "kubernetes",
"title": "Kubernetes",
"logo": "assets/brands/kubernetes.svg",
"color": "#326CE5",
"docsUrl": "https://kubernetes.io/docs/reference/kubectl/",
"docsLabelKey": "footerDocs"
}
```

2. Add the logo SVG under `assets/brands/` (square viewBox, ~24px artwork scales cleanly in the section pills).
3. Create `assets/data/kubernetes.en.json` using the same shape as `git.en.json` / `docker.en.json` (top-level `categories`, each with `commands`).
4. Optional: add localized variants like `kubernetes.fr.json`. Missing translations fall back to English at runtime with an `EN` badge.
5. Add new static files to `sw.js`'s `ASSETS` array and bump `CACHE_NAME` so they work offline after deploy.

No JavaScript changes are required for a new section beyond listing new files in the service worker.

### โž• Adding a new command

1. Add the command to the appropriate `assets/data/{section}.en.json` (required, source of truth).
2. Optionally add translated entries in the other `{section}.{lang}.json` files in the same PR.
3. The UI shows an **EN** badge when a command is shown in English for the active language: missing locale file (all commands), missing row in a locale file, or when `descriptionHtml` still matches the English text after merge (so leaving English copy in a translated file is detected automatically).

### ๐ŸŒ Adding a new language

1. Add the locale's UI strings to `assets/data/ui.json`.
2. Add a button to the `#lang-switcher` in `index.html` and to the `SUPPORTED_LANGS` array in `assets/js/modules/i18n.js`.
3. Translate the per-section files you want to support (`git.{lang}.json`, `docker.{lang}.json`, โ€ฆ). Files can be partial โ€” any missing commands fall back to English at runtime.

**EN badge (automatic):** `assets/js/modules/data-loader.js` merges each section with English, then marks cards with `_fallback: "en"` when there is no `{section}.{lang}.json`, when a command row is absent in that file, or when `descriptionHtml` equals the English entry (normalized whitespace). The card renderer reads `_fallback` and shows the localized โ€œnot translatedโ€ hint from `ui.json`.

---

## ๐Ÿ“š Sections

| Section | Categories | Commands |
|---------|-----------:|---------:|
| ๐Ÿ”ฑ Git | 13 | 127 |
| ๐Ÿณ Docker | 11 | 142 |

### Git categories
โš™๏ธ Setup & Config ยท ๐Ÿ“ Starting a Repo ยท ๐Ÿ”„ Basic Workflow ยท ๐ŸŒฟ Branching ยท โ˜๏ธ Remote (GitHub) ยท โ†ฉ๏ธ Undo & Fix ยท ๐Ÿ“ฆ Stash ยท ๐Ÿท๏ธ Tags ยท ๐Ÿ” Signing & Verification ยท ๐Ÿ” History & Diff ยท ๐Ÿงน Cleanup & Maintenance ยท ๐ŸŒฒ Worktrees ยท ๐Ÿš€ Advanced Branching

### Docker categories
โš™๏ธ Setup & Info ยท ๐Ÿณ Images ยท ๐Ÿš€ Run Containers ยท ๐Ÿ” Container Lifecycle ยท ๐Ÿ” Inspect & Logs ยท ๐Ÿ’พ Volumes ยท ๐ŸŒ Networks ยท ๐Ÿ™ Docker Compose ยท ๐Ÿ“ Dockerfile Instructions ยท ๐Ÿท๏ธ Registry & Sharing ยท ๐Ÿงน Cleanup & Maintenance

---

## ๐Ÿš€ Quick Start

### Option 1 โ€” Use the live website
Just visit: **[abdosorour7.github.io/dev-commands-cheatsheet](https://abdosorour7.github.io/dev-commands-cheatsheet)**

### Option 2 โ€” Run locally
```bash
git clone https://github.com/abdosorour7/dev-commands-cheatsheet.git
cd dev-commands-cheatsheet
```

Open `index.html` first (double-click it, or open it in your browser).

If the page works, you are done.

If commands do not load (browser blocks `file://` JSON loading), run a local server:

```bash
python -m http.server 8080
```

Then open: **http://localhost:8080**

If Python is not installed, use one of these alternatives:

```bash
# Option A (Node.js)
npx serve .

# Option B (VS Code extension)
Use "Live Server" and open the project root
```

No build tools required for local development.

---

## ๐Ÿงฑ Project Structure

```text
dev-commands-cheatsheet/
โ”œโ”€ index.html
โ”œโ”€ manifest.json
โ”œโ”€ sw.js
โ”œโ”€ assets/
โ”‚ โ”œโ”€ brands/
โ”‚ โ”‚ โ”œโ”€ README.md
โ”‚ โ”‚ โ”œโ”€ git.svg
โ”‚ โ”‚ โ””โ”€ docker.svg
โ”‚ โ”œโ”€ css/
โ”‚ โ”‚ โ””โ”€ styles.css
โ”‚ โ”œโ”€ data/
โ”‚ โ”‚ โ”œโ”€ sections.json โ† list of sections (Git, Docker, โ€ฆ)
โ”‚ โ”‚ โ”œโ”€ git.en.json โ† Git โ€” English (canonical source)
โ”‚ โ”‚ โ”œโ”€ git.it.json โ† Git โ€” Italian
โ”‚ โ”‚ โ”œโ”€ git.fr.json โ† Git โ€” French
โ”‚ โ”‚ โ”œโ”€ git.es.json โ† Git โ€” Spanish
โ”‚ โ”‚ โ”œโ”€ docker.en.json โ† Docker โ€” English (canonical source)
โ”‚ โ”‚ โ””โ”€ ui.json โ† UI strings for all locales
โ”‚ โ””โ”€ js/
โ”‚ โ”œโ”€ README.md
โ”‚ โ”œโ”€ app.js
โ”‚ โ””โ”€ modules/
โ”‚ โ”œโ”€ paths.js
โ”‚ โ”œโ”€ data-loader.js
โ”‚ โ”œโ”€ i18n.js
โ”‚ โ”œโ”€ interactions.js
โ”‚ โ”œโ”€ render.js
โ”‚ โ””โ”€ state.js
โ””โ”€ README.md
```

---

## ๐ŸŒŸ Support This Project

- โญ Star the repository if it helped you
- ๐Ÿด Fork it and customize your own version
- ๐Ÿ“ฃ Share it with teammates or in dev communities
- ๐Ÿ› Open issues for mistakes or missing commands

---

## ๐Ÿค Contributing

Contributions are warmly welcome and highly appreciated.

- โž• Add useful missing commands to existing sections
- ๐Ÿ†• Propose entirely new sections (Linux, Kubernetes, npm, AWS CLI, โ€ฆ)
- ๐Ÿ“ Improve command descriptions and examples
- ๐ŸŒ Add or improve translations
- ๐ŸŽจ Suggest UI/UX improvements

Open an issue or PR directly and include clear details/screenshots when relevant.

---

## ๐Ÿ“„ License

MIT ยฉ [abdosorour7](https://github.com/abdosorour7) โ€” free to use, share, and modify.

---

<div align="center">

If this helped you, please consider giving it a โญ โ€” it helps others discover it!

***I'm not primarily a web developer โ€” I just build practical tools that solve real problems.***

Built with thoughtful AI assistance.

---

**Made with โค๏ธ for the developer community**

</div>