-
Notifications
You must be signed in to change notification settings - Fork 0
Remove file-based config loading #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove file-based config loading #23
Conversation
- Remove from_file() and to_file() methods from MeshBotConfig - Configuration now uses only: defaults → env vars → CLI args - Fix CLI argument naming for consistency: - --meshcore-type → --meshcore-connection-type - --node-name → --meshcore-node-name - Update all documentation and examples to use new CLI args - Update Docker files with new argument names - All tests passing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modernizes the configuration system by removing file-based config loading in favor of a streamlined approach using environment variables and command-line arguments, aligning with 12-factor app principles. The changes also improve CLI option naming consistency by adding the meshcore- prefix to connection-related options.
Key Changes:
- Removed
from_file()andto_file()methods fromMeshBotConfigclass - Renamed CLI options:
--meshcore-type→--meshcore-connection-typeand--node-name→--meshcore-node-name - Updated all documentation, examples, and Docker configurations to reflect the new CLI option names
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/meshbot/config.py | Removed file-based configuration loading methods (from_file, to_file) to simplify config management |
| src/meshbot/main.py | Updated CLI option names and parameter names in run and test commands for consistency |
| README.md | Updated all command examples and removed deprecated configuration file section |
| AGENTS.md | Updated testing examples with new CLI option names |
| docker-compose.yml | Updated command examples in comments to use new option names |
| Dockerfile | Updated default CMD to use new --meshcore-connection-type option |
| .env.example | Enhanced documentation with naming convention guide and 12-factor app principles |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| # Interactive testing with mock MeshCore | ||
| meshbot test --meshcore-type mock | ||
| meshbot test --meshcore-connection-type mock |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test command requires two positional arguments (FROM_ID and MESSAGE), but this example only shows the optional flags. The correct syntax should be:
meshbot test user1 "Hello!" --meshcore-connection-type mockThis matches the pattern used in AGENTS.md lines 224-230.
| meshbot test --meshcore-connection-type mock | |
| meshbot test user1 "Hello!" --meshcore-connection-type mock |
|
|
||
| # Test with specific prompt | ||
| meshbot test --custom-prompt debug_prompt.txt -vv | ||
| meshbot test --custom-prompt debug_prompt.txt -vv --meshcore-connection-type mock |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test command requires two positional arguments (FROM_ID and MESSAGE), but this example only shows the optional flags. The correct syntax should be:
meshbot test user1 "Hello!" --custom-prompt debug_prompt.txt -vv --meshcore-connection-type mockThis matches the pattern used in AGENTS.md lines 224-230.
| meshbot test --custom-prompt debug_prompt.txt -vv --meshcore-connection-type mock | |
| meshbot test user1 "Hello!" --custom-prompt debug_prompt.txt -vv --meshcore-connection-type mock |
| ```bash | ||
| # Run with mock connection (for testing) | ||
| meshbot test --meshcore-type mock | ||
| meshbot test --meshcore-connection-type mock |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test command requires two positional arguments (FROM_ID and MESSAGE), but this example only shows the optional flags. The correct syntax should be:
meshbot test user1 "Hello!" --meshcore-connection-type mockThis matches the pattern used in AGENTS.md lines 224-230.
| meshbot test --meshcore-connection-type mock | |
| meshbot test user1 "Hello!" --meshcore-connection-type mock |
No description provided.