Malaz adalah AI coding assistant yang powerful, dirancang untuk membantu developer dalam berbagai tugas pengembangan software termasuk code generation, debugging, refactoring, dan project management.
- π§ Tool Integration: Built-in tools untuk file management, code analysis, dan shell execution
- π§ Smart Code Analysis: Analisis struktur code dan dependencies secara otomatis
- π οΈ Project Scaffolding: Template untuk berbagai jenis project (Flask, CLI, Data Analysis)
- π Code Search: Pencarian pattern dalam codebase menggunakan regex
- π Code Review: Review code otomatis dengan saran improvement
- π Auto Debug: Analisis error trace dan saran solusi
- π Version Control: Integrasi dengan Git untuk commit otomatis
- π¬ Interactive Mode: CLI interaktif dengan session memory
- π Security: Built-in security validation untuk operasi file
Download the latest release untuk platform Anda:
- Windows: malaz-windows-latest.zip
- Linux: malaz-linux-latest.tar.gz
- macOS: malaz-macos-latest.tar.gz
Windows:
- Download
malaz-windows-*.zip - Extract archive
- Run
install.batas Administrator - Restart Command Prompt/PowerShell
- Use:
malaz --help
Linux/macOS:
- Download file
.tar.gzyang sesuai - Extract:
tar -xzf malaz-*.tar.gz - Run:
./install.sh - Restart terminal atau run:
source ~/.bashrc - Use:
malaz --help
Untuk development atau jika ingin build dari source:
- Clone repository:
git clone <repository-url>
cd malaz- Install dependencies:
pip install -r requirements.txt- Setup environment:
cp .env.example .env
# Edit .env dan masukkan OpenAI API key Anda- Run Malaz:
# Interactive mode
python malaz_cli.py
# Direct command
python malaz_cli.py "create a simple Python calculator"
# Show help
python malaz_cli.py --helpUntuk build executable sendiri:
# Install build dependencies
pip install pyinstaller
# Build untuk platform saat ini
python scripts/build.py
# Build dengan clean
python scripts/build.py --clean
# Build dengan version custom
python scripts/build.py --version "1.0.0-custom"Jalankan Malaz dalam mode interaktif:
python malaz_cli.pyMode interaktif menyediakan:
- Session memory untuk konteks percakapan
- Built-in commands dengan prefix
/ - Special commands dengan prefix
!
Eksekusi command langsung:
python malaz_cli.py "analyze the code structure of this project"
python malaz_cli.py "create a Flask web app with user authentication"
python malaz_cli.py "debug this error: AttributeError in line 45"| Command | Description |
|---|---|
/help |
Tampilkan bantuan |
/tools |
List available tools |
/context |
Show project context |
/history |
Show conversation history |
/reset |
Reset session memory |
/state |
Show current project state |
/exit |
Keluar dari program |
| Command | Description |
|---|---|
!review <file> |
Review code file |
!debug <trace> |
Debug error trace |
!commit [message] |
Commit changes to Git |
Untuk panduan lengkap dan referensi API, kunjungi Malaz Documentation:
- π Usage Guide - Panduan lengkap dengan contoh-contoh praktis
- π§ API Reference - Dokumentasi lengkap tools dan commands
- π Getting Started - Quick links dan overview
Malaz dilengkapi dengan 9 built-in tools:
- create_file - Create file baru dengan content
- modify_file - Modify file menggunakan diff patches
- run_shell - Execute shell command
- search_code - Search pattern dalam codebase
- analyze_code - Analisis struktur code dan dependencies
- scaffold_project - Create project dari template
- code_review - Perform code review
- auto_debug - Analisis error trace
- vcs_commit - Commit changes ke version control
malaz/
βββ core/
β βββ agent.py # Main AI agent class
β βββ tool_manager.py # Tool management system
β βββ memory.py # Session memory management
β βββ scaffold.py # Project scaffolding
β βββ debugger.py # Auto debugging system
β βββ vcs_integration.py # Version control integration
βββ utils/
β βββ file_utils.py # File operations utilities
β βββ security.py # Security validation
β βββ review_assistant.py # Code review assistant
βββ malaz_cli.py # Main CLI interface
βββ requirements.txt # Python dependencies
βββ .env # Environment configuration
βββ README.md # Documentation
Edit file .env untuk konfigurasi:
# Required
OPENAI_API_KEY=your_openai_api_key_here
# Optional
MALAZ_MODEL=gpt-4o-mini # Default model to usegpt-4o-mini(default, cost-effective)gpt-4ogpt-4-turbogpt-3.5-turbo
python malaz_cli.py "create a Flask web application with user authentication and database integration"python malaz_cli.py "analyze the security vulnerabilities in my authentication module"python malaz_cli.py "!debug 'TypeError: unsupported operand type(s) for +: 'int' and 'str' at line 42'"python malaz_cli.py "!review app.py"python malaz_cli.py
malaz> create a REST API for user management
malaz> add input validation to the endpoints
malaz> write unit tests for the API
malaz> /exitProject ini menggunakan GitHub Actions untuk automated testing dan releases:
- Continuous Integration: Test otomatis pada Python 3.8-3.11 di Windows, Linux, dan macOS
- Security Scanning: Automated security checks dengan bandit dan safety
- Code Quality: Linting dengan flake8, formatting dengan black, type checking dengan mypy
- Automated Releases: Build dan release otomatis untuk semua platform saat merge ke branch
release
- Development: Work pada branch
feature/*ataudevelop - Testing: CI pipeline akan run test otomatis
- Release: Merge ke branch
releaseakan trigger:- Build executable untuk Windows, Linux, macOS
- Create GitHub release dengan versioning otomatis
- Upload binaries sebagai release assets
main: Stable production codedevelop: Development integration branchfeature/*: Feature development branchesrelease: Release trigger branch
Extend ToolManager class di core/tool_manager.py:
def your_custom_tool(self, param1, param2):
"""Your custom tool implementation"""
# Implementation here
return "Tool result"Update tool definitions dalam _get_builtin_tools() method.
Edit core/scaffold.py untuk menambah template baru:
"your_template": {
"description": "Your template description",
"structure": {
"file1.py": "file content",
"folder/": None,
# ... more files
}
}-
OpenAI API Error
- Pastikan API key valid di
.env - Check quota/billing di OpenAI dashboard
- Pastikan API key valid di
-
Tool Execution Failed
- Verify file permissions
- Check security validation dalam
utils/security.py
-
Module Import Error
- Pastikan semua dependencies terinstall
- Run
pip install -r requirements.txt
-
Executable Issues
- Download ulang dari releases page
- Pastikan executable memiliki permission yang benar
- Check antivirus software yang mungkin block executable
Enable verbose logging:
export MALAZ_DEBUG=1
python malaz_cli.pyAtau untuk pre-built executable:
export MALAZ_DEBUG=1
malaz| Platform | Status | Latest Release |
|---|---|---|
| Windows | Download | |
| Linux | Download | |
| macOS | Download |
- Fork repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI untuk GPT API
- Rich library untuk beautiful CLI output
- Python community untuk ecosystem yang luar biasa
Jika ada pertanyaan atau issue:
- Check troubleshooting section
- Search existing issues
- Create new issue dengan detail lengkap
- Join komunitas developer untuk diskusi
Happy Coding with Malaz! π