Skip to main content

Python-native intelligence, modular by design

Project description

CraftX.py

Python-native intelligence, modular by design.

Python Version License Version

CraftX.py is a modular AI scripting framework designed specifically for Python developers. It provides seamless integration with multiple AI models, secure automation tools, and an extensible plugin architecture.

๐Ÿš€ Features

  • ๐Ÿค– Multi-Model Support: Integrate WizardCoder, CommandR7B, CodeGeeX4, and Qwen2.5-Coder
  • ๐Ÿ”ง Modular Tools: Extensible plugin system with built-in utilities
  • ๐Ÿ›ก๏ธ Secure Execution: Safe shell commands with whitelist protection
  • ๐Ÿ’พ Memory System: Persistent conversation history and session management
  • ๐ŸŽจ Beautiful UI: Modern Streamlit-based interface
  • ๐Ÿ Python-Native: Clean APIs with type hints and pythonic design

๐Ÿ“ฆ Installation

Quick Start

git clone https://github.com/davidanderson01/CraftX.py.git
cd CraftX.py
pip install -r requirements.txt

Development Installation

pip install -e .[dev]

๐ŸŽฏ Quick Start

1. Basic Usage

from craftxpy.agents.router import AgentRouter
from craftxpy.plugins.wizardcoder import WizardCoder

# Initialize AI model router
router = AgentRouter({"codegen": WizardCoder()})

# Generate code
response = router.route("codegen", "Create a FastAPI endpoint for user auth")
print(response)

2. Web Interface

streamlit run assistant_ui/app.py

3. Run Demo

python examples/demo.py

๐Ÿ—๏ธ Architecture

craftxpy/
โ”œโ”€โ”€ agents/          # AI model routing and management
โ”œโ”€โ”€ plugins/         # Model integrations and tools
โ”‚   โ”œโ”€โ”€ wizardcoder.py
โ”‚   โ”œโ”€โ”€ commandr7b.py
โ”‚   โ”œโ”€โ”€ codegeex4.py
โ”‚   โ”œโ”€โ”€ qwen25coder.py
โ”‚   โ””โ”€โ”€ tools/       # Extensible tool plugins
โ”œโ”€โ”€ memory/          # Conversation logging and history
โ”œโ”€โ”€ utils/           # Utilities (shell, page builder)
โ””โ”€โ”€ assistant_ui/    # Streamlit web interface

๐Ÿ”ง Built-in Tools

  • ๐ŸŒ DNS Validator: Validate domain resolution
  • ๐Ÿ”’ SSL Checker: Check certificate status and expiration
  • ๐Ÿ“ File Monitor: Monitor OneDrive file hydration (Windows)
  • ๐Ÿ› ๏ธ Custom Tools: Easy plugin creation system

๐Ÿ’ก Creating Custom Tools

python scripts/new_tool.py "My Custom Tool"

Or programmatically:

from craftxpy.plugins.tools.base_tool import BaseTool

class MyTool(BaseTool):
    def run(self, **kwargs) -> str:
        return "โœ… Tool executed successfully!"

๐ŸŽจ Web Interface

The Streamlit-based interface provides:

  • Real-time Chat: Interactive AI conversations
  • Model Switching: Choose between different AI models
  • Tool Integration: Access all tools through the UI
  • Session Management: Persistent conversation history
  • Developer Mode: Safe shell execution and debugging

๐Ÿ›ก๏ธ Security Features

  • Command Whitelisting: Only approved shell commands can execute
  • Input Validation: All inputs are validated and sanitized
  • Error Handling: Comprehensive error handling and logging
  • Session Isolation: Each session is isolated and secure

๐Ÿ“š Documentation

๐Ÿงช Testing

# Run all tests with beautiful output
python run_tests.py

# Run with pytest
python -m pytest tests/ -v

# Run specific test
python -m pytest tests/test_ui.py::test_logo_files -v

๐ŸŒ Static Website

CraftX.py includes a complete static website with:

  • Landing Page (index.html) - Professional project showcase
  • Documentation (docs.html) - Complete API and usage docs
  • Examples (examples.html) - Code samples and tutorials
  • About Page (about.html) - Project information and stats

To view locally:

# Simple HTTP server
python -m http.server 8000
# Then visit: http://localhost:8000

The website is also GitHub Pages ready with automatic deployment.

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

git clone https://github.com/davidanderson01/CraftX.py.git
cd CraftX.py
pip install -e .[dev]
pre-commit install

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • AI Models: Thanks to the teams behind WizardCoder, CommandR7B, CodeGeeX4, and Qwen2.5-Coder
  • Framework: Built with Streamlit, Python, and modern web technologies
  • Community: Special thanks to all contributors and early adopters

๐Ÿ”— Links


CraftX.py Logo

CraftX.py - Python-native intelligence, modular by design.

Get Started โ€ข Documentation โ€ข Examples โ€ข Community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

craftxpy-0.1.2.tar.gz (652.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

craftxpy-0.1.2-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file craftxpy-0.1.2.tar.gz.

File metadata

  • Download URL: craftxpy-0.1.2.tar.gz
  • Upload date:
  • Size: 652.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for craftxpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 76e53fe7fdd13689276db0435475ed20cde3e737734109fd3dbc5f6fcd8143ed
MD5 500ab9ae03ae0d38d54b3b95ba463d16
BLAKE2b-256 cd941556556611e24dcd05b9c0684ffc393f4d2e3abcfadbd19add7ec4f7a622

See more details on using hashes here.

File details

Details for the file craftxpy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: craftxpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for craftxpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2e0af3e7fe5fa8aeeec3983531ed204b8661ea98faf6623cd7c1f2a1509c1afe
MD5 d25b149278e932e1545a93805a0c37c5
BLAKE2b-256 c4c04d1d7dbf62fa223d597ff2942a68cf55582c84565b8eb38633c94b63e4ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page