Skip to main content

First fully AI based Operating system

Project description

FutureOS 🚀

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

FutureOS Interface

🚀 Getting Started

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

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

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:

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

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

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

futureos-0.2.2.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

futureos-0.2.2-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file futureos-0.2.2.tar.gz.

File metadata

  • Download URL: futureos-0.2.2.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.1

File hashes

Hashes for futureos-0.2.2.tar.gz
Algorithm Hash digest
SHA256 84e88812d6c8f05e9474198a043e96394c16e929efbc5e1eece89f9ed9a5dee2
MD5 e5c39c1fde8eab58c0e662f24e248437
BLAKE2b-256 7084f761c8956b3bec6ffa3836d14f0d0e9504e361857f2f3bc24c62495e20c3

See more details on using hashes here.

File details

Details for the file futureos-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for futureos-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 50ffcd329442b443737752358ed4e76a304a95aae0c2f9b453db3ab3f28a58c4
MD5 90694cd1d703211288aafb11dfabb365
BLAKE2b-256 af971873aee47e0ecd6173382daca299c45fefa69d1a1c688081c7ded371a646

See more details on using hashes here.

Supported by

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