Skip to main content

text2dsl 🎤

Głosowa nawigacja CLI z kontekstowym wsparciem

PyPI Python License Downloads GitHub stars GitHub forks GitHub issues GitHub pull requests Tests Code style: black Type checking: mypy Platform Python 3.8+ Dependencies Languages

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • 🤖 LLM usage: $0.5139 (7 commits)
  • 👤 Human dev: ~$813 (8.1h @ $100/h, 30min dedup)

Generated on 2026-09-13 using openrouter/qwen/qwen3-coder-next


Framework do głosowej i tekstowej interakcji z narzędziami deweloperskimi (make, shell, git, docker, python) poprzez warstwę DSL z inteligentnymi sugestiami.

🌍 Obsługiwane języki

Język Kod TTS Voice Przykład
🇵🇱 Polski pl pl-PL-MarekNeural "zbuduj projekt"
🇩🇪 Deutsch de de-DE-ConradNeural "bauen Projekt"
🇬🇧 English en en-US-GuyNeural "build project"

🏗 Architektura

┌─────────────────────────────────────────────────────────────┐
│                    Użytkownik                               │
│              (głos / tekst / terminal)                      │
└─────────────────────────────┬───────────────────────────────┘
                              │
┌─────────────────────────────▼───────────────────────────────┐
│              Voice Layer (TTS/STT)                          │
│         Whisper / Edge-TTS / pyttsx3                        │
│              🇵🇱 PL  |  🇩🇪 DE  |  🇬🇧 EN                      │
└─────────────────────────────┬───────────────────────────────┘
                              │
┌─────────────────────────────▼───────────────────────────────┐
│                 text2DSL Parser                             │
│     Wielojęzyczne rozpoznawanie intencji + kontekst         │
└────────────────────────────┬────────────────────────────────┘
                             │
    ┌───────────┬────────────┼───────────┬─────────────┐
    │           │            │           │             │
┌───▼───┐  ┌────▼────┐  ┌────▼───┐  ┌────▼─────┐  ┌────▼─────┐
│ text2 │  │ text2   │  │ text2  │  │  text2   │  │  text2   │
│ make  │  │ shell   │  │ git    │  │  docker  │  │  python  │
└───────┘  └─────────┘  └────────┘  └──────────┘  └──────────┘

🚀 Instalacja

# Podstawowa instalacja
pip install -e .

# Z obsługą głosu
pip install -e ".[voice]"

# Pełna instalacja (voice + dev tools)
pip install -e ".[all]"

📖 Użycie

Tryb interaktywny

# Polski (domyślny)
text2dsl

# Niemiecki
text2dsl --lang de

# Angielski  
text2dsl --lang en

Pojedyncze polecenie

# Polski
text2dsl "zbuduj projekt"
text2dsl "uruchom testy"
text2dsl "wypchnij zmiany"

# Niemiecki
text2dsl --lang de "bauen"
text2dsl --lang de "Tests ausführen"

# Angielski
text2dsl --lang en "build project"
text2dsl --lang en "run tests"

Tryb głosowy

# Głosowy tryb w polskim
text2dsl --voice --lang pl

# Głosowy tryb w niemieckim
text2dsl --voice --lang de

# Głosowy tryb w angielskim
text2dsl --voice --lang en

Eksport projektu

# Eksport do ZIP
text2dsl --export

# Eksport do TAR.GZ
text2dsl --export --format tar.gz

# Eksport z własną nazwą
text2dsl --export -o moj_projekt.zip

# Lista plików w projekcie
text2dsl --list-files

W kodzie Python

from text2dsl import (
    Text2DSLOrchestrator, 
    OrchestratorConfig,
    VoiceConfig,
    get_language_config
)

# Konfiguracja dla języka niemieckiego
lang_config = get_language_config("de")
voice_config = VoiceConfig(
    language="de",
    voice_name=lang_config.edge_tts_voice
)

config = OrchestratorConfig(
    voice_enabled=True,
    voice_config=voice_config,
    language="de"
)

orchestrator = Text2DSLOrchestrator(config)

# Wykonaj polecenie po niemiecku
response = orchestrator.process("bauen")  # → make build
print(response.message)

# Zmień język na polski
orchestrator.parser.set_language("pl")
response = orchestrator.process("zbuduj")  # → make build

🗣 Przykłady poleceń w różnych językach

Make

Polski Deutsch English Komenda
zbuduj bauen build make all
testy tests tests make test
wyczyść säubern clean make clean
zainstaluj installieren install make install

Git

Polski Deutsch English Komenda
status status status git status
zatwierdź bestätigen commit git commit
wypchnij hochladen push git push
pobierz herunterladen pull git pull
gałąź zweig branch git branch

Docker

Polski Deutsch English Komenda
kontenery container containers docker ps
zbuduj obraz image bauen build image docker build
uruchom serwisy services starten start services compose up

Kontekstowe

Polski Deutsch English Akcja
dalej weiter next następna sugestia
powtórz wiederholen repeat powtórz komendę
cofnij zurück back cofnij
tak ja yes potwierdź
nie nein no anuluj

📦 Eksport i pobieranie

from text2dsl import ArchiveManager

# Utwórz menedżera archiwum
manager = ArchiveManager("/path/to/project")

# Eksportuj do ZIP
result = manager.export_zip("backup.zip")
print(f"Utworzono: {result.path}")
print(f"Plików: {result.files_count}")
print(f"Rozmiar: {manager.format_size(result.size_bytes)}")

# Eksportuj do TAR.GZ
result = manager.export_tar("backup.tar.gz", compression="gz")

# Eksportuj wybrane pliki
result = manager.export_files(
    files=["src/", "Makefile", "README.md"],
    output_path="partial.zip"
)

# Lista plików
files = manager.list_files()
for f in files:
    print(f)

🔧 Konfiguracja głosu

from text2dsl import VoiceConfig, VoiceBackend, VoiceLayer

# Pełna konfiguracja
config = VoiceConfig(
    stt_backend=VoiceBackend.WHISPER,    # STT: Whisper
    tts_backend=VoiceBackend.EDGE_TTS,   # TTS: Microsoft Edge
    language="pl",                        # Język
    auto_detect_language=True,           # Automatyczne wykrywanie
    speech_rate=150,                      # Szybkość mowy
    volume=1.0,                           # Głośność
)

voice = VoiceLayer(config)

# Mów po polsku
voice.speak("Witaj!")

# Zmień na niemiecki
voice.set_language("de", gender="female")
voice.speak("Willkommen!")

# Zmień na angielski
voice.set_language("en", gender="male")
voice.speak("Welcome!")

# Pobierz komunikat systemowy
msg = voice.get_message("listening")  # → "Słucham..." / "Ich höre..." / "Listening..."

📁 Struktura projektu

text2dsl/
├── text2dsl/
│   ├── __init__.py
│   ├── __main__.py              # CLI
│   ├── orchestrator.py          # Główny koordynator
│   ├── core/
│   │   ├── dsl_parser.py        # Parser wielojęzyczny
│   │   ├── context_manager.py   # Zarządzanie kontekstem
│   │   └── suggestion_engine.py # Silnik sugestii
│   ├── layers/
│   │   ├── voice_layer.py       # TTS/STT (PL/DE/EN)
│   │   ├── text2make.py
│   │   ├── text2shell.py
│   │   ├── text2git.py
│   │   ├── text2docker.py
│   │   └── text2python.py
│   └── utils/
│       └── archive.py           # Eksport/archiwizacja
├── tests/
├── examples/
├── pyproject.toml
├── Makefile
└── README.md

🧪 Testy

# Uruchom testy
make test

# Z pokryciem
make test-cov

# Lint
make lint

# Formatowanie
make format

📄 Licencja

Apache 2

👤 Autor

Softreck - softreck.dev

License

Licensed under Apache-2.0.

Metadata

Release files for text2dsl 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for text2dsl 0.2.1
File Size Uploaded
text2dsl-0.2.1.tar.gz 60.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for text2dsl 0.2.1
File Interpreter ABI Platform
text2dsl-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 125.2 kB

Release files / text2dsl-0.2.1.tar.gz

Download URL text2dsl-0.2.1.tar.gz
Size 60.5 kB
Tags Source
SHA-256 checksum
How to use checksums
83dc8f511a080caa8f9f161879b3bffb70fea77ef09c7b286e9fdce26e8025e2
BLAKE2b-256 checksum
How to use checksums
8fa10f6d708884f91d5c7a208df4ba5387b7cb9b0e08cf2094b3ca92f5a4d27e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / text2dsl-0.2.1-py3-none-any.whl

Download URL text2dsl-0.2.1-py3-none-any.whl
Size 64.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7f2ac052a2d23d491b9c37dcd52c18b82dbe3e780440f65421fd4407115a50d
BLAKE2b-256 checksum
How to use checksums
1007d517c028a01f364934113cac25b161b45bdbf852921c2a751ce7c588a9dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page