Metadata-Version: 2.4
Name: cmdex
Version: 0.1.3
Summary: Cmdex: Terminal command explainer for developers
Author: Deepak Kumar Das
Description-Content-Type: text/markdown
Requires-Dist: click
Requires-Dist: rich

# Cmdex

**Cmdex** is a powerful terminal-based command explainer designed for developers.
It helps you understand what a command does **before you run it**, preventing mistakes and improving productivity.

Whether you're a beginner or an experienced developer, Cmdex acts like a **“command Pokédex”** — giving you clear explanations, warnings, and safer alternatives directly in your terminal.

---

## Features

* 🧠 Explain terminal commands in simple language
* 🚨 Detect dangerous or risky commands
* 💡 Suggest safer alternatives
* ⚡ Works directly in terminal (no browser needed)
* 🌍 Cross-platform (Linux, Windows, macOS)

---

## 📦 Installation

### ✅ Recommended (Best Way)

Using pipx:

```bash
pip install pipx
pipx install cmdex
```

---

### 🔹 Alternative (Using pip)

```bash
pip install cmdex
```

---

## 💻 Platform-wise Installation

### Linux

```bash
pip install pipx
pipx install cmdex
```

---

### Windows

```bash
pip install pipx
pipx ensurepath
pipx install cmdex
```

> Restart terminal after installation if needed.

---

### macOS

```bash
pip3 install pipx
pipx install cmdex
```

---

## Usage

Cmdex works directly in your terminal.

### Basic Command:

```bash
cmdex explain "your command"
```

---

### Available Commands:

```bash
cmdex explain "<command>"
cmdex why "<command>"
cmdex xplain "<command>"
```

---

## Examples

### Example 1: Dangerous Command

```bash
cmdex explain "rm -rf /"
```

Output:

```
🚨 CRITICAL RISK
This command deletes all files from the root directory.

Risk Level: 10/10

💡 Safer Alternative:
rm -r <folder>
```

---

### Example 2: Permission Command

```bash
cmdex why "chmod 777 file.txt"
```

Output:

```
⚠ WARNING
Gives full permissions to everyone (read, write, execute)

💡 Safer Alternative:
chmod 755 file.txt
```

---

### Example 3: Git Command

```bash
cmdex xplain "git reset --hard"
```

Output:

```
⚠ WARNING
Resets repository and deletes all uncommitted changes
```

---

## Syntax

```bash
cmdex <command> "<terminal command>"
```

### Where:

* `<command>` → explain | why | xplain
* `"<terminal command>"` → the command you want to analyze

---

## 🎯 Why Cmdex?

Developers often:

* switch to browser to understand commands
* accidentally run dangerous commands
* forget syntax

Cmdex solves all of this **inside your terminal**.



**Cmdex — Know your commands before they break your system 💀**
