Skip to content

Commit 5e152c9

Browse files
Readme.md ; Workflows setup
1 parent c01c382 commit 5e152c9

3 files changed

Lines changed: 270 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: ["3.10", "3.11", "3.12"]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install .
32+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33+
34+
- name: Run tests
35+
run: |
36+
# pytest
37+
echo "No tests found. Skipping testing step."
38+
39+
- name: Build package
40+
run: |
41+
pip install build
42+
python -m build

.github/workflows/release.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build-binaries:
14+
name: Build Binary for ${{ matrix.os }}
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.10"
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install . pyinstaller
33+
34+
- name: Build Standalone Binary
35+
run: |
36+
pyinstaller --onefile --name mate app/main.py
37+
38+
- name: Test Binary
39+
shell: bash
40+
run: |
41+
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
42+
./dist/mate.exe --help
43+
else
44+
./dist/mate --help
45+
fi
46+
47+
- name: Upload Binary Artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: mate-${{ matrix.os }}
51+
path: dist/mate*
52+
53+
release:
54+
needs: build-binaries
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- name: Set up Python
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: "3.10"
63+
64+
- name: Install dependencies
65+
run: |
66+
python -m pip install --upgrade pip
67+
pip install . build
68+
69+
- name: Build Package
70+
run: |
71+
python -m build
72+
73+
- name: Download Binary Artifacts
74+
uses: actions/download-artifact@v4
75+
with:
76+
path: binaries
77+
merge-multiple: true
78+
79+
- name: Prepare Release Assets
80+
shell: bash
81+
run: |
82+
mkdir -p release_assets
83+
cp dist/*.whl release_assets/
84+
cp dist/*.tar.gz release_assets/
85+
# Move binaries into release_assets with clean names
86+
mv binaries/mate-ubuntu-latest/mate release_assets/mate-linux
87+
mv binaries/mate-windows-latest/mate.exe release_assets/mate-windows.exe
88+
mv binaries/mate-macos-latest/mate release_assets/mate-macos
89+
ls -R release_assets/
90+
91+
- name: Create Release
92+
uses: softprops/action-gh-release@v2
93+
with:
94+
files: |
95+
release_assets/*
96+
generate_release_notes: true
97+
env:
98+
GITHUB_TOKEN: ${{ github.token }}
99+

README.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# 🚀 DevMate (mate)
2+
3+
[![Latest Release](https://img.shields.io/github/v/release/YashashavGoyal/devmate?color=blue&label=Download&logo=github&style=for-the-badge)](https://github.com/YashashavGoyal/devmate/releases)
4+
5+
> **Tired of wrestling with cryptic Docker commands and messy container logs?**
6+
> Stop digging through `docker ps` and meet **DevMate**—the CLI superpower that turns your local development into a clean, automated, and high-speed experience.
7+
8+
**Your friendly local development companion.**
9+
10+
`DevMate` (invoked as `mate`) is a powerful, developer-first CLI tool designed to simplify and orchestrate your local development environments. It provides a clean abstraction layer over Docker and Docker Compose, offering beautiful status reports, automated health checks, and streamlined container management.
11+
12+
---
13+
14+
## ⚡ Quick Download
15+
16+
Prefer a pre-built binary? Grab the latest version for your OS directly from our releases!
17+
18+
[**Download Latest Release**](https://github.com/YashashavGoyal/devmate/releases)
19+
20+
---
21+
22+
## ✨ Key Features
23+
24+
- **🛡️ Smart Health Checks**: Automatically performs TCP and HTTP health checks for your local services.
25+
- **📊 Beautiful Status Table**: Get a clean, Rich-powered overview of all your running containers.
26+
- **🐳 Multi-Config Support**: Works seamlessly with both `docker-compose.yaml` and standalone `Dockerfile` setups.
27+
- **🔄 Git Integration**: Effortlessly clone and deploy repositories to your local environment in one go.
28+
- **🛠️ Developer-Centric**: Built by developers, for developers, with a focus on speed and clarity.
29+
30+
> **IMPORTANT**
31+
>
32+
> **DevMate** is specifically designed as a **local development companion**. It is **not intended for production usage**.
33+
>
34+
> For production environments, please use industry-standard orchestrators like Kubernetes, Docker Swarm, or managed cloud services.
35+
36+
## 💻 Installation (From Source)
37+
38+
Since `DevMate` is not yet published to PyPI, you can install it locally for development:
39+
40+
1. **Clone the repository**:
41+
```bash
42+
git clone https://github.com/YashashavGoyal/devmate.git
43+
cd devmate
44+
```
45+
46+
2. **Set up a virtual environment (optional but recommended)**:
47+
```bash
48+
python -m venv venv
49+
source venv/bin/activate # On Windows: venv\Scripts\activate
50+
```
51+
52+
3. **Install dependencies and the package in editable mode**:
53+
```bash
54+
pip install -e .
55+
```
56+
57+
Now you can use the `mate` command globally in your terminal!
58+
59+
---
60+
61+
## 🚀 Quick Start
62+
63+
Initialize your environment and check if you have the essential tools:
64+
```bash
65+
mate init
66+
```
67+
68+
Start your services (from a directory with a `compose.yaml` or `Dockerfile`):
69+
```bash
70+
mate up
71+
```
72+
73+
Check the status of your containers:
74+
```bash
75+
mate status
76+
```
77+
78+
---
79+
80+
## 🛠️ Command Reference
81+
82+
| Command | Alias | Description |
83+
| :--- | :--- | :--- |
84+
| `init` | `doctor` | Checks if essential tools (Docker, Git) are installed. |
85+
| `up` | `run` | Starts services and performs health checks. |
86+
| `down` | `stop` | Stops and removes containers. |
87+
| `status` | `ps`, `info`| Displays a beautiful table of running containers. |
88+
| `health` | - | Verifies if the local application is responding. |
89+
| `clone` | - | Clones a git repository to your local system. |
90+
| `deploy` | `dep` | Clones a repository and starts it immediately. |
91+
| `logs` | `log` | Tails the logs of your application services. |
92+
| `shell` | `sh` | Opens an interactive shell inside a container. |
93+
| `version` | - | Shows the current version of `mate`. |
94+
| `about` | - | Displays information about the project. |
95+
96+
---
97+
98+
## 📂 Project Structure
99+
100+
```text
101+
devmate/
102+
├── app/ # Core application logic
103+
│ ├── commands/ # CLI command implementations
104+
│ ├── services/ # Business logic (Docker, Git, Health)
105+
│ └── utils/ # Formatting and display utilities
106+
├── pyproject.toml # Project metadata and dependencies
107+
└── requirements.txt # Dependency list
108+
```
109+
110+
---
111+
112+
## 🤝 Contributing
113+
114+
We welcome contributions! Please feel free to open issues or submit pull requests to improve `devmate`.
115+
116+
---
117+
118+
**Author**: Yashashav Goyal
119+
120+
<a href="https://github.com/YashashavGoyal">
121+
<img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" alt="GitHub" />
122+
</a>
123+
<a href="https://linkedin.com/in/yashashavgoyal">
124+
<img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" alt="LinkedIn" />
125+
</a>
126+
<a href="https://twitter.com/YashashavGoyal">
127+
<img src="https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white" alt="Twitter" />
128+
</a>
129+

0 commit comments

Comments
 (0)