https://github.com/wexample/wex
Streamline your bash scripts with wex
https://github.com/wexample/wex
bash devops devops-tools framework scripts shell
Last synced: about 1 month ago
JSON representation
Streamline your bash scripts with wex
- Host: GitHub
- URL: https://github.com/wexample/wex
- Owner: wexample
- License: mit
- Created: 2017-07-12T03:56:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-10-24T16:58:28.000Z (5 months ago)
- Last Synced: 2025-10-24T18:39:11.189Z (5 months ago)
- Topics: bash, devops, devops-tools, framework, scripts, shell
- Language: Python
- Homepage: https://wexample.com
- Size: 9.79 MB
- Stars: 4
- Watchers: 1
- Forks: 4
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wex v5.0.165
A CLI tool written in Python.
Join our community, support us, and find work at https://wexample.com 🤝❤️👨💻

## Features
- A strict framework for development and applications management.
- Initialize and run Docker application.
- Talk about your app with the AI integration.
## Install
### Requirements
- Bash 5
- Python 3.10
- Docker 23
### Debian APT Package
# Install dependencies
sudo apt update
sudo apt install gnupg2 wget -y
# Add GPG key
sudo wget -O - https://apt.wexample.com/gpg | sudo apt-key add -
# Add repo
echo "deb http://apt.wexample.com/ stable main" | sudo tee /etc/apt/sources.list.d/wexample.list
sudo apt-get update
# Install
sudo apt install wex
Upgrading
sudo apt update && sudo apt install --only-upgrade wex
# Or
wex update
### Debian from sources
# Inside repository
sudo cli/install
## Calling commands
# Basic call in core addons folders
wex core::logo/show
# User defined command, stored in home directory
wex ~local_command_group/local_command_name
# Custom command inside an app
wex .custom_command_group/custom_command_name
# Service command
wex @service_name::custom_command_group/command_name
## Addons
Commands and services are organised in several "addons".
## Services
Each service has a unique name for all addons.
## Webhook listener
A webhook listener allow you to control your server and applications remotely.
# Start listener on port 46017
wex app::webhook/listen
This is existing entrypoints :
- `/status` : Return the current status of listener, useful to check availability
- `/webhook/app_name/script_name` : Execute the given script of given application
## Execution Flow
1. **Initialization**:
- The entry point is a Bash script.
- On invocation, the script captures the initial command and generates a unique process ID.
2. **Python Execution**:
- The Bash script then invokes the main Python script (`__main__.py`), passing along the generated process ID and
any additional arguments.
- During its execution, the Python script might determine that there are subsequent Bash commands that need to be
run. If so, it writes these commands to a temporary file.
3. **Post-Python Bash Execution**:
- Once the Python script completes its execution, control returns to the Bash script.
- The Bash script checks for the existence of the aforementioned temporary file.
- If this file exists, the Bash script executes the commands contained within and then deletes the file.
## License
This project is licensed under the MIT License. For more information, please see
the [MIT License on the official Open Source Initiative (OSI) website](https://opensource.org/licenses/MIT).