Skip to main content

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

CraftX.py Logo

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

Get Started • Documentation • Examples • Community

Metadata

Release files for craftxpy 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for craftxpy 0.1.2
File Size Uploaded Provenance Actions
craftxpy-0.1.2.tar.gz 652.2 kB Without provenance Details for craftxpy-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for craftxpy 0.1.2
File Interpreter ABI Platform Actions
craftxpy-0.1.2-py3-none-any.whl Python 3 none any Details for craftxpy-0.1.2-py3-none-any.whl

Total release size: 672.2 kB

Release files / craftxpy-0.1.2.tar.gz

Download URL craftxpy-0.1.2.tar.gz
Size 652.2 kB
Tags Source
SHA-256 checksum
How to use checksums
76e53fe7fdd13689276db0435475ed20cde3e737734109fd3dbc5f6fcd8143ed
BLAKE2b-256 checksum
How to use checksums
cd941556556611e24dcd05b9c0684ffc393f4d2e3abcfadbd19add7ec4f7a622
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.13

Release files / craftxpy-0.1.2-py3-none-any.whl

Download URL craftxpy-0.1.2-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e0af3e7fe5fa8aeeec3983531ed204b8661ea98faf6623cd7c1f2a1509c1afe
BLAKE2b-256 checksum
How to use checksums
c4c04d1d7dbf62fa223d597ff2942a68cf55582c84565b8eb38633c94b63e4ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.13

Security for craftxpy 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page