Thank you for your interest in contributing to DopeShell! We welcome contributions from developers of all skill levels. This guide will help you get started.
- Getting Started
- Development Setup
- How to Contribute
- Adding New Commands
- Code Standards
- Pull Request Process
- Reporting Issues
Before you begin contributing, please:
- Read the main README.md to understand the project
- Check existing issues to see if your idea/bug is already being worked on
- Join discussions to understand ongoing development
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/muhammadhaseebiqbal-dev/dopeshell.git
cd dopeshellgit checkout -b feature/your-feature-name
# or
git checkout -b bugfix/issue-descriptionOn Linux:
pip3 install -r requirements.txtOn Windows:
pip install -r requirements.txtpython main.py- 🐛 Bug Fixes - Fix issues or bugs in existing functionality
- ✨ New Features - Add new commands or capabilities
- 📚 Documentation - Improve README, add examples, write tutorials
- 🎨 UI/UX - Enhance the shell interface and user experience
- ⚡ Performance - Optimize existing code
- 🧪 Testing - Add unit tests or integration tests
- 🔍 Code Review - Review pull requests from other contributors
DopeShell uses a modular architecture. Here's how to add a new command:
Edit dopeshell/keywords.py and add your command to the keys list:
{
"command": "yourcommand",
"description": "description of what your command does"
}Edit dopeshell/components/core.py and create your function:
def your_function_name(self, input):
"""
Brief description of what this function does
Args:
self: DopeShell instance
input: Full command string from user
"""
try:
# Parse the input
args = input.split(' ')[1:] # Get arguments after command
# Your implementation here
# ...
print("✅ Operation successful!")
except Exception as err:
print(f"⚠️ Error: {err}")Add your function to the core_function_mapping dictionary in dopeshell/components/core.py:
core_function_mapping = {
# ... existing mappings ...
"your_function_name": your_function_name,
}python main.py
# Try your new command
yourcommand arg1 arg2- Follow PEP 8 style guidelines
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused on a single responsibility
# Good ✅
def calculate_file_size(file_path):
"""Calculate size of a file in bytes"""
try:
return os.path.getsize(file_path)
except OSError as e:
print(f"Error accessing file: {e}")
return 0
# Avoid ❌
def calc(f):
return os.path.getsize(f)- Always use try-except blocks for operations that might fail
- Provide clear, user-friendly error messages
- Use emoji indicators: ✅ for success,
⚠️ for warnings/errors
- Test your code on both Windows and Linux if possible
- Use
os.pathfunctions for path operations (they're cross-platform) - Check
self.platformwhen platform-specific code is needed
if self.platform == "Windows":
# Windows-specific code
else:
# Linux-specific code- Test thoroughly - Test your changes on your local machine
- Check existing code - Ensure your code follows the existing style
- Update documentation - If you add features, update README.md
- No breaking changes - Ensure backward compatibility
-
Commit your changes
git add . git commit -m "Add: brief description of your changes"
-
Push to your fork
git push origin feature/your-feature-name
-
Create Pull Request
- Go to the original repository on GitHub
- Click "New Pull Request"
- Select your branch
- Fill in the PR template with:
- Description of changes
- Why the change is needed
- How you tested it
- Screenshots (if applicable)
Use clear, descriptive commit messages:
Add: new command for file compression
Fix: path resolution bug on Windows
Update: documentation for network commands
Refactor: simplify directory navigation logic
- Search existing issues to avoid duplicates
- Verify the issue exists on the latest version
- Collect relevant information (OS, Python version, error messages)
Include:
- Clear Title - Brief description of the problem
- Description - Detailed explanation of the issue
- Steps to Reproduce - How to trigger the bug
- Expected Behavior - What should happen
- Actual Behavior - What actually happens
- Environment:
- Operating System: Windows 10 / Ubuntu 22.04 / etc.
- Python Version: 3.9.5
- DopeShell Version: (commit hash or release)
- Screenshots/Logs - If applicable
**Title:** `snap` command fails with directories containing spaces
**Description:**
When using the snap command to delete a directory with spaces in its name,
the command fails with a path error.
**Steps to Reproduce:**
1. Create a folder named "My Documents"
2. Run: snap "My Documents"
3. Error occurs
**Expected:** Directory should be deleted
**Actual:** Error: Could not find path
**Environment:**
- OS: Windows 11
- Python: 3.10.2- All submissions require review before merging
- Reviewers may suggest changes or improvements
- Be patient and responsive to feedback
- Maintainers will merge once approved
- Issues - For bugs and feature requests
- Pull Requests - For code contributions
- Discussions - For questions and ideas
Current areas where we especially welcome contributions:
- Testing Framework - Add unit tests and integration tests
- Error Handling - Improve error messages and edge case handling
- Documentation - More examples and tutorials
- New Commands - Useful file/system operations
- Performance - Optimize existing commands
By contributing to DopeShell, you agree that your contributions will be licensed under the MIT License.
Every contribution, no matter how small, makes DopeShell better. We appreciate your time and effort!
Happy Coding! 🚀