An open API service indexing awesome lists of open source software.

https://github.com/taqsblaze/amen-cli

AMEN: inspired by laravel installer Python Web Application Scaffolding tool
https://github.com/taqsblaze/amen-cli

cli-app package python python-3 scaffolding virtualenv

Last synced: 4 months ago
JSON representation

AMEN: inspired by laravel installer Python Web Application Scaffolding tool

Awesome Lists containing this project

README

          

# ๐Ÿš€ AMEN CLI ![icon](https://raw.githubusercontent.com/TaqsBlaze/amen-cli/refs/heads/main/image/icon.png)
[![PyPI Version](https://img.shields.io/pypi/v/amen-cli)](https://pypi.org/project/amen-cli/)
[![License](https://img.shields.io/github/license/TaqsBlaze/amen-cli)](https://github.com/TaqsBlaze/amen-cli/blob/main/LICENSE)
[![Python Versions](https://img.shields.io/pypi/pyversions/amen-cli)](https://pypi.org/project/amen-cli/)
[![GitHub Stars](https://img.shields.io/github/stars/TaqsBlaze/amen-cli?style=social)](https://github.com/TaqsBlaze/amen-cli)
[![GitHub Issues](https://img.shields.io/github/issues/TaqsBlaze/amen-cli)](https://github.com/TaqsBlaze/amen-cli/issues)
[![GitHub Forks](https://img.shields.io/github/forks/TaqsBlaze/amen-cli?style=social)](https://github.com/TaqsBlaze/amen-cli)
[![GitHub Last Commit](https://img.shields.io/github/last-commit/TaqsBlaze/amen-cli)](https://github.com/TaqsBlaze/amen-cli/commits/main)
[![GitHub Contributors](https://img.shields.io/github/contributors/TaqsBlaze/amen-cli)](https://github.com/TaqsBlaze/amen-cli/graphs/contributors)
[![GitHub Code Size](https://img.shields.io/github/languages/code-size/TaqsBlaze/amen-cli)](https://github.com/TaqsBlaze/amen-cli)
[![GitHub Repo Size](https://img.shields.io/github/repo-size/TaqsBlaze/amen-cli)](https://github.com/TaqsBlaze/amen-cli)
[![PyPI Downloads](https://img.shields.io/pypi/dm/amen-cli)](https://pypi.org/project/amen-cli/)

A laravel installer inspired Python Web Application Scaffolding Tool that helps you create web applications with ease!

## โœจ Features

- ๐ŸŽฏ Interactive project setup wizard
- ๐Ÿ”ง Multiple framework support:
- Flask - Lightweight WSGI framework
- FastAPI - Modern, fast API framework
- Bottle - Simple micro web framework ๐Ÿšง
- Pyramid - Flexible web framework ๐Ÿšง
- ๐ŸŽจ Project templates for both web apps and APIs
- ๐Ÿ—๏ธ **Modular project structure** (see below)
- ๐Ÿ”„ Automatic virtual environment setup
- ๐Ÿ“ฆ Dependency management
- ๐Ÿ—๏ธ Structured project scaffolding
- ๐Ÿงช Test scaffolding with pytest
- ๐Ÿ”„ Update checker for the CLI
- ๐Ÿš€ Command to run your application

## ๐Ÿ› ๏ธ Installation

### Using pip (All platforms)
```bash
pip install amen-cli
```

### Using uv

[uv](https://github.com/astral-sh/uv) is a very fast Python package installer and resolver, written in Rust.

To install `amen-cli` using uv:

1. Install uv:

```bash
pip install uv
```

2. Install `amen-cli` using uv:

```bash
uv pip install amen-cli
```

uv utilizes the `pyproject.toml` file for resolving dependencies, ensuring a consistent and reproducible installation.

### Debian/Ubuntu
```bash
# Install required dependencies
sudo apt-get update
sudo apt-get install python3-pip python3-venv

# Install AMEN CLI
pip3 install amen-cli

# Optional: Install system-wide (requires root)
sudo pip3 install amen-cli
```

### Linux Post-Installation
Make sure the amen command is in your PATH:
```bash
export PATH="$HOME/.local/bin:$PATH"
```
Add this line to your ~/.bashrc or ~/.zshrc for permanent effect.

## ๐Ÿ“– Usage

```bash
# Create a new project
amen create

# You can also use flags to specify the framework, type, and name:
amen create -f flask -t webapp -n myapp

# Available options:
# -f, --framework Framework to use (flask, fastapi, bottle, pyramid)
# -t, --type Type of application (webapp, api)
# -n, --name Name of the application

# If flags are not provided, the interactive prompts will be used.

# Follow the interactive prompts to:
# 1. Select a framework
# 2. Choose application type (webapp/api)
# 3. Name your project

# Launch the web interface for project management
amen web [options]

# Available web interface options:
# -p, --port Port to run the web interface on (default: 3000)
```

### Additional Commands

```bash
# Run your application
amen run

# Example:
amen run myapp

# Run tests for your application
amen test

# Example:
amen test myapp

# Check for updates to the CLI
amen check-update

# Manage project configuration
amen config

# Example:
amen config myapp

# Run a security audit on your application
amen audit [options]
# Options:
# -f, --format Output format (txt, json, csv, xml; default: txt)
# -s, --severity Filter issues by severity (low, medium, high)
# -o, --output Save audit report to a specified file
# Example:
amen audit myapp -s high

# Monitor application status and resource usage in real time
amen monitor [options]
# Options:
# -p, --port Port to monitor
# -r, --refresh Refresh rate in seconds (accepts decimal values; default: 0.1)
# --web Run a web based monitor
# Example:
amen monitor myapp --port 5000 --refresh 0.5
amen monitor myapp --port 5000 -refresh 0.5 --web #Web based monitor
```

## ๐ŸŒŸ Project Structure

When you create a project, AMEN now generates a **modular structure**:

```
your-app/
โ”œโ”€โ”€ venv/ # Virtual environment
โ”œโ”€โ”€ your-app/ # Main application package
โ”‚ โ”œโ”€โ”€ api/ # API endpoints (endpoints.py)
โ”‚ โ”œโ”€โ”€ auth/ # Authentication (token.py, etc.)
โ”‚ โ”œโ”€โ”€ models/ # Models module
โ”‚ โ”œโ”€โ”€ static/ # Static files (CSS, JS, images)
โ”‚ โ”‚ โ”œโ”€โ”€ uploads/
โ”‚ โ”‚ โ”œโ”€โ”€ css/
โ”‚ โ”‚ โ””โ”€โ”€ js/
โ”‚ โ”œโ”€โ”€ templates/ # HTML templates (if webapp)
โ”‚ โ””โ”€โ”€ app.py / main.py # Main application file (Flask: app.py, FastAPI: main.py)
โ”œโ”€โ”€ tests/ # Test files
โ”œโ”€โ”€ docs/ # Documentation
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ”œโ”€โ”€ .env # Environment variables (local)
โ”œโ”€โ”€ .env.example # Environment variables template
โ”œโ”€โ”€ .gitignore # Git ignore rules
โ”œโ”€โ”€ run.py # Application runner
โ””โ”€โ”€ README.md # This file
```

- **Flask**: Uses `app.py` and registers a blueprint from `api/endpoints.py`. Token authentication is in `auth/token.py`.
- **FastAPI**: Uses `main.py` and includes a router from `api/endpoints.py`. Token authentication is in `auth/token.py`.
- **Webapp**: Includes HTML templates and static files. FastAPI mounts static and template directories.
- **API**: Generates only API endpoints and disables template/static mounting.

## ๐ŸŽฏ Supported Frameworks

| Framework | Description | Default Port | Status |
|-----------|-------------|--------------|--------|
| Flask | Lightweight WSGI web framework | 5000 | โœ… |
| FastAPI | Modern, fast web framework | 8000 | โœ… |
| Django | High-level Python web framework | 8000 | โŒ |
| Bottle | Fast, simple micro framework | 8080 | ๐Ÿšง |
| Pyramid | Flexible web framework | 6543 | ๐Ÿšง |

## Work in Progress
Currently implementing support for additional web frameworks:

- **Bottle**: Integration in development
- **Pyramid**: Initial implementation phase

These frameworks will enable:
- Route mapping and handling
- Request/response processing
- Middleware integration
- Template rendering support

Check back for updates or follow the project's issues for implementation progress. Contributions are welcome!

> Note: For now, please use our stable implementations for Flask or FastAPI.

## ๐Ÿš— Quick Start

```bash
# Install AMEN CLI
pip install amen-cli

# Create a new project
amen create

# Follow the interactive prompts

# Navigate to your project
cd your-project-name

# Activate virtual environment
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows

# Run your application
python run.py
Or
#Before you cd into your project you can run the following
amen run
```

## ๐Ÿ”ง Development

```bash
# Clone the repository
git clone https://github.com/taqsblaze/amen-cli.git

# Install for development and testing
cd amen-cli
pip install -e .
pip install pytest pytest-cov

# Run tests
pytest

# Run tests with coverage
pytest --cov
```

## ๐Ÿค Contributing

Contributions are welcome! Here's how:

1. Fork the repository
2. Create your feature branch: `git checkout -b feature/amazing-feature`
3. Make your changes
4. Push to the branch: `git push origin feature/amazing-feature`
5. Open a Pull Request

## ๐Ÿ“ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ‘ฅ Contact & Support

- ๐ŸŒ [GitHub Repository](https://github.com/taqsblaze/amen-cli)
- ๐Ÿ› [Issue Tracker](https://github.com/taqsblaze/amen-cli/issues)
- ๐Ÿ“ง [Send Email](mailto:tanakah30@gmail.com)

## โญ Credits

Created by [Tanaka Chinengundu](https://www.linkedin.com/in/taqsblaze)
Inspired by Laravel's elegant development experience

---

Made with โค๏ธ by Tanaka Chinengundu