Jarvis is a powerful AI assistant developed by Faizan Khan. Designed to streamline everyday tasks, Jarvis is equipped with a wide array of features such as system monitoring, file management, volume control, web browsing, and even stock analysis. It is user-friendly, versatile, and can be controlled via both voice commands and text inputs.
The table below summarizes the various features of Jarvis AI Assistant:
| Feature Category | Commands | Description |
|---|---|---|
| Personal Info | Who is your developer? |
Displays developer info and opens Instagram profile of Faizan Khan. |
Tell me about yourself |
Provides an introduction to Jarvis and its features. | |
| System Information | Battery status |
Displays battery percentage and charging status. |
System specifications |
Provides OS, processor, and CPU core details. | |
| File Management | Create folder [name] |
Creates a new folder with the specified name. |
Delete file [name] |
Deletes the specified file. | |
| Volume Control | Increase volume |
Increases system volume by 5%. |
Mute volume |
Mutes system volume. | |
| Clipboard Management | Show clipboard |
Displays the current clipboard content. |
Copy to clipboard [text] |
Copies specified text to the clipboard. | |
| Reminders | Set a reminder [task] |
Sets a reminder with a message for 1 minute from the current time. |
| System Control | Shut down system |
Shuts down the system after a 5-second delay. |
Restart system |
Restarts the system after a 5-second delay. | |
| Web Browsing | Open YouTube |
Opens YouTube in a web browser. |
Play YouTube video [title] |
Searches and plays the specified YouTube video. | |
| Stock Analysis | Stock analysis [symbol] |
Analyzes stock data for the specified company or stock symbol. |
| General Queries | Any other queries | Uses a chatbot to respond appropriately. |
Jarvis leverages various Python modules and libraries to offer its extensive range of features:
-
Core Technologies
Python 3.x: The primary programming language for the assistant.Eel: Enables web integration and UI features for better interactivity.SpeechRecognition: For voice command recognition (optional).pyttsx3: Converts text to speech for voice responses.
-
System Operations
os: For managing files and folders (e.g., creating and deleting files).platform: Retrieves detailed system information.psutil: Used to check battery status.
-
Clipboard Management
pyperclip: Allows copying and pasting of clipboard data.
-
Web Browsing
webbrowser: Opens URLs in a web browser (e.g., YouTube, Instagram).
-
Error Handling
- Custom exception handling to ensure smooth execution.
-
Stock Analysis
requests: For fetching stock data from APIs or external services (expandable as needed).
Follow these steps to install and run Jarvis AI Assistant:
-
Clone the Repository
git clone https://github.com/faizan-khanx/jarvis cd jarvis -
Cookies
- Install Any Cookies Editor
- go to hugging face and select any model
- and copy its cookies in json format
- open any code editor and in backend folder create a json file with name cookie.json
- paste cookies in cookie.json and save it
- Example JSON Structure for Cookies:
[
{
"domain": "huggingface.co",
"expirationDate": xyz,
"hostOnly": true,
"httpOnly": true,
"name": "hf-chat",
"path": "/",
"sameSite": "lax",
"secure": true,
"session": false,
"storeId": null,
"value": "xyz"
},
{
"domain": "huggingface.co",
"expirationDate": xyz,
"hostOnly": true,
"httpOnly": true,
"name": "token",
"path": "/",
"sameSite": "no_restriction",
"secure": true,
"session": false,
"storeId": null,
"value": "xyz"
}
]- open the folder in cmd install require pips and you are set to go with
To enhance the Jarvis AI Assistant documentation, you can add examples for coding usage, showing how each feature or module is used in different scenarios. Below are examples to include for different categories:
- Battery Status
This command fetches and displays the battery percentage and charging status.
Code Snippet:
import psutil
def battery_status():
battery = psutil.sensors_battery()
percent = battery.percent
charging = "Charging" if battery.power_plugged else "Not Charging"
print(f"Battery: {percent}% | Status: {charging}")
battery_status()- Create Folder
You can create a new folder using the following code:
import os
def create_folder(folder_name):
os.makedirs(folder_name, exist_ok=True)
print(f"Folder '{folder_name}' created successfully.")
create_folder("MyNewFolder")- Delete File
This code snippet demonstrates how to delete a file:
import os
def delete_file(file_name):
if os.path.exists(file_name):
os.remove(file_name)
print(f"File '{file_name}' deleted successfully.")
else:
print(f"File '{file_name}' not found.")
delete_file("sample.txt")- Increase Volume
To control system volume, you can use:
import pycaw # Example for Windows users
# Code to increase volume using the system's audio management APIs- Open YouTube
This demonstrates opening a web page:
import webbrowser
def open_youtube():
webbrowser.open("https://www.youtube.com")
open_youtube()- Copy to Clipboard
Example to copy text to the clipboard:
import pyperclip
def copy_to_clipboard(text):
pyperclip.copy(text)
print(f"Copied to clipboard: {text}")
copy_to_clipboard("Hello, Jarvis!")- Show Clipboard Content
Displays the current clipboard content:
def show_clipboard():
content = pyperclip.paste()
print(f"Clipboard Content: {content}")
show_clipboard()- Stock Data Fetching
To fetch and analyze stock data:
import requests
def stock_analysis(symbol):
api_url = f"https://api.example.com/stock/{symbol}" # Replace with a real API
response = requests.get(api_url)
data = response.json()
print(f"Stock Data for {symbol}: {data}")
stock_analysis("AAPL")Contributions are welcome! To contribute, fork the repository and submit a pull request with your improvements.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or feedback, please contact E-Mail Me