Skip to content

Commit 8bb6aba

Browse files
author
Lukas Geiger
committed
feat: add codecommander python helpers and i18n
1 parent 1bf2d80 commit 8bb6aba

17 files changed

Lines changed: 1642 additions & 27 deletions

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## Unreleased
6+
7+
### Added
8+
- Add BACH-derived `cc_check_indentation` for Python indentation diagnostics.
9+
- Add BACH-derived `cc_generate_python_code` for template-based Python code snippets.
10+
- Replace Spanish, Simplified Chinese, Japanese, and Russian i18n fallbacks with maintained CodeCommander translations.
11+
- Update README, README_de, llms.txt, server metadata, i18n and security notes for 19 developer tools.
12+
- Extend the local Vitest suite to 154 tests.
13+
514
## [1.3.12] - 2026-06-17
615

716
### Added

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
A developer-focused **Model Context Protocol (MCP) server** that gives AI assistants code analysis, JSON repair, encoding fix, import organization, format conversion, file diff, and regex testing capabilities.
1616

17-
**17 tools** optimized for developers - the coding companion to [FileCommander](https://github.com/ellmos-ai/ellmos-filecommander-mcp).
17+
**19 tools** optimized for developers - the coding companion to [FileCommander](https://github.com/ellmos-ai/ellmos-filecommander-mcp).
1818

1919
**Discoverability:** Published on [npm](https://www.npmjs.com/package/ellmos-codecommander-mcp) as `ellmos-codecommander-mcp`, visible on [Glama](https://glama.ai/mcp/servers/b9kjs4uaav), and prepared for the official MCP Registry with [`server.json`](server.json) under `io.github.ellmos-ai/ellmos-codecommander-mcp`.
2020

@@ -25,6 +25,7 @@ A developer-focused **Model Context Protocol (MCP) server** that gives AI assist
2525
While FileCommander handles filesystem operations, CodeCommander focuses on **code intelligence**:
2626

2727
- **Python Code Analysis** - AST-based class/method extraction, complexity metrics, import analysis
28+
- **BACH-derived Python Helpers** - indentation diagnostics and template-based code generation
2829
- **JSON Repair** - Fix broken JSON automatically (trailing commas, single quotes, BOM, comments)
2930
- **Import Organization** - Sort and deduplicate Python imports per PEP 8
3031
- **Encoding Fix** - Repair Mojibake and double-encoded UTF-8 (27+ patterns)
@@ -165,14 +166,21 @@ FileCommander and CodeCommander are designed to work side by side:
165166
| `cc_diff_files` | Compare two files with unified diff output (configurable context lines) |
166167
| `cc_regex_test` | Test regex patterns against text/files with match details, groups, and replace preview |
167168

169+
### Python Assistance (2 tools)
170+
171+
| Tool | Description |
172+
|------|-------------|
173+
| `cc_check_indentation` | Detect missing colons, unindented return/yield statements, and mixed tab/space indentation |
174+
| `cc_generate_python_code` | Generate Python functions, classes, dataclasses, CLI stubs, tests, exceptions, and modules from templates |
175+
168176
### Export (2 tools)
169177

170178
| Tool | Description |
171179
|------|-------------|
172180
| `cc_md_to_html` | Markdown to standalone HTML with CSS styling (headers, code blocks, tables, nested lists, blockquotes, images, checkboxes) |
173181
| `cc_md_to_pdf` | Markdown to PDF via headless browser (Edge/Chrome). Falls back to HTML if no browser is available |
174182

175-
**Total: 17 tools**
183+
**Total: 19 developer tools** (`cc_set_language` is also available for runtime language switching)
176184

177185
---
178186

@@ -222,7 +230,7 @@ npm test # Run test suite (vitest)
222230

223231
### Testing
224232

225-
The project includes a comprehensive test suite with **139 tests** covering all 17 tools.
233+
The project includes a comprehensive test suite with **154 tests** covering all 19 developer tools and i18n behavior.
226234

227235
```bash
228236
npm test # Run all tests

README_de.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
Ein entwicklerfokussierter **Model Context Protocol (MCP) Server**, der KI-Assistenten Fähigkeiten für Code-Analyse, JSON-Reparatur, Encoding-Korrektur, Import-Organisation, Formatkonvertierung, Datei-Vergleich und Regex-Tests verleiht.
1717

18-
**17 Tools** optimiert für Entwickler – das Coding-Gegenstück zu [FileCommander](https://github.com/ellmos-ai/ellmos-filecommander-mcp).
18+
**19 Tools** optimiert für Entwickler – das Coding-Gegenstück zu [FileCommander](https://github.com/ellmos-ai/ellmos-filecommander-mcp).
1919

2020
**Auffindbarkeit:** Veröffentlicht auf [npm](https://www.npmjs.com/package/ellmos-codecommander-mcp) als `ellmos-codecommander-mcp`, auf [Glama](https://glama.ai/mcp/servers/b9kjs4uaav) sichtbar und mit [`server.json`](server.json) für die offizielle MCP Registry unter `io.github.ellmos-ai/ellmos-codecommander-mcp` vorbereitet.
2121

@@ -26,6 +26,7 @@ Ein entwicklerfokussierter **Model Context Protocol (MCP) Server**, der KI-Assis
2626
Während FileCommander Dateisystem-Operationen übernimmt, konzentriert sich CodeCommander auf **Code-Intelligenz**:
2727

2828
- **Python Code-Analyse** – AST-basierte Klassen-/Methodenextraktion, Komplexitätsmetriken, Import-Analyse
29+
- **BACH-abgeleitete Python-Helfer** – Einrückungsdiagnose und Template-basierte Codegenerierung
2930
- **JSON-Reparatur** – Automatische Korrektur von fehlerhaftem JSON (Trailing Commas, einfache Anführungszeichen, BOM, Kommentare)
3031
- **Import-Organisation** – Python-Imports sortieren und deduplizieren gemäß PEP 8
3132
- **Encoding-Korrektur** – Reparatur von Mojibake und doppelt kodiertem UTF-8 (27+ Muster)
@@ -166,14 +167,21 @@ FileCommander und CodeCommander sind für den parallelen Einsatz konzipiert:
166167
| `cc_diff_files` | Zwei Dateien vergleichen mit Unified-Diff-Ausgabe (konfigurierbare Kontextzeilen) |
167168
| `cc_regex_test` | Regex-Muster gegen Text/Dateien testen mit Match-Details, Gruppen und Ersetzungsvorschau |
168169

170+
### Python-Assistenz (2 Tools)
171+
172+
| Tool | Beschreibung |
173+
|------|-------------|
174+
| `cc_check_indentation` | Fehlende Doppelpunkte, unindentierte return/yield-Zeilen und gemischte Tab-/Leerzeichen-Einrückung erkennen |
175+
| `cc_generate_python_code` | Python-Funktionen, Klassen, Dataclasses, CLI-Stubs, Tests, Exceptions und Module aus Templates erzeugen |
176+
169177
### Export (2 Tools)
170178

171179
| Tool | Beschreibung |
172180
|------|-------------|
173181
| `cc_md_to_html` | Markdown zu eigenständigem HTML mit CSS-Styling (Überschriften, Code-Blöcke, Tabellen, verschachtelte Listen, Zitate, Bilder, Checkboxen) |
174182
| `cc_md_to_pdf` | Markdown zu PDF über Headless-Browser (Edge/Chrome). Fallback auf HTML wenn kein Browser verfügbar |
175183

176-
**Gesamt: 17 Tools**
184+
**Gesamt: 19 Entwickler-Tools** (`cc_set_language` ist zusätzlich für Sprachumschaltung verfügbar)
177185

178186
---
179187

@@ -223,7 +231,7 @@ npm test # Tests ausführen (vitest)
223231

224232
### Tests
225233

226-
Das Projekt enthält eine umfassende Test-Suite mit **139 Tests** für alle 17 Tools.
234+
Das Projekt enthält eine umfassende Test-Suite mit **154 Tests** für alle 19 Entwickler-Tools und i18n-Verhalten.
227235

228236
```bash
229237
npm test # Alle Tests ausführen

SECURITY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ ellmos CodeCommander MCP Server is a developer tool that analyzes and modifies s
2525
| `cc_analyze_methods` | Reads and analyzes methods |
2626
| `cc_extract_classes` | Reads and extracts class info |
2727
| `cc_diagnose_imports` | Reads and diagnoses imports |
28+
| `cc_check_indentation` | Reads and checks Python indentation |
29+
| `cc_generate_python_code` | Generates text output only |
2830
| `cc_validate_json` | Reads and validates JSON |
2931
| `cc_scan_emoji` | Reads and scans for emojis |
3032
| `cc_generate_licenses` | Reads installed packages |

llms.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# ellmos-codecommander-mcp - MCP Server for Code Intelligence
22

3-
> CodeCommander is a developer-focused MCP (Model Context Protocol) server that gives AI assistants code analysis, JSON repair, encoding fix, import organization, format conversion, file diff, and regex testing capabilities. 17 tools optimized for developers -- the coding companion to FileCommander in the ellmos MCP family.
3+
> CodeCommander is a developer-focused MCP (Model Context Protocol) server that gives AI assistants code analysis, JSON repair, encoding fix, import organization, Python indentation checks, code generation, format conversion, file diff, and regex testing capabilities. 19 tools optimized for developers -- the coding companion to FileCommander in the ellmos MCP family.
44

5-
Core capabilities: Python AST-based class/method extraction with complexity metrics and import analysis, JSON repair (trailing commas, single quotes, BOM, comments), PEP 8 import sorting and deduplication, Mojibake/double-encoded UTF-8 repair (27+ patterns), German umlaut repair (70+ patterns), format conversion across JSON / CSV / INI / YAML / TOML / XML / TOON, unified diff output (LCS algorithm), regex tester with match details and replace preview, Markdown-to-HTML/PDF export with code blocks, tables, nested lists, and blockquotes. Cross-platform: Windows, macOS, Linux.
5+
Core capabilities: Python AST-based class/method extraction with complexity metrics and import analysis, BACH-derived indentation diagnostics and Python code generation templates, JSON repair (trailing commas, single quotes, BOM, comments), PEP 8 import sorting and deduplication, Mojibake/double-encoded UTF-8 repair (27+ patterns), German umlaut repair (70+ patterns), format conversion across JSON / CSV / INI / YAML / TOML / XML / TOON, unified diff output (LCS algorithm), regex tester with match details and replace preview, Markdown-to-HTML/PDF export with code blocks, tables, nested lists, and blockquotes. Cross-platform: Windows, macOS, Linux.
66

77
Node.js >= 18, MIT. Published as `ellmos-codecommander-mcp` on npm. Visible on Glama at `https://glama.ai/mcp/servers/b9kjs4uaav`. MCP Registry metadata is provided in `server.json` for the namespace `io.github.ellmos-ai/ellmos-codecommander-mcp`.
88

@@ -46,6 +46,7 @@ Python AST class method extraction MCP
4646
JSON repair encoding fix MCP server
4747
ellmos-ai MCP developer tools
4848
Claude Code MCP code analysis import organization
49+
BACH Python indentation checker code generator MCP
4950
regex tester format conversion markdown PDF MCP
5051
```
5152

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ellmos-codecommander-mcp",
33
"version": "1.3.12",
44
"mcpName": "io.github.ellmos-ai/ellmos-codecommander-mcp",
5-
"description": "A developer-focused MCP server providing 17 tools for code analysis, JSON repair, encoding fix, import organization, format conversion, diff, and regex testing",
5+
"description": "A developer-focused MCP server providing 19 tools for code analysis, JSON repair, encoding fix, import organization, Python indentation checks, code generation, format conversion, diff, and regex testing",
66
"type": "module",
77
"main": "dist/index.js",
88
"bin": {

server.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "io.github.ellmos-ai/ellmos-codecommander-mcp",
44
"version": "1.3.12",
55
"title": "ellmos CodeCommander",
6-
"description": "17 MCP tools for code analysis, JSON repair, import management, encoding fix, format conversion, diffs, regex testing, and Markdown export.",
6+
"description": "19 MCP tools for code analysis, JSON repair, import management, Python indentation checks, code generation, encoding fix, format conversion, diffs, regex testing, and Markdown export.",
77
"websiteUrl": "https://github.com/ellmos-ai/ellmos-codecommander-mcp",
88
"repository": {
99
"url": "https://github.com/ellmos-ai/ellmos-codecommander-mcp",

src/i18n/de.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,24 @@ export const de: Translations = {
197197
browserUsed: (name) => `PDF erstellt mit ${name}`,
198198
},
199199

200+
// === Tool 16: cc_check_indentation ===
201+
cc_check_indentation: {
202+
description: 'Prüft Python-Dateien auf fehlende Doppelpunkte, unindentierte return/yield-Zeilen und gemischte Tab-/Leerzeichen-Einrückung',
203+
header: (path) => `**Python-Einrückungsprüfung: ${path}**`,
204+
filesChecked: 'Dateien geprüft',
205+
filesWithIssues: 'Dateien mit Problemen',
206+
totalIssues: 'Probleme gesamt',
207+
noIssues: '\u2705 Keine Einrückungsprobleme gefunden.',
208+
issuesHeader: '**Probleme:**',
209+
andMore: (count) => `... und ${count} weitere Probleme`,
210+
},
211+
212+
// === Tool 17: cc_generate_python_code ===
213+
cc_generate_python_code: {
214+
description: 'Generiert Python-Code-Snippets aus BACH-abgeleiteten Templates ohne Dateien zu schreiben',
215+
header: (kind) => `**Generierter Python-${kind}**`,
216+
},
217+
200218
// === Tool 16: cc_set_language ===
201219
cc_set_language: {
202220
languageSet: (lang) => `Sprache gesetzt auf: ${lang}`,

src/i18n/en.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,24 @@ export const en: Translations = {
197197
browserUsed: (name) => `PDF created with ${name}`,
198198
},
199199

200+
// === Tool 16: cc_check_indentation ===
201+
cc_check_indentation: {
202+
description: 'Check Python files for missing colons, unindented return/yield statements, and mixed tab/space indentation',
203+
header: (path) => `**Python indentation check: ${path}**`,
204+
filesChecked: 'Files checked',
205+
filesWithIssues: 'Files with issues',
206+
totalIssues: 'Issues total',
207+
noIssues: '\u2705 No indentation issues found.',
208+
issuesHeader: '**Issues:**',
209+
andMore: (count) => `... and ${count} more issues`,
210+
},
211+
212+
// === Tool 17: cc_generate_python_code ===
213+
cc_generate_python_code: {
214+
description: 'Generate Python code snippets from BACH-derived templates without writing files',
215+
header: (kind) => `**Generated Python ${kind}**`,
216+
},
217+
200218
// === Tool 16: cc_set_language ===
201219
cc_set_language: {
202220
languageSet: (lang) => `Language set to: ${lang}`,

0 commit comments

Comments
 (0)