mcp-souschef 2.5.3__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. mcp_souschef-2.5.3/README.md → mcp_souschef-3.0.0/PKG-INFO +157 -26
  2. mcp_souschef-2.5.3/PKG-INFO → mcp_souschef-3.0.0/README.md +120 -50
  3. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/pyproject.toml +22 -5
  4. mcp_souschef-3.0.0/souschef/__init__.py +57 -0
  5. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/assessment.py +1260 -69
  6. mcp_souschef-3.0.0/souschef/ci/common.py +126 -0
  7. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/ci/github_actions.py +4 -93
  8. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/ci/gitlab_ci.py +3 -53
  9. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/ci/jenkins_pipeline.py +3 -60
  10. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/cli.py +129 -20
  11. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/converters/__init__.py +2 -2
  12. mcp_souschef-3.0.0/souschef/converters/cookbook_specific.py +125 -0
  13. mcp_souschef-3.0.0/souschef/converters/cookbook_specific.py.backup +109 -0
  14. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/converters/playbook.py +1022 -15
  15. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/converters/resource.py +113 -10
  16. mcp_souschef-3.0.0/souschef/converters/template.py +177 -0
  17. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/core/constants.py +13 -0
  18. mcp_souschef-3.0.0/souschef/core/metrics.py +313 -0
  19. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/core/path_utils.py +12 -9
  20. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/core/validation.py +53 -0
  21. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/deployment.py +85 -33
  22. mcp_souschef-3.0.0/souschef/parsers/attributes.py +622 -0
  23. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/parsers/recipe.py +48 -10
  24. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/server.py +715 -37
  25. mcp_souschef-3.0.0/souschef/ui/app.py +3116 -0
  26. mcp_souschef-3.0.0/souschef/ui/health_check.py +36 -0
  27. mcp_souschef-3.0.0/souschef/ui/pages/ai_settings.py +563 -0
  28. mcp_souschef-3.0.0/souschef/ui/pages/cookbook_analysis.py +3529 -0
  29. mcp_souschef-3.0.0/souschef/ui/pages/validation_reports.py +274 -0
  30. mcp_souschef-2.5.3/souschef/__init__.py +0 -17
  31. mcp_souschef-2.5.3/souschef/parsers/attributes.py +0 -257
  32. mcp_souschef-2.5.3/souschef/ui/app.py +0 -1837
  33. mcp_souschef-2.5.3/souschef/ui/pages/cookbook_analysis.py +0 -425
  34. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/LICENSE +0 -0
  35. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/ci/__init__.py +0 -0
  36. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/converters/habitat.py +0 -0
  37. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/core/__init__.py +0 -0
  38. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/core/errors.py +0 -0
  39. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/core/ruby_utils.py +0 -0
  40. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/filesystem/__init__.py +0 -0
  41. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/filesystem/operations.py +0 -0
  42. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/parsers/__init__.py +0 -0
  43. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/parsers/habitat.py +0 -0
  44. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/parsers/inspec.py +0 -0
  45. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/parsers/metadata.py +0 -0
  46. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/parsers/resource.py +0 -0
  47. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/parsers/template.py +0 -0
  48. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/profiling.py +0 -0
  49. {mcp_souschef-2.5.3 → mcp_souschef-3.0.0}/souschef/ui/__init__.py +0 -0
@@ -1,8 +1,44 @@
1
+ Metadata-Version: 2.4
2
+ Name: mcp-souschef
3
+ Version: 3.0.0
4
+ Summary: AI-powered MCP server for Chef to Ansible conversion
5
+ License: MIT
6
+ License-File: LICENSE
7
+ Keywords: chef,ansible,migration,infrastructure,automation,mcp,ai,conversion
8
+ Author: SousChef Contributors
9
+ Requires-Python: >=3.13,<4.0
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: System Administrators
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: System :: Systems Administration
20
+ Classifier: Topic :: Utilities
21
+ Provides-Extra: ui
22
+ Requires-Dist: anthropic (>=0.75.0)
23
+ Requires-Dist: click (>=8.1.0)
24
+ Requires-Dist: mcp (>=1.25.0)
25
+ Requires-Dist: openai (>=1.0.0)
26
+ Requires-Dist: pandas (>=2.0.0) ; extra == "ui"
27
+ Requires-Dist: plotly (>=5.0.0)
28
+ Requires-Dist: python-dotenv (>=1.2.1)
29
+ Requires-Dist: pyyaml (>=6.0.0)
30
+ Requires-Dist: streamlit (>=1.28.0)
31
+ Requires-Dist: zod (>=0.8.0)
32
+ Project-URL: Documentation, https://kpeacocke.github.io/souschef/
33
+ Project-URL: Homepage, https://github.com/kpeacocke/souschef
34
+ Project-URL: Repository, https://github.com/kpeacocke/souschef
35
+ Description-Content-Type: text/markdown
36
+
1
37
  # Chef to Ansible migration - SousChef MCP
2
38
 
3
39
  An AI-powered MCP (Model Context Protocol) server that provides comprehensive Chef-to-Ansible migration capabilities for enterprise infrastructure transformation.
4
40
 
5
- [![PyPI version](https://img.shields.io/pypi/v/mcp-souschef.svg)](https://pypi.org/project/mcp-souschef/)
41
+ [![GitHub release](https://img.shields.io/github/v/release/kpeacocke/souschef)](https://github.com/kpeacocke/souschef/releases)
6
42
  [![Python Version](https://img.shields.io/badge/python-3.14%2B-blue.svg)](https://www.python.org/downloads/)
7
43
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
44
  [![Test Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)](htmlcov/index.html)
@@ -14,17 +50,17 @@ An AI-powered MCP (Model Context Protocol) server that provides comprehensive Ch
14
50
 
15
51
  ## Overview - Chef to Ansible features
16
52
 
17
- SousChef is a complete enterprise-grade migration platform with **27 primary MCP tools** organised across **9 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
53
+ SousChef is a complete enterprise-grade migration platform with **32 primary MCP tools** organised across **10 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
18
54
 
19
55
  ### About Tool Counts
20
56
 
21
- **Why 27 tools in the documentation but more in the server?**
57
+ **Why 32 tools in the documentation but more in the server?**
22
58
 
23
- The MCP server provides **37 total tools** (35 public + 2 internal). This documentation focuses on the **27 primary user-facing tools** that cover the main migration capabilities. The remaining 10 tools are low-level filesystem operations and helper utilities used internally by the main tools.
59
+ The MCP server provides **37 total tools** (35 public + 2 internal). This documentation focuses on the **32 primary user-facing tools** that cover the main migration capabilities. The remaining 3 tools are low-level filesystem operations and helper utilities used internally by the main tools.
24
60
 
25
61
  As a user, you'll primarily interact with the 27 documented tools. Your AI assistant may use the additional tools automatically when needed, but you don't need to know about them for successful migrations.
26
62
 
27
- > 💡 **For developers:** See `souschef/server.py` for the complete list of all 37 registered tools.
63
+ > **For developers:** See `souschef/server.py` for the complete list of all 37 registered tools.
28
64
 
29
65
  ## Model Agnostic - Works with Any AI Model
30
66
 
@@ -72,7 +108,7 @@ Complete cookbook introspection and analysis tools:
72
108
  - **list_directory** - Navigate and explore cookbook directory structures
73
109
  - **read_file** - Read cookbook files with error handling
74
110
  - **read_cookbook_metadata** - Parse metadata.rb files for dependencies and cookbook information
75
- - **parse_recipe** - Analyze Chef recipes and extract resources, actions, and properties
111
+ - **parse_recipe** - Analyse Chef recipes and extract resources, actions, and properties
76
112
  - **parse_attributes** - Parse attribute files with **advanced precedence resolution** (6 levels: default, force_default, normal, override, force_override, automatic)
77
113
  - **list_cookbook_structure** - Display complete cookbook directory hierarchy
78
114
 
@@ -93,7 +129,7 @@ Convert Chef search patterns to dynamic Ansible inventory:
93
129
 
94
130
  - **convert_chef_search_to_inventory** - Transform Chef search queries to Ansible inventory groups
95
131
  - **generate_dynamic_inventory_script** - Create dynamic inventory scripts from Chef server queries
96
- - **analyze_chef_search_patterns** - Discover and analyze search usage in cookbooks
132
+ - **analyse_chef_search_patterns** - Discover and analyse search usage in cookbooks
97
133
 
98
134
  ### 4. InSpec Integration & Validation
99
135
  Complete InSpec-to-Ansible testing pipeline:
@@ -107,14 +143,14 @@ Chef data bags to Ansible vars/vault conversion:
107
143
 
108
144
  - **convert_chef_databag_to_vars** - Transform data bags to Ansible variable files
109
145
  - **generate_ansible_vault_from_databags** - Convert encrypted data bags to Ansible Vault
110
- - **analyze_chef_databag_usage** - Analyze data bag usage patterns in cookbooks
146
+ - **analyse_chef_databag_usage** - Analyse data bag usage patterns in cookbooks
111
147
 
112
148
  ### 6. Environment & Configuration Management
113
149
  Chef environments to Ansible inventory groups:
114
150
 
115
151
  - **convert_chef_environment_to_inventory_group** - Transform Chef environments to inventory
116
152
  - **generate_inventory_from_chef_environments** - Generate complete inventory from environments
117
- - **analyze_chef_environment_usage** - Analyze environment usage in cookbooks
153
+ - **analyse_chef_environment_usage** - Analyse environment usage in cookbooks
118
154
 
119
155
  ### 7. AWX/Ansible Automation Platform Integration
120
156
  Enterprise AWX/AAP configuration generation:
@@ -240,10 +276,10 @@ Output formats:
240
276
  - **json**: Structured JSON for programmatic processing
241
277
  - **summary**: Quick overview with counts only
242
278
 
243
- - **analyze_chef_application_patterns** - Identify application deployment patterns
279
+ - **analyse_chef_application_patterns** - Identify application deployment patterns
244
280
  - **assess_chef_migration_complexity** - Comprehensive migration complexity assessment
245
281
  - **generate_migration_plan** - Create detailed migration execution plans
246
- - **analyze_cookbook_dependencies** - Analyze dependencies and migration order
282
+ - **analyse_cookbook_dependencies** - Analyse dependencies and migration order
247
283
  - **generate_migration_report** - Generate executive and technical migration reports
248
284
 
249
285
  ## Migration Workflow
@@ -253,8 +289,8 @@ Output formats:
253
289
  # Assess migration complexity
254
290
  assess_chef_migration_complexity /path/to/cookbooks
255
291
 
256
- # Analyze cookbook dependencies
257
- analyze_cookbook_dependencies /path/to/cookbook
292
+ # Analyse cookbook dependencies
293
+ analyse_cookbook_dependencies /path/to/cookbook
258
294
 
259
295
  # Generate migration plan
260
296
  generate_migration_plan '{\"cookbooks\": [\"/path/to/cookbook1\", \"/path/to/cookbook2\"]}'
@@ -346,6 +382,79 @@ souschef ui
346
382
  souschef ui --port 8080
347
383
  ```
348
384
 
385
+ **Run in Docker:**
386
+ ```bash
387
+ # Build the image
388
+ docker build -t souschef-ui .
389
+
390
+ # Run the container
391
+ docker run -p 9999:9999 souschef-ui
392
+
393
+ # Or use docker-compose
394
+ docker-compose up
395
+ ```
396
+
397
+ **Docker Environment Configuration:**
398
+
399
+ SousChef supports AI configuration via environment variables in Docker containers. Create a `.env` file in your project root:
400
+
401
+ ```bash
402
+ # Copy the example environment file
403
+ cp .env.example .env
404
+
405
+ # Edit with your AI provider settings
406
+ nano .env
407
+ ```
408
+
409
+ **Example .env file:**
410
+ ```dotenv
411
+ # AI Configuration
412
+ SOUSCHEF_AI_PROVIDER=Anthropic (Claude)
413
+ SOUSCHEF_AI_MODEL=claude-3-5-sonnet-20241022
414
+ SOUSCHEF_AI_API_KEY=your-api-key-here
415
+ SOUSCHEF_AI_BASE_URL=
416
+ SOUSCHEF_AI_PROJECT_ID=
417
+ SOUSCHEF_AI_TEMPERATURE=0.7
418
+ SOUSCHEF_AI_MAX_TOKENS=4000
419
+
420
+ # Streamlit Configuration (optional)
421
+ STREAMLIT_SERVER_PORT=9999
422
+ STREAMLIT_SERVER_HEADLESS=true
423
+ ```
424
+
425
+ **Supported AI Providers:**
426
+ - `Anthropic (Claude)` - Anthropic Claude models
427
+ - `OpenAI (GPT)` - OpenAI GPT models
428
+ - `IBM Watsonx` - IBM Watsonx AI models
429
+ - `Red Hat Lightspeed` - Red Hat Lightspeed models
430
+
431
+ **Environment Variables:**
432
+ - `SOUSCHEF_AI_PROVIDER` - AI provider name (required)
433
+ - `SOUSCHEF_AI_MODEL` - Model name (required)
434
+ - `SOUSCHEF_AI_API_KEY` - API key for authentication (required)
435
+ - `SOUSCHEF_AI_BASE_URL` - Custom API base URL (optional)
436
+ - `SOUSCHEF_AI_PROJECT_ID` - Project ID for Watsonx (optional)
437
+ - `SOUSCHEF_AI_TEMPERATURE` - Model temperature 0.0-2.0 (optional, default: 0.7)
438
+ - `SOUSCHEF_AI_MAX_TOKENS` - Maximum tokens to generate (optional, default: 4000)
439
+
440
+ **Docker Compose (recommended for development):**
441
+ ```yaml
442
+ version: '3.8'
443
+ services:
444
+ souschef-ui:
445
+ build: .
446
+ ports:
447
+ - "9999:9999"
448
+ env_file:
449
+ - .env
450
+ environment:
451
+ - PYTHONPATH=/app
452
+ - STREAMLIT_SERVER_ADDRESS=0.0.0.0
453
+ - STREAMLIT_SERVER_PORT=9999
454
+ - STREAMLIT_SERVER_HEADLESS=true
455
+ restart: unless-stopped
456
+ ```
457
+
349
458
  **Features:**
350
459
  - Clean, professional design matching documentation standards
351
460
  - Real-time cookbook analysis with progress indicators
@@ -569,7 +678,7 @@ Each MCP tool includes comprehensive documentation:
569
678
  - **[Testing Strategy Guide](docs/testing-strategy.md)** - Validation and testing approaches
570
679
  - **[Best Practices](docs/best-practices.md)** - Recommended patterns and approaches
571
680
 
572
- ## 🤝 Contributing
681
+ ## Contributing
573
682
 
574
683
  We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for:
575
684
  - Development setup and workflow
@@ -577,13 +686,13 @@ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for:
577
686
  - Pull request process
578
687
  - Issue reporting guidelines
579
688
 
580
- ## 📄 License
689
+ ## License
581
690
 
582
691
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
583
692
 
584
693
  ## Roadmap
585
694
 
586
- ### Completed
695
+ ### Completed
587
696
  - Complete Chef cookbook parsing (recipes, attributes, metadata, templates)
588
697
  - InSpec profile parsing and conversion to Testinfra/Ansible tests
589
698
  - Chef resource to Ansible task conversion with module mapping
@@ -613,8 +722,13 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
613
722
  - **Interactive dependency mapping and visualization** with Plotly graphs and NetworkX analysis
614
723
  - **Real-time progress tracking** for all analysis operations with Streamlit progress bars
615
724
  - **Static graph visualization** with matplotlib for reports and documentation
725
+ - **Automated ERB to Jinja2 template conversion** - Converts Chef ERB templates to Ansible Jinja2 templates during cookbook conversion
726
+ - Converts ERB syntax to Jinja2: `<%= var %>` → `{{ var }}`, `<% if %>` → `{% if %}`
727
+ - Extracts template variables for validation and documentation
728
+ - Includes converted templates in downloadable playbook archives
729
+ - UI displays converted templates with variable lists and preview
616
730
 
617
- ### Planned 📅
731
+ ### Planned
618
732
  - 📅 Enhanced graph layout algorithms for large dependency networks (force-directed, hierarchical)
619
733
  - 📅 Export functionality for graphs (PNG, SVG, PDF formats)
620
734
  - 📅 UI configuration options and themes
@@ -626,7 +740,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
626
740
  - 📅 Migration templates and presets
627
741
  - 📅 Terraform provider for infrastructure state management
628
742
 
629
- ## 🙋‍♀️ Support & Community
743
+ ## Support & Community
630
744
 
631
745
  - **Issues**: [GitHub Issues](https://github.com/kpeacocke/souschef/issues)
632
746
  - **Discussions**: [GitHub Discussions](https://github.com/kpeacocke/souschef/discussions)
@@ -634,7 +748,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
634
748
 
635
749
  ---
636
750
 
637
- **SousChef** - *Transforming infrastructure automation, one recipe at a time.*
751
+ **SousChef** - *Transforming infrastructure automation, one recipe at a time.*
638
752
  desc 'Ensure package nginx is properly configured'
639
753
  impact 1.0
640
754
 
@@ -1338,12 +1452,28 @@ The project includes several VS Code tasks:
1338
1452
 
1339
1453
  ## Contributing
1340
1454
 
1341
- Contributions are welcome! Please ensure:
1342
- 1. All tests pass
1343
- 2. Code coverage maintained at 90%+
1344
- 3. Code passes ruff linting
1345
- 4. All functions have type hints and docstrings
1346
- 5. Follow the development standards in `.github/copilot-instructions.md`
1455
+ Thank you for your interest in contributing to SousChef!
1456
+
1457
+ **Before you start**, please read the [**Architecture Guide**](docs/ARCHITECTURE.md) to understand where different code belongs and why. This is essential for understanding how to structure your contributions.
1458
+
1459
+ For complete contributing guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md), which includes:
1460
+ - Development setup instructions
1461
+ - Code standards and quality tools
1462
+ - Testing requirements and patterns
1463
+ - Commit conventions and PR process
1464
+ - Release procedures
1465
+
1466
+ **Quick Checklist for Contributions:**
1467
+ 1. Read [**docs/ARCHITECTURE.md**](docs/ARCHITECTURE.md) to understand module structure
1468
+ 2. Ensure all tests pass: `poetry run pytest`
1469
+ 3. Code passes linting: `poetry run ruff check .`
1470
+ 4. Code is formatted: `poetry run ruff format .`
1471
+ 5. Type hints are complete: `poetry run mypy souschef`
1472
+ 6. Coverage maintained at 90%+
1473
+ 7. All functions have docstrings
1474
+ 8. Follow [conventional commits](CONTRIBUTING.md#commit-message-format)
1475
+
1476
+ Questions? Check [ARCHITECTURE.md](docs/ARCHITECTURE.md) for module responsibilities or [CONTRIBUTING.md](CONTRIBUTING.md) for the full developer guide.
1347
1477
 
1348
1478
  ## License
1349
1479
 
@@ -1351,4 +1481,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
1351
1481
 
1352
1482
  ---
1353
1483
 
1354
- **SousChef** - *Ansible automation, one recipe at a time.*
1484
+ **SousChef** - *Ansible automation, one recipe at a time.*
1485
+
@@ -1,31 +1,8 @@
1
- Metadata-Version: 2.4
2
- Name: mcp-souschef
3
- Version: 2.5.3
4
- Summary: AI-powered MCP server for Chef to Ansible conversion
5
- License: MIT
6
- License-File: LICENSE
7
- Author: SousChef Contributors
8
- Requires-Python: >=3.14,<4.0
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.14
12
- Provides-Extra: ui
13
- Requires-Dist: anthropic (>=0.75.0)
14
- Requires-Dist: click (>=8.1.0)
15
- Requires-Dist: mcp (>=1.25.0)
16
- Requires-Dist: pandas (>=2.0.0) ; extra == "ui"
17
- Requires-Dist: plotly (>=5.0.0)
18
- Requires-Dist: python-dotenv (>=1.2.1)
19
- Requires-Dist: pyyaml (>=6.0.0)
20
- Requires-Dist: streamlit (>=1.28.0)
21
- Requires-Dist: zod (>=0.8.0)
22
- Description-Content-Type: text/markdown
23
-
24
1
  # Chef to Ansible migration - SousChef MCP
25
2
 
26
3
  An AI-powered MCP (Model Context Protocol) server that provides comprehensive Chef-to-Ansible migration capabilities for enterprise infrastructure transformation.
27
4
 
28
- [![PyPI version](https://img.shields.io/pypi/v/mcp-souschef.svg)](https://pypi.org/project/mcp-souschef/)
5
+ [![GitHub release](https://img.shields.io/github/v/release/kpeacocke/souschef)](https://github.com/kpeacocke/souschef/releases)
29
6
  [![Python Version](https://img.shields.io/badge/python-3.14%2B-blue.svg)](https://www.python.org/downloads/)
30
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
31
8
  [![Test Coverage](https://img.shields.io/badge/coverage-91%25-brightgreen.svg)](htmlcov/index.html)
@@ -37,17 +14,17 @@ An AI-powered MCP (Model Context Protocol) server that provides comprehensive Ch
37
14
 
38
15
  ## Overview - Chef to Ansible features
39
16
 
40
- SousChef is a complete enterprise-grade migration platform with **27 primary MCP tools** organised across **9 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
17
+ SousChef is a complete enterprise-grade migration platform with **32 primary MCP tools** organised across **10 major capability areas** to facilitate Chef-to-Ansible AWX/AAP migrations. From cookbook analysis to deployment pattern conversion, including Chef Habitat to containerised deployments and CI/CD pipeline generation, SousChef provides everything needed for a successful infrastructure automation migration.
41
18
 
42
19
  ### About Tool Counts
43
20
 
44
- **Why 27 tools in the documentation but more in the server?**
21
+ **Why 32 tools in the documentation but more in the server?**
45
22
 
46
- The MCP server provides **37 total tools** (35 public + 2 internal). This documentation focuses on the **27 primary user-facing tools** that cover the main migration capabilities. The remaining 10 tools are low-level filesystem operations and helper utilities used internally by the main tools.
23
+ The MCP server provides **37 total tools** (35 public + 2 internal). This documentation focuses on the **32 primary user-facing tools** that cover the main migration capabilities. The remaining 3 tools are low-level filesystem operations and helper utilities used internally by the main tools.
47
24
 
48
25
  As a user, you'll primarily interact with the 27 documented tools. Your AI assistant may use the additional tools automatically when needed, but you don't need to know about them for successful migrations.
49
26
 
50
- > 💡 **For developers:** See `souschef/server.py` for the complete list of all 37 registered tools.
27
+ > **For developers:** See `souschef/server.py` for the complete list of all 37 registered tools.
51
28
 
52
29
  ## Model Agnostic - Works with Any AI Model
53
30
 
@@ -95,7 +72,7 @@ Complete cookbook introspection and analysis tools:
95
72
  - **list_directory** - Navigate and explore cookbook directory structures
96
73
  - **read_file** - Read cookbook files with error handling
97
74
  - **read_cookbook_metadata** - Parse metadata.rb files for dependencies and cookbook information
98
- - **parse_recipe** - Analyze Chef recipes and extract resources, actions, and properties
75
+ - **parse_recipe** - Analyse Chef recipes and extract resources, actions, and properties
99
76
  - **parse_attributes** - Parse attribute files with **advanced precedence resolution** (6 levels: default, force_default, normal, override, force_override, automatic)
100
77
  - **list_cookbook_structure** - Display complete cookbook directory hierarchy
101
78
 
@@ -116,7 +93,7 @@ Convert Chef search patterns to dynamic Ansible inventory:
116
93
 
117
94
  - **convert_chef_search_to_inventory** - Transform Chef search queries to Ansible inventory groups
118
95
  - **generate_dynamic_inventory_script** - Create dynamic inventory scripts from Chef server queries
119
- - **analyze_chef_search_patterns** - Discover and analyze search usage in cookbooks
96
+ - **analyse_chef_search_patterns** - Discover and analyse search usage in cookbooks
120
97
 
121
98
  ### 4. InSpec Integration & Validation
122
99
  Complete InSpec-to-Ansible testing pipeline:
@@ -130,14 +107,14 @@ Chef data bags to Ansible vars/vault conversion:
130
107
 
131
108
  - **convert_chef_databag_to_vars** - Transform data bags to Ansible variable files
132
109
  - **generate_ansible_vault_from_databags** - Convert encrypted data bags to Ansible Vault
133
- - **analyze_chef_databag_usage** - Analyze data bag usage patterns in cookbooks
110
+ - **analyse_chef_databag_usage** - Analyse data bag usage patterns in cookbooks
134
111
 
135
112
  ### 6. Environment & Configuration Management
136
113
  Chef environments to Ansible inventory groups:
137
114
 
138
115
  - **convert_chef_environment_to_inventory_group** - Transform Chef environments to inventory
139
116
  - **generate_inventory_from_chef_environments** - Generate complete inventory from environments
140
- - **analyze_chef_environment_usage** - Analyze environment usage in cookbooks
117
+ - **analyse_chef_environment_usage** - Analyse environment usage in cookbooks
141
118
 
142
119
  ### 7. AWX/Ansible Automation Platform Integration
143
120
  Enterprise AWX/AAP configuration generation:
@@ -263,10 +240,10 @@ Output formats:
263
240
  - **json**: Structured JSON for programmatic processing
264
241
  - **summary**: Quick overview with counts only
265
242
 
266
- - **analyze_chef_application_patterns** - Identify application deployment patterns
243
+ - **analyse_chef_application_patterns** - Identify application deployment patterns
267
244
  - **assess_chef_migration_complexity** - Comprehensive migration complexity assessment
268
245
  - **generate_migration_plan** - Create detailed migration execution plans
269
- - **analyze_cookbook_dependencies** - Analyze dependencies and migration order
246
+ - **analyse_cookbook_dependencies** - Analyse dependencies and migration order
270
247
  - **generate_migration_report** - Generate executive and technical migration reports
271
248
 
272
249
  ## Migration Workflow
@@ -276,8 +253,8 @@ Output formats:
276
253
  # Assess migration complexity
277
254
  assess_chef_migration_complexity /path/to/cookbooks
278
255
 
279
- # Analyze cookbook dependencies
280
- analyze_cookbook_dependencies /path/to/cookbook
256
+ # Analyse cookbook dependencies
257
+ analyse_cookbook_dependencies /path/to/cookbook
281
258
 
282
259
  # Generate migration plan
283
260
  generate_migration_plan '{\"cookbooks\": [\"/path/to/cookbook1\", \"/path/to/cookbook2\"]}'
@@ -369,6 +346,79 @@ souschef ui
369
346
  souschef ui --port 8080
370
347
  ```
371
348
 
349
+ **Run in Docker:**
350
+ ```bash
351
+ # Build the image
352
+ docker build -t souschef-ui .
353
+
354
+ # Run the container
355
+ docker run -p 9999:9999 souschef-ui
356
+
357
+ # Or use docker-compose
358
+ docker-compose up
359
+ ```
360
+
361
+ **Docker Environment Configuration:**
362
+
363
+ SousChef supports AI configuration via environment variables in Docker containers. Create a `.env` file in your project root:
364
+
365
+ ```bash
366
+ # Copy the example environment file
367
+ cp .env.example .env
368
+
369
+ # Edit with your AI provider settings
370
+ nano .env
371
+ ```
372
+
373
+ **Example .env file:**
374
+ ```dotenv
375
+ # AI Configuration
376
+ SOUSCHEF_AI_PROVIDER=Anthropic (Claude)
377
+ SOUSCHEF_AI_MODEL=claude-3-5-sonnet-20241022
378
+ SOUSCHEF_AI_API_KEY=your-api-key-here
379
+ SOUSCHEF_AI_BASE_URL=
380
+ SOUSCHEF_AI_PROJECT_ID=
381
+ SOUSCHEF_AI_TEMPERATURE=0.7
382
+ SOUSCHEF_AI_MAX_TOKENS=4000
383
+
384
+ # Streamlit Configuration (optional)
385
+ STREAMLIT_SERVER_PORT=9999
386
+ STREAMLIT_SERVER_HEADLESS=true
387
+ ```
388
+
389
+ **Supported AI Providers:**
390
+ - `Anthropic (Claude)` - Anthropic Claude models
391
+ - `OpenAI (GPT)` - OpenAI GPT models
392
+ - `IBM Watsonx` - IBM Watsonx AI models
393
+ - `Red Hat Lightspeed` - Red Hat Lightspeed models
394
+
395
+ **Environment Variables:**
396
+ - `SOUSCHEF_AI_PROVIDER` - AI provider name (required)
397
+ - `SOUSCHEF_AI_MODEL` - Model name (required)
398
+ - `SOUSCHEF_AI_API_KEY` - API key for authentication (required)
399
+ - `SOUSCHEF_AI_BASE_URL` - Custom API base URL (optional)
400
+ - `SOUSCHEF_AI_PROJECT_ID` - Project ID for Watsonx (optional)
401
+ - `SOUSCHEF_AI_TEMPERATURE` - Model temperature 0.0-2.0 (optional, default: 0.7)
402
+ - `SOUSCHEF_AI_MAX_TOKENS` - Maximum tokens to generate (optional, default: 4000)
403
+
404
+ **Docker Compose (recommended for development):**
405
+ ```yaml
406
+ version: '3.8'
407
+ services:
408
+ souschef-ui:
409
+ build: .
410
+ ports:
411
+ - "9999:9999"
412
+ env_file:
413
+ - .env
414
+ environment:
415
+ - PYTHONPATH=/app
416
+ - STREAMLIT_SERVER_ADDRESS=0.0.0.0
417
+ - STREAMLIT_SERVER_PORT=9999
418
+ - STREAMLIT_SERVER_HEADLESS=true
419
+ restart: unless-stopped
420
+ ```
421
+
372
422
  **Features:**
373
423
  - Clean, professional design matching documentation standards
374
424
  - Real-time cookbook analysis with progress indicators
@@ -592,7 +642,7 @@ Each MCP tool includes comprehensive documentation:
592
642
  - **[Testing Strategy Guide](docs/testing-strategy.md)** - Validation and testing approaches
593
643
  - **[Best Practices](docs/best-practices.md)** - Recommended patterns and approaches
594
644
 
595
- ## 🤝 Contributing
645
+ ## Contributing
596
646
 
597
647
  We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for:
598
648
  - Development setup and workflow
@@ -600,13 +650,13 @@ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for:
600
650
  - Pull request process
601
651
  - Issue reporting guidelines
602
652
 
603
- ## 📄 License
653
+ ## License
604
654
 
605
655
  This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
606
656
 
607
657
  ## Roadmap
608
658
 
609
- ### Completed
659
+ ### Completed
610
660
  - Complete Chef cookbook parsing (recipes, attributes, metadata, templates)
611
661
  - InSpec profile parsing and conversion to Testinfra/Ansible tests
612
662
  - Chef resource to Ansible task conversion with module mapping
@@ -636,8 +686,13 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
636
686
  - **Interactive dependency mapping and visualization** with Plotly graphs and NetworkX analysis
637
687
  - **Real-time progress tracking** for all analysis operations with Streamlit progress bars
638
688
  - **Static graph visualization** with matplotlib for reports and documentation
689
+ - **Automated ERB to Jinja2 template conversion** - Converts Chef ERB templates to Ansible Jinja2 templates during cookbook conversion
690
+ - Converts ERB syntax to Jinja2: `<%= var %>` → `{{ var }}`, `<% if %>` → `{% if %}`
691
+ - Extracts template variables for validation and documentation
692
+ - Includes converted templates in downloadable playbook archives
693
+ - UI displays converted templates with variable lists and preview
639
694
 
640
- ### Planned 📅
695
+ ### Planned
641
696
  - 📅 Enhanced graph layout algorithms for large dependency networks (force-directed, hierarchical)
642
697
  - 📅 Export functionality for graphs (PNG, SVG, PDF formats)
643
698
  - 📅 UI configuration options and themes
@@ -649,7 +704,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
649
704
  - 📅 Migration templates and presets
650
705
  - 📅 Terraform provider for infrastructure state management
651
706
 
652
- ## 🙋‍♀️ Support & Community
707
+ ## Support & Community
653
708
 
654
709
  - **Issues**: [GitHub Issues](https://github.com/kpeacocke/souschef/issues)
655
710
  - **Discussions**: [GitHub Discussions](https://github.com/kpeacocke/souschef/discussions)
@@ -657,7 +712,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
657
712
 
658
713
  ---
659
714
 
660
- **SousChef** - *Transforming infrastructure automation, one recipe at a time.*
715
+ **SousChef** - *Transforming infrastructure automation, one recipe at a time.*
661
716
  desc 'Ensure package nginx is properly configured'
662
717
  impact 1.0
663
718
 
@@ -1361,12 +1416,28 @@ The project includes several VS Code tasks:
1361
1416
 
1362
1417
  ## Contributing
1363
1418
 
1364
- Contributions are welcome! Please ensure:
1365
- 1. All tests pass
1366
- 2. Code coverage maintained at 90%+
1367
- 3. Code passes ruff linting
1368
- 4. All functions have type hints and docstrings
1369
- 5. Follow the development standards in `.github/copilot-instructions.md`
1419
+ Thank you for your interest in contributing to SousChef!
1420
+
1421
+ **Before you start**, please read the [**Architecture Guide**](docs/ARCHITECTURE.md) to understand where different code belongs and why. This is essential for understanding how to structure your contributions.
1422
+
1423
+ For complete contributing guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md), which includes:
1424
+ - Development setup instructions
1425
+ - Code standards and quality tools
1426
+ - Testing requirements and patterns
1427
+ - Commit conventions and PR process
1428
+ - Release procedures
1429
+
1430
+ **Quick Checklist for Contributions:**
1431
+ 1. Read [**docs/ARCHITECTURE.md**](docs/ARCHITECTURE.md) to understand module structure
1432
+ 2. Ensure all tests pass: `poetry run pytest`
1433
+ 3. Code passes linting: `poetry run ruff check .`
1434
+ 4. Code is formatted: `poetry run ruff format .`
1435
+ 5. Type hints are complete: `poetry run mypy souschef`
1436
+ 6. Coverage maintained at 90%+
1437
+ 7. All functions have docstrings
1438
+ 8. Follow [conventional commits](CONTRIBUTING.md#commit-message-format)
1439
+
1440
+ Questions? Check [ARCHITECTURE.md](docs/ARCHITECTURE.md) for module responsibilities or [CONTRIBUTING.md](CONTRIBUTING.md) for the full developer guide.
1370
1441
 
1371
1442
  ## License
1372
1443
 
@@ -1374,5 +1445,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
1374
1445
 
1375
1446
  ---
1376
1447
 
1377
- **SousChef** - *Ansible automation, one recipe at a time.*
1378
-
1448
+ **SousChef** - *Ansible automation, one recipe at a time.*
@@ -1,15 +1,23 @@
1
1
  [tool.poetry]
2
2
  name = "mcp-souschef"
3
- version = "2.5.3"
3
+ version = "3.0.0"
4
4
  description = "AI-powered MCP server for Chef to Ansible conversion"
5
5
  readme = "README.md"
6
+ homepage = "https://github.com/kpeacocke/souschef"
7
+ repository = "https://github.com/kpeacocke/souschef"
8
+ documentation = "https://kpeacocke.github.io/souschef/"
9
+ keywords = ["chef", "ansible", "migration", "infrastructure", "automation", "mcp", "ai", "conversion"]
6
10
  authors = ["SousChef Contributors"]
7
11
  license = "MIT"
8
12
  packages = [{include = "souschef"}]
13
+ classifiers = ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Systems Administration", "Topic :: Utilities"]
14
+
15
+ [tool.poetry.urls]
9
16
 
10
17
  [tool.poetry.dependencies]
11
- python = ">=3.14,<4.0"
18
+ python = ">=3.13,<4.0"
12
19
  anthropic = ">=0.75.0"
20
+ openai = ">=1.0.0"
13
21
  click = ">=8.1.0"
14
22
  mcp = ">=1.25.0"
15
23
  python-dotenv = ">=1.2.1"
@@ -42,7 +50,7 @@ mkdocstrings = {extras = ["python"], version = ">=0.26,<1.1"}
42
50
  mkdocs-git-revision-date-localized-plugin = "^1.2.0"
43
51
  streamlit = "^1.28.0"
44
52
  networkx = "^3.2.0"
45
- plotly = "^5.17.0"
53
+ plotly = ">=5.17,<7.0"
46
54
  matplotlib = "^3.8.0"
47
55
  types-networkx = "^3.6.1.20251220"
48
56
 
@@ -71,6 +79,8 @@ ignore = ["D100", "D104", "D105", "D107", "D203", "D212"]
71
79
  "souschef/parsers/validation.py" = ["E501"] # Long lines in validation messages
72
80
  "souschef/converters/resource.py" = ["C901"] # Allow complex function for resource conversion logic
73
81
  "souschef/deployment.py" = ["ISC003"] # Allow explicit string concatenation
82
+ "souschef/ui/app.py" = ["E402"] # Allow imports after path manipulation
83
+ "souschef/ui/pages/cookbook_analysis.py" = ["C901"] # Allow complex functions in UI code
74
84
 
75
85
  [tool.pytest.ini_options]
76
86
  minversion = "6.0"
@@ -82,7 +92,7 @@ testpaths = [
82
92
  [tool.coverage.run]
83
93
  source = ["souschef"]
84
94
  relative_files = true
85
- omit = ["tests/*", "examples/*"]
95
+ omit = ["tests/*", "examples/*", "souschef/ui/*"]
86
96
 
87
97
  [tool.coverage.report]
88
98
  exclude_lines = [
@@ -108,7 +118,7 @@ source = [
108
118
  backup = false
109
119
 
110
120
  [tool.mypy]
111
- python_version = "3.14"
121
+ python_version = "3.13"
112
122
  warn_return_any = true
113
123
  warn_unused_configs = true
114
124
  disallow_untyped_defs = false
@@ -122,3 +132,10 @@ no_implicit_optional = true
122
132
  module = "tests.*"
123
133
  disallow_untyped_defs = false
124
134
  check_untyped_defs = false
135
+
136
+ [[tool.mypy.overrides]]
137
+ module = [
138
+ "plotly.*",
139
+ "streamlit.*",
140
+ ]
141
+ ignore_missing_imports = true