futureos


Namefutureos JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryFirst fully AI based Operating system
upload_time2024-11-14 14:17:39
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords ai operating system ollama python chromadb langchain
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/futureos)
![PyPI - Version](https://img.shields.io/pypi/v/futureos)
![Job](https://github.com/miskibin/futureOS/actions/workflows/python-app.yml/badge.svg)

# FutureOS 🚀

My take on how Operating Systems will be built in the future.

<img src="https://github.com/user-attachments/assets/4bdf7e12-0f9b-4f68-a588-4aed67ec6d45" alt="FutureOS Interface" />

## 🚀 Getting Started

```bash
# Install
pip install futureos

# Launch
python -m futureos
```

> [!IMPORTANT]  
> To use FutureOS, ensure you have Ollama installed with the `gemma2:2b` model. For optimal performance, CUDA should be enabled on your system.

## 🌟 The Challenge

Currently, there are several powerful AI tools for both Windows and macOS:

- 🤖 [Claude computer use](https://www.anthropic.com/news/3-5-models-and-computer-use)
- 👨‍💻 [GitHub Copilot](https://copilot.github.com)
- 🗣️ New Siri on Mac

However, these tools implement their own methods of indexing and searching files, and they're not integrated with the OS.

## 💡 The Vision

What if:

- Every utility in the OS had access to `vector search` for collections of all `files`, `directories`, `pictures`, and more?
- All content was automatically indexed by the OS whenever a file is created or modified?
- Every utility had access to an `AI chain` (like LangChain) deeply integrated into the OS?
- Every command could leverage these AI capabilities?

Let's go further... 🚀

Why force users to remember specific commands with their parameters and arguments? By creating descriptive docstrings for commands, we can build a vector store of all commands and automatically choose the best one for user input. Users don't even need to know exact command names!

## ✅ Quality Assurance

"But without proper testing, users wouldn't like it."

I know! That's why there are [multiple tests](/tests/test_create_collections.py) for every command with output that's easy to parse by LLM.

## 🏗️ Architecture

### Command System

Every command inherits from a base `Command` class that provides:

```python
def get_file(self, question: str, max_distance: float) -> str:
    """Find relevant files using vector similarity search"""

def get_directory(self, question: str, max_distance: float) -> str:
    """Find relevant directories using vector similarity search"""

def run_chain(self, chain: RunnablePassthrough, input: dict) -> Any:
    """Execute LangChain operations for content processing"""
```

### 🔍 How Commands Work

Let's break down how a typical command (cd) is constructed:

```python
class cd(Command):
    """
    NAME
        cd - change the current working directory

    SYNOPSIS
        cd [directory]

    DESCRIPTION
        Change the current working directory to the specified directory.

    NATURAL LANGUAGE COMMANDS
        - Change directory to X
        - Go to folder X
        - Navigate to directory X
    """
```

The docstring serves multiple purposes:

1. **Vector Embedding Source**: Used to create embeddings for command matching
2. **Natural Language Patterns**: Defines common ways users might express the command
3. **Documentation**: Serves as built-in help text

### Command Implementation

```python
def execute(self, args: Any) -> None:
    try:
        # Handle both traditional and natural language input
        directory = self.get_directory(args.query) if args.query else args.directory

        # Resolve and validate path
        target_path = resolve_path(directory)

        # Execute directory change
        if target_path.is_dir():
            constants.CURRENT_DIRECTORY = target_path
            self.print(f"Changed to {target_path}", style="green")
    except Exception as e:
        self.print(f"Error: {str(e)}", style="red")
```

## 🤝 Contributing

All contributors are welcome!

## 📄 License

MIT License - See [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "futureos",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "AI, Operating System, ollama, python, chromadb, langchain",
    "author": null,
    "author_email": "Michal Skibinski <michalskibinski109@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/68/4a/1be21cbc19e4f1e4cee169a0ea795bafd0469e3d73e4762408041aed4cf6/futureos-0.3.0.tar.gz",
    "platform": null,
    "description": "![PyPI - Python Version](https://img.shields.io/pypi/pyversions/futureos)\r\n![PyPI - Version](https://img.shields.io/pypi/v/futureos)\r\n![Job](https://github.com/miskibin/futureOS/actions/workflows/python-app.yml/badge.svg)\r\n\r\n# FutureOS \ud83d\ude80\r\n\r\nMy take on how Operating Systems will be built in the future.\r\n\r\n<img src=\"https://github.com/user-attachments/assets/4bdf7e12-0f9b-4f68-a588-4aed67ec6d45\" alt=\"FutureOS Interface\" />\r\n\r\n## \ud83d\ude80 Getting Started\r\n\r\n```bash\r\n# Install\r\npip install futureos\r\n\r\n# Launch\r\npython -m futureos\r\n```\r\n\r\n> [!IMPORTANT]  \r\n> To use FutureOS, ensure you have Ollama installed with the `gemma2:2b` model. For optimal performance, CUDA should be enabled on your system.\r\n\r\n## \ud83c\udf1f The Challenge\r\n\r\nCurrently, there are several powerful AI tools for both Windows and macOS:\r\n\r\n- \ud83e\udd16 [Claude computer use](https://www.anthropic.com/news/3-5-models-and-computer-use)\r\n- \ud83d\udc68\u200d\ud83d\udcbb [GitHub Copilot](https://copilot.github.com)\r\n- \ud83d\udde3\ufe0f New Siri on Mac\r\n\r\nHowever, these tools implement their own methods of indexing and searching files, and they're not integrated with the OS.\r\n\r\n## \ud83d\udca1 The Vision\r\n\r\nWhat if:\r\n\r\n- Every utility in the OS had access to `vector search` for collections of all `files`, `directories`, `pictures`, and more?\r\n- All content was automatically indexed by the OS whenever a file is created or modified?\r\n- Every utility had access to an `AI chain` (like LangChain) deeply integrated into the OS?\r\n- Every command could leverage these AI capabilities?\r\n\r\nLet's go further... \ud83d\ude80\r\n\r\nWhy force users to remember specific commands with their parameters and arguments? By creating descriptive docstrings for commands, we can build a vector store of all commands and automatically choose the best one for user input. Users don't even need to know exact command names!\r\n\r\n## \u2705 Quality Assurance\r\n\r\n\"But without proper testing, users wouldn't like it.\"\r\n\r\nI know! That's why there are [multiple tests](/tests/test_create_collections.py) for every command with output that's easy to parse by LLM.\r\n\r\n## \ud83c\udfd7\ufe0f Architecture\r\n\r\n### Command System\r\n\r\nEvery command inherits from a base `Command` class that provides:\r\n\r\n```python\r\ndef get_file(self, question: str, max_distance: float) -> str:\r\n    \"\"\"Find relevant files using vector similarity search\"\"\"\r\n\r\ndef get_directory(self, question: str, max_distance: float) -> str:\r\n    \"\"\"Find relevant directories using vector similarity search\"\"\"\r\n\r\ndef run_chain(self, chain: RunnablePassthrough, input: dict) -> Any:\r\n    \"\"\"Execute LangChain operations for content processing\"\"\"\r\n```\r\n\r\n### \ud83d\udd0d How Commands Work\r\n\r\nLet's break down how a typical command (cd) is constructed:\r\n\r\n```python\r\nclass cd(Command):\r\n    \"\"\"\r\n    NAME\r\n        cd - change the current working directory\r\n\r\n    SYNOPSIS\r\n        cd [directory]\r\n\r\n    DESCRIPTION\r\n        Change the current working directory to the specified directory.\r\n\r\n    NATURAL LANGUAGE COMMANDS\r\n        - Change directory to X\r\n        - Go to folder X\r\n        - Navigate to directory X\r\n    \"\"\"\r\n```\r\n\r\nThe docstring serves multiple purposes:\r\n\r\n1. **Vector Embedding Source**: Used to create embeddings for command matching\r\n2. **Natural Language Patterns**: Defines common ways users might express the command\r\n3. **Documentation**: Serves as built-in help text\r\n\r\n### Command Implementation\r\n\r\n```python\r\ndef execute(self, args: Any) -> None:\r\n    try:\r\n        # Handle both traditional and natural language input\r\n        directory = self.get_directory(args.query) if args.query else args.directory\r\n\r\n        # Resolve and validate path\r\n        target_path = resolve_path(directory)\r\n\r\n        # Execute directory change\r\n        if target_path.is_dir():\r\n            constants.CURRENT_DIRECTORY = target_path\r\n            self.print(f\"Changed to {target_path}\", style=\"green\")\r\n    except Exception as e:\r\n        self.print(f\"Error: {str(e)}\", style=\"red\")\r\n```\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nAll contributors are welcome!\r\n\r\n## \ud83d\udcc4 License\r\n\r\nMIT License - See [LICENSE](LICENSE) file for details.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "First fully AI based Operating system ",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/miskibin/futureOS",
        "Repository": "https://github.com/miskibin/futureOS"
    },
    "split_keywords": [
        "ai",
        " operating system",
        " ollama",
        " python",
        " chromadb",
        " langchain"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1c28086d3ebf330b9577011a9c5d7bd933cc385f8529f5f90c255086cd828890",
                "md5": "7ca34f1ead1eeee467791ad72a7658c2",
                "sha256": "5ea9d0be2a682e1f35468543e9abffe3ff986e580520582cd12809a8e6a32813"
            },
            "downloads": -1,
            "filename": "futureos-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7ca34f1ead1eeee467791ad72a7658c2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 23013,
            "upload_time": "2024-11-14T14:17:38",
            "upload_time_iso_8601": "2024-11-14T14:17:38.367694Z",
            "url": "https://files.pythonhosted.org/packages/1c/28/086d3ebf330b9577011a9c5d7bd933cc385f8529f5f90c255086cd828890/futureos-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "684a1be21cbc19e4f1e4cee169a0ea795bafd0469e3d73e4762408041aed4cf6",
                "md5": "978ebc87bd47992a339da9073036bdf1",
                "sha256": "205b1fbf5587461e89ec0fa0695ee89e1fe2a3397f569c2ea2185ead4168a470"
            },
            "downloads": -1,
            "filename": "futureos-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "978ebc87bd47992a339da9073036bdf1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 22572,
            "upload_time": "2024-11-14T14:17:39",
            "upload_time_iso_8601": "2024-11-14T14:17:39.511354Z",
            "url": "https://files.pythonhosted.org/packages/68/4a/1be21cbc19e4f1e4cee169a0ea795bafd0469e3d73e4762408041aed4cf6/futureos-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 14:17:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "miskibin",
    "github_project": "futureOS",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "futureos"
}
        
Elapsed time: 0.36837s