TermuXpert Developer Guide
Comprehensive instructions for developers to set up, update, and customize TermuXpert for optimal performance.
This guide is intended for developers who want to contribute to or extend the TermuXpert project. It provides an overview of the project structure, development practices, and guidelines for adding or modifying features.
Project Structure
The TermuXpert project is organized as follows:
termuxpert/
├── bin/ # Core scripts
├── config/ # Configuration files
├── scripts/ # Utility scripts
├── tools/ # Additional tools
│ ├── termux-api/
│ ├── custom_commands/
│ └── automation/
├── docs/ # Documentation
├── templates/ # Project templates
├── install.sh # Installation script
├── update.sh # Update script
├── uninstall.sh # Uninstallation script
└── README.md # Project readme
Development Setup
- Fork the TermuXpert repository on GitHub.
- Clone your fork:
git clone https://github.com/nexoscreation/TermuXpert.git
- Create a new branch for your feature:
git checkout -b feature-name
- Install development dependencies:
pkg install shellcheck
Core Components
bin/termuxpert.sh
: Main entry pointbin/*.sh
: Individual feature scriptsscripts/*.sh
: Utility scriptsconfig/*
: Configuration files
Adding New Features
To add a new feature to TermuXpert:
- Create a new script in the
bin/
directory (e.g.,bin/new_feature.sh
). - Implement the feature using Bash scripting.
- Add an option for the new feature in
bin/termuxpert.sh
. - Update the user guide in
docs/user_guide.md
. - If necessary, add configuration files to the
config/
directory.
Example of adding a new option in bin/termuxpert.sh
:
case $choice in
# ... existing options ...
X) ./new_feature.sh ;;
# ... other options ...
esac
Modifying Existing Features
When modifying existing features:
- Locate the relevant script in the
bin/
directory. - Make your changes, ensuring backwards compatibility if possible.
- Update the user guide to reflect any changes in functionality or usage.
- Test thoroughly to ensure no regressions.
Testing
- Use
shellcheck
to lint your Bash scripts:shellcheck bin/*.sh scripts/*.sh
- Manually test all modified features on a Termux environment.
- Consider adding automated tests using a framework like
bats
(Bash Automated Testing System).
Documentation
- Update
docs/user_guide.md
for any user-facing changes. - Update this developer guide (
docs/developer_guide.md
) for any changes to the development process or project structure. - Keep the
README.md
up to date with an overview of the project and its features.
Contributing
- Ensure your code adheres to the existing style and passes
shellcheck
. - Write clear, concise commit messages.
- Push your changes to your fork.
- Submit a pull request with a detailed description of your changes.
Thank you for contributing to TermuXpert!