sonar_config_manager
Manage local Bob the Fixer configuration settings.
Description
View, validate, reset, or update the local configuration file (bobthefixer.env). Essential for troubleshooting connection issues and managing project settings.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | - | Action: view, validate, reset, update |
showToken | boolean | No | false | Show token value when viewing |
Actions
| Action | Description |
|---|---|
view | Display current configuration |
validate | Check configuration validity |
reset | Remove configuration file |
update | Refresh/update settings |
Usage
View Configuration
Show me the current SonarQube configuration
Tool call:
{
"action": "view"
}
View with Token
Show me the config including the token
Tool call:
{
"action": "view",
"showToken": true
}
Validate Settings
Is my SonarQube configuration correct?
Tool call:
{
"action": "validate"
}
Reset Configuration
Reset the SonarQube configuration
Tool call:
{
"action": "reset"
}
Response Format
View Action
CONFIGURATION DETAILS
━━━━━━━━━━━━━━━━━━━━━
📁 Config File: /Users/dev/myproject/bobthefixer.env
🔧 SETTINGS:
SONAR_HOST_URL: http://localhost:9000
SONAR_PROJECT_KEY: myproject-a1b2c3d4
SONAR_TOKEN: squ_****...**** (hidden)
📅 Created: 2024-01-10 09:15:00
📅 Modified: 2024-01-15 14:30:00
✅ Configuration file exists and is readable
View with Token
CONFIGURATION DETAILS
━━━━━━━━━━━━━━━━━━━━━
📁 Config File: /Users/dev/myproject/bobthefixer.env
🔧 SETTINGS:
SONAR_HOST_URL: http://localhost:9000
SONAR_PROJECT_KEY: myproject-a1b2c3d4
SONAR_TOKEN: squ_abc123def456789...
⚠️ Token displayed - keep this secure!
Validate Action
CONFIGURATION VALIDATION
━━━━━━━━━━━━━━━━━━━━━━━━
📁 Config File: /Users/dev/myproject/bobthefixer.env
✅ CHECKS PASSED:
✓ Config file exists
✓ SONAR_HOST_URL is set
✓ SONAR_PROJECT_KEY is set
✓ SONAR_TOKEN is set
✓ URL format is valid
✓ Connection to SonarQube successful
✓ Token has valid permissions
✓ Project exists on server
📊 VALIDATION RESULT: ALL PASSED
Your configuration is valid and ready to use.
Validation with Errors
CONFIGURATION VALIDATION
━━━━━━━━━━━━━━━━━━━━━━━━
📁 Config File: /Users/dev/myproject/bobthefixer.env
⚠️ ISSUES FOUND:
✓ Config file exists
✓ SONAR_HOST_URL is set
✓ SONAR_PROJECT_KEY is set
✗ SONAR_TOKEN is missing or empty
✓ URL format is valid
✗ Connection to SonarQube failed
❌ VALIDATION RESULT: 2 ERRORS
RECOMMENDATIONS:
1. Set SONAR_TOKEN in bobthefixer.env
Run: sonar_auto_setup to regenerate
2. Check SonarQube is running
Run: docker ps | grep sonarqube
Reset Action
CONFIGURATION RESET
━━━━━━━━━━━━━━━━━━━
📁 File Removed: /Users/dev/myproject/bobthefixer.env
✅ Configuration has been reset.
NEXT STEPS:
1. Run sonar_auto_setup to create new configuration
2. Or use sonar_link_existing_project to link manually
Note: Your SonarQube project still exists on the server.
To delete it completely, use sonar_delete_project.
Configuration File
The bobthefixer.env file contains:
# Bob the Fixer Configuration
SONAR_HOST_URL=http://localhost:9000
SONAR_PROJECT_KEY=myproject-a1b2c3d4
SONAR_TOKEN=squ_abcdef123456...
Location
- Created in project root directory
- One file per project
- Should be in
.gitignore
Examples
Example 1: Troubleshoot Connection
Prompt:
My scans are failing, check the configuration
Tool Call:
{
"action": "validate"
}
Example 2: Check Token
Prompt:
What token is configured? I need to verify it
Tool Call:
{
"action": "view",
"showToken": true
}
Example 3: Start Fresh
Prompt:
Reset everything and start over
Tool Call:
{
"action": "reset"
}
Troubleshooting
Missing Config File
❌ No configuration file found
Solution: Run sonar_auto_setup or sonar_link_existing_project
Invalid Token
❌ Token is invalid or expired
Solution:
- Check token in SonarQube UI
- Reset config and run
sonar_auto_setup
Connection Failed
❌ Cannot connect to SonarQube
Solution:
- Verify SonarQube is running:
docker ps - Check URL is correct
- Run
sonar_diagnose_permissions
Best Practices
- Keep tokens secure - Don't commit bobthefixer.env
- Validate before scanning - Catch issues early
- Reset when moving - New machine, new config
- One project, one config - Don't share between projects
Common Issues
"Permission denied"
Cause: File permissions issue.
Solution: Check file ownership and permissions.
"Token works but scans fail"
Cause: Token may lack specific permissions.
Solution: Run sonar_diagnose_permissions for details.
Related Tools
sonar_auto_setup- Create new configsonar_link_existing_project- Link existing projectsonar_diagnose_permissions- Check token permissions