{"id":51339608,"url":"https://github.com/semcod/reko","last_synced_at":"2026-07-02T06:04:31.098Z","repository":{"id":368189103,"uuid":"1272038992","full_name":"semcod/reko","owner":"semcod","description":"Refaktoryzacja hardkodowanych wartości, struktur i kodu w projektach Python","archived":false,"fork":false,"pushed_at":"2026-06-29T11:19:40.000Z","size":469,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T13:18:04.662Z","etag":null,"topics":["code-quality","constants","hardcoded","llm","magic-numbers","python","refactoring","semcod","static-analysis"],"latest_commit_sha":null,"homepage":"https://semcod.github.io/reko/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semcod.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-17T08:27:04.000Z","updated_at":"2026-06-29T11:24:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/semcod/reko","commit_stats":null,"previous_names":["semcod/reko"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/semcod/reko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Freko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Freko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Freko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Freko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semcod","download_url":"https://codeload.github.com/semcod/reko/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semcod%2Freko/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35034998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-quality","constants","hardcoded","llm","magic-numbers","python","refactoring","semcod","static-analysis"],"created_at":"2026-07-02T06:04:30.551Z","updated_at":"2026-07-02T06:04:31.090Z","avatar_url":"https://github.com/semcod.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reko\n\n\n## AI Cost Tracking\n\n![AI Cost](https://img.shields.io/badge/AI%20Cost-$2.53-green) ![AI Model](https://img.shields.io/badge/AI%20Model-openrouter%2Fqwen%2Fqwen3-coder-next-lightgrey)\n\nThis project uses AI-generated code. Total cost: **$2.5346** with **4** AI commits.\n\nGenerated on 2026-06-29 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/models/openrouter/qwen/qwen3-coder-next)\n\n---\n\nNarzędzie do wykrywania i refaktoryzacji hardkodowanych wartości, struktur danych i kodu w projektach Python.\n\n## Co robi\n\n- **scan** — wykrywa magic numbers, długie stringi, osadzone słowniki/listy, powtarzające się literały\n- **extract** — wyciąga hardkod do modułu stałych (`constants.py` lub wskazany plik)\n- **split** — rozbija duże struktury (dict/list) na mniejsze nazwane fragmenty\n- **move** — przenosi stałe między modułami i aktualizuje importy\n- **remove** — usuwa nieużywane stałe modułowe\n- **apply** — stosuje plan refaktoryzacji (YAML/JSON)\n\n## Instalacja\n\n```bash\ncd ~/github/semcod/reko\npip install -e \".[apply,dev]\"\n```\n\n## Użycie\n\n```bash\n# skan projektu\nreko scan .\n\n# skan z raportem JSON\nreko scan src/ --format json -o report.json\n\n# wyciągnij hardkod do constants.py (dry-run)\nreko extract src/ --target src/myapp/constants.py --dry-run\n\n# rozbij dużą strukturę w pliku\nreko split src/config.py --min-keys 5\n\n# przenieś stałe\nreko move src/old.py src/new_constants.py --names TIMEOUT,API_URL\n\n# usuń nieużywane stałe\nreko remove src/constants.py --dry-run\n\n# zastosuj plan\nreko apply plan.yaml\n```\n\n## Konfiguracja\n\nPlik `reko.yaml` w katalogu projektu:\n\n```yaml\nscan:\n  extensions: [\".py\"]\n  exclude:\n    - \"**/tests/**\"\n    - \"**/__pycache__/**\"\n  min_string_length: 8\n  min_dict_keys: 4\n  allowed_numbers: [0, 1, -1, 2, 10, 100, 1000]\n\nextract:\n  target: \"constants.py\"\n  naming: \"upper_snake\"\n  group_by: \"file\"  # file | kind | none\n```\n\n## API\n\n```python\nfrom pathlib import Path\nfrom reko import scan_project, extract_constants, apply_plan\n\nfindings = scan_project(Path(\"src/\"))\nresult = extract_constants(Path(\"src/app.py\"), target=Path(\"src/constants.py\"))\n```\n\n## Licencja\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemcod%2Freko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemcod%2Freko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemcod%2Freko/lists"}