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

https://github.com/ikkxeer/craftcoding

Application developed to promote the non-use of AI in programming, a tool to focus on and avoid using AI during code development.
https://github.com/ikkxeer/craftcoding

Last synced: 2 months ago
JSON representation

Application developed to promote the non-use of AI in programming, a tool to focus on and avoid using AI during code development.

Awesome Lists containing this project

README

          

CraftCoding

# CraftCoding

**Monitor your coding sessions. Prove every line is yours.**

[![Python](https://img.shields.io/badge/Python-3.10%2B-3776AB?style=flat-square&logo=python&logoColor=white)](https://www.python.org/)
[![Platform](https://img.shields.io/badge/Platform-Windows-0078D6?style=flat-square&logo=windows&logoColor=white)](https://www.microsoft.com/windows)
[![License](https://img.shields.io/badge/License-MIT-22c55e?style=flat-square)](LICENSE)
[![Built with AI](https://img.shields.io/badge/Built%20with-AI%20%F0%9F%98%87-D4AF37?style=flat-square)](https://github.com)

*Yes, this anti-AI tool was built with AI. The irony is very much intentional.*

---

## What is CraftCoding?

CraftCoding is a desktop application that runs silently while you code. It watches your windows, browser tabs, and running processes every second. The moment it spots an AI tool β€” ChatGPT, Cursor, Copilot, or anything else β€” it fires an alert, docks your score, and in Strict Mode redirects you.

When you finish a project you get a **certificate PNG** with your stats and one of three seals:

- πŸ₯‡ **Artisan Coder** β€” 0 detections, score β‰₯ 90%
- πŸ₯ˆ **Hybrid Coder** β€” used hints or had some detections
- ❌ **Vibe Coder** β€” score below 50%

---

## Why does this exist?

During my second year of cross-platform application development studies, I started noticing a worrying pattern: students were handing their problem-solving over to AI entirely β€” often without understanding what came back.

AI is a powerful tool. The issue is **unconscious dependency**. CraftCoding makes the choice deliberate. You can still ask for help β€” it just costs you points and downgrades your seal.

> *The certificate is not a judgment. It is a record.*

---

## Features

- **Project sealing**: name your project, seal it, and the timer only runs while you're actively coding
- **Live timer**: pauses and resumes, everything saves automatically to a local SQLite database
- **4-layer AI detection**: window titles, browser process arguments, running executables (Cursor, Copilot, Tabnine…), and live Edge/Chrome session files
- **Two modes**: Friendly (warnings only) or Strict (closes the AI tab and redirects to Stack Overflow)
- **Human Score**: starts at 100%, βˆ’5 per detection, βˆ’10 for using the emergency hint
- **Emergency mode**: if you're completely stuck you can request a hint, but it downgrades your seal
- **Certificate export**: generates a styled PNG with your medal image, stats, and a unique ID
- **Project library**: manage all your past projects, filter by status, reopen or delete them

---

## Installation

### Prerequisites

- Python **3.10 or higher**
- Windows 10 / 11 *(detection layers 2–4 are Windows-specific)*

### 1 β€” Clone the repo

```bash
git clone https://github.com/yourusername/craftcoding.git
cd craftcoding
```

### 2 β€” Install dependencies

```bash
pip install customtkinter pygetwindow pyautogui psutil Pillow
```

Optional: Firefox session detection

```bash
pip install lz4
```

### 3 β€” Add your medal images

Place the three medal PNGs in an `img/` folder next to the script:

```
craftcoding/
β”œβ”€β”€ craftcoding.py
β”œβ”€β”€ craftcoding.db ← created automatically on first run
└── img/
β”œβ”€β”€ artisancoder.png
β”œβ”€β”€ hybridprogramer.png
└── vibecoder.png
```

### 4 β€” Run

```bash
python craftcoding.py
```

---

## How to use it

```
1. Type your project name ──▢ Press Enter or click SELLAR
β”‚
2. Choose your mode ────────────────▢ Amable (warnings) or Estricto (closes tabs)
β”‚
3. Click β–Ά INICIAR FORJA ────────────▢ Timer starts. CraftCoding watches.
β”‚
4. Code. β”‚
β”‚
5. Click ⏸ PAUSAR ─────────────────▢ Progress saves automatically.
β”‚
6. Click πŸ† CERTIFICAR ─────────────▢ Get your seal. Export your certificate.
```

> Your project library is always accessible from the sidebar with **πŸ“‚ Mis Proyectos**.
> You can close and reopen the app at any time β€” everything is saved.

---

## Detection accuracy

| Scenario | Result |
|----------|--------|
| ChatGPT open with a renamed chat title | βœ… Detected β€” window title scan |
| Claude in an Edge tab in the background | βœ… Detected β€” session file scan |
| Cursor IDE running | βœ… Detected β€” process scan |
| GitHub Copilot active in VS Code | βœ… Detected β€” process scan |
| ChatGPT visited 20 min ago, tab now closed | βœ… Not detected β€” history scan intentionally removed |
| Edge closed, old session file on disk | βœ… Not detected β€” 5-minute freshness check |
| Ollama running locally | βœ… Detected β€” process scan |

---

## Project structure

```
craftcoding.py Entry point and full application
craftcoding.db SQLite database (auto-created, auto-migrated)
img/ Medal images used in certificate generation
```

The database stores: project name Β· total seconds Β· Human Score Β· AI detection count Β· status Β· start/end dates Β· seal type.
Schema migrations run automatically β€” old databases update without data loss.

---

## Tech stack

| Library | Role |
|---------|------|
| [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter) | Modern dark-mode desktop UI |
| [psutil](https://github.com/giampaolo/psutil) | Process monitoring |
| [PyGetWindow](https://github.com/asweigart/pygetwindow) | Window title scanning |
| [PyAutoGUI](https://github.com/asweigart/pyautogui) | Tab redirection in Strict mode |
| [Pillow](https://python-pillow.org/) | Certificate PNG generation |
| SQLite3 | Local project database (stdlib) |

---

**CraftCoding** β€” because the best code is the code you actually understand.