Skip to content

TaqsBlaze/amen-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

93 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AMEN CLI icon

PyPI Version License Python Versions GitHub Stars GitHub Issues GitHub Forks GitHub Last Commit GitHub Contributors GitHub Code Size GitHub Repo Size PyPI Downloads

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)

pip install amen-cli

Using uv

uv is a very fast Python package installer and resolver, written in Rust.

To install amen-cli using uv:

  1. Install uv:

    pip install uv
  2. Install amen-cli using uv:

    uv pip install amen-cli

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

Debian/Ubuntu

# 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:

export PATH="$HOME/.local/bin:$PATH"

Add this line to your ~/.bashrc or ~/.zshrc for permanent effect.

πŸ“– Usage

# 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

# Run your application
amen run <app_name>

# Example:
amen run myapp

# Run tests for your application
amen test <app_name>

# Example:
amen test myapp

# Check for updates to the CLI
amen check-update

# Manage project configuration
amen config <app_name>

# Example:
amen config myapp

# Run a security audit on your application
amen audit <app_name> [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 <app_name> [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

# 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 <appname>

πŸ”§ Development

# 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 file for details.

πŸ‘₯ Contact & Support

⭐ Credits

Created by Tanaka Chinengundu
Inspired by Laravel's elegant development experience


Made with ❀️ by Tanaka Chinengundu

About

AMEN: inspired by laravel installer Python Web Application Scaffolding tool

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published