Skip to content

AWeirdDev/revilo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

revilo AI

Revilo Computer API. Will support AI soon.

Windows API

The Revilo Windows API plays some tricks with Powershell and provides clean APIs. What's more, it's: ✨ LIGHTWEIGHT! ✨

To import, -

from revilo.windows import ...   # import item (e.g., ps, mouse, ...)

Run Powershell

This is the core building block of the Revilo Computer API for Windows — Powershell.

ps.run("Write-Host I love chocolate!")  # 'I love chocolate!\n'
ps.run('Write-Host "Yo: $({c})"', vars={"c": "6*9 + 6+9"})  # 'Yo: 69\n'

Keyboard API * AI

The keyboard API provides a clean interface for sending keys to the current foreground application. It provides both text and hotkeys API.

# Simple write API
keyboard.write("I love Texas!")
keyboard.write("Multi-\nlines work, too!")

# Hotkey (equivalents)
keyboard.hotkey("⌘", "shift", "esc")  # Opens Task Manager
keyboard.hotkey("ctrl", "shift", "esc")  # Seriously, again!

Mouse API * AI

The mouse API is elegant, too!

mouse.move(100, 200)   # (x, y)

mouse.click()
mouse.click(100, 200)  # (x, y)
mouse.get_position()   # -> (x, y)

Screen API * AI

The screen API will be integrated with AI soon! Just a quick note: don't copy Microsoft's idea of stalking people's history (it's a decent idea for privacy leaks) because everyone loves their idea and will definitely go stonks!

# Takes a screenshot
screen.take_screenshot("./my-screenshot.png")

# Gets the current app name (foreground)
screen.get_current_app()

Notifications (Toast) API

The toast API is not 100% covered (for <toast>), but overall it's clean!

# Send a simple toast
toast.notify("Epic title!", "Epic text")

# Add a sound
toast.notify(
    "Hear me!",
    "Yes you will.", 
    audio="ms-winsoundevent:Notification.Looping.Call9",  # don't worry: type hints!
    audio_loops=True,
    duration="long",  # or short
    scenario="incomingCall"  # "reminder" | "alarm" | "incomingCall" | "urgent"
)

# Add actions
toast.notify(
    "📈 Time to increase traffic!",
    "Click to open Google for no reason!!!",
    actions=[
        toast.Action("Google Time", "https://google.com")
    ]
)

About

The Revilo Computer API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages