{"id":13442198,"url":"https://github.com/yoda-pa/yoda","last_synced_at":"2025-03-20T13:32:51.509Z","repository":{"id":201347788,"uuid":"77321225","full_name":"yoda-pa/yoda","owner":"yoda-pa","description":"Wise and powerful personal assistant, available in your nearest terminal","archived":false,"fork":false,"pushed_at":"2024-10-18T20:29:16.000Z","size":49587,"stargazers_count":739,"open_issues_count":26,"forks_count":155,"subscribers_count":26,"default_branch":"v2","last_synced_at":"2025-03-01T14:38:20.564Z","etag":null,"topics":["chat","chatbot","cli","devtools","diary","dude","hacktoberfest","learn","learning","love","money","personal-assistant","python","vocabulary"],"latest_commit_sha":null,"homepage":"https://yoda-pa.github.io/yoda/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoda-pa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-12-25T10:35:07.000Z","updated_at":"2025-02-27T23:21:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9c8817e-65e3-444e-9731-c612a27612c5","html_url":"https://github.com/yoda-pa/yoda","commit_stats":null,"previous_names":["yoda-pa/yoda"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoda-pa%2Fyoda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoda-pa%2Fyoda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoda-pa%2Fyoda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoda-pa%2Fyoda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoda-pa","download_url":"https://codeload.github.com/yoda-pa/yoda/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244619254,"owners_count":20482387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","chatbot","cli","devtools","diary","dude","hacktoberfest","learn","learning","love","money","personal-assistant","python","vocabulary"],"created_at":"2024-07-31T03:01:42.814Z","updated_at":"2025-03-20T13:32:51.503Z","avatar_url":"https://github.com/yoda-pa.png","language":"Python","funding_links":[],"categories":["HarmonyOS","Python","cli"],"sub_categories":["Windows Manager"],"readme":"# Yoda PA\n\n[![Github CI](https://github.com/yoda-pa/yoda/actions/workflows/ci.yml/badge.svg)](https://github.com/yoda-pa/yoda/actions/workflows/ci.yml)\n[![PyPI version](https://badge.fury.io/py/yodapa.svg)](https://badge.fury.io/py/yodapa)\n\nPersonal Assistant on the command line.\n\n![Yoda](logo.png)\n\n## Installation\n\n```bash\npip install yodapa\n\nyoda --help\n```\n\n## Configure Yoda\n\n```bash\nyoda configure\n```\n\n## Plugins\n\nYoda is designed to be extensible. You can write your own plugins or use the AI to generate one for you.\n\n### List plugins\n\nThe help command will list all the available plugins.\n\n```\n❯ yoda --help\n                                                                            \n Usage: yoda [OPTIONS] COMMAND [ARGS]...                                    \n                                                                            \n╭─ Options ────────────────────────────────────────────────────────────────╮\n│ --install-completion          Install completion for the current shell.  │\n│ --show-completion             Show completion for the current shell, to  │\n│                               copy it or customize the installation.     │\n│ --help                        Show this message and exit.                │\n╰──────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ───────────────────────────────────────────────────────────────╮\n│ ai       AI command. Allows you to communicate with your local LLMs      │\n│ config   Config management                                               │\n│ dev                                                                      │\n│ init     Init yoda configurations                                        │\n│ plugin   Commands to manage plugins                                      │\n│ url                                                                      │\n╰──────────────────────────────────────────────────────────────────────────╯\n```\n\nYou can find the details for each plugin with the `--help` flag. Some examples:\n\n```\n❯ yoda ai --help\n                                                                            \n Usage: yoda ai [OPTIONS] COMMAND [ARGS]...                                 \n                                                                            \n AI command. Allows you to communicate with your local LLMs                 \n                                                                            \n╭─ Options ────────────────────────────────────────────────────────────────╮\n│ --help          Show this message and exit.                              │\n╰──────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ───────────────────────────────────────────────────────────────╮\n│ chat               Chat with the AI model based on the provided prompt.  │\n│ generate-command   Generate code for a new plugin command based on the   │\n│                    provided prompt.                                      │\n╰──────────────────────────────────────────────────────────────────────────╯\n```\n\n```\n❯ yoda dev --help\n                                                                            \n Usage: yoda dev [OPTIONS] COMMAND [ARGS]...                                \n                                                                            \n╭─ Options ────────────────────────────────────────────────────────────────╮\n│ --help          Show this message and exit.                              │\n╰──────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ───────────────────────────────────────────────────────────────╮\n│ checksite          Check if a site is up and running                     │\n│ coinflip           Flip a coin!                                          │\n│ generatepassword   Generates a secure password                           │\n│ speedtest          Test your internet connection                         │\n│ whois              Check whois info for a domain name                    │\n╰──────────────────────────────────────────────────────────────────────────╯\n```\n\n### Write your own plugin for Yoda\n\nSimply create a class with the `@yoda_plugin(name=\"plugin-name\")` decorator and add methods to it. The non-private\nmethods will be automatically added as sub-commands to Yoda, with the command being the name you provide to the\ndecorator.\n\n```python\nimport typer\n\napp = typer.Typer(help=\"\"\"\n    Hi plugin. Say hello.\n\n    Example:\n\n        $ yoda hi hello --name MP\n\n        $ yoda hi hello\n    \"\"\")\n\n\n@app.command()\ndef hello(name: str = None):\n    \"\"\"Say hello.\"\"\"\n    name = name or \"Padawan\"\n    typer.echo(f\"Hello {name}!\")\n```\n\n### Use AI to generate your own plugin\n\n```bash\n$ yoda ai generate-command weather \"show weather for the provided location\"\n\n🤖 Generated code:\n\nimport requests\nfrom typing import Optional\n\napp = typer.Typer(help=\"\"\"\n    Show weather for a given location.\n\n    Example:\n\n        $ yoda weather London\n\n        $ yoda weather -l London\n    \"\"\")\n\n@app.command()\ndef weather(location: str, units: Optional[str] = None):\n    \"\"\"Show the current weather for a given location.\"\"\"\n    # Set up your API key or database connection here\n    api_key = \"YOUR_API_KEY\"\n    db_conn = None  # Initialize your DB connection here\n    \n    # Use the requests library to make an HTTP request to the API\n    url = f\"https://api.openweathermap.org/data/2.5/weather?q={location}\u0026appid={api_key}\"\n    response = requests.get(url)\n    \n    # If the response is successful, parse the JSON data and return it in a format that typer can display\n    if response.status_code == 200:\n        data = response.json()\n        temperature = data[\"main\"][\"temp\"]\n        humidity = data[\"main\"][\"humidity\"]\n        wind = data[\"wind\"][\"speed\"]\n        pressure = data[\"main\"][\"pressure\"]\n        \n        typer.echo(f\"Weather for {location}:\")\n        typer.echo(f\"\\tTemperature: {temperature}°C\")\n        typer.echo(f\"\\tHumidity: {humidity}%\")\n        typer.echo(f\"\\tWind speed: {wind} m/s\")\n        typer.echo(f\"\\tPressure: {pressure} hPa\")\n        \n    # If the response is not successful, print an error message\n    else:\n        typer.echo(f\"Error: {response.status_code}\")\n```\n\n.. or chat with Yoda:\n\n```bash\n❯ yoda ai chat \"How are you?\"\n🤖 AI response:\nI am well, young one. The Force is strong with me.\n```\n\n## Development setup\n\n```bash\n# 1. Install poetry from their website: https://python-poetry.org/docs/#installation\n\n# 2. Install dependencies and this package\npoetry install\n\n# 3. Activate the virtual environment\npoetry shell\n\n# Now you should be able to communicate with yoda\nyoda --help\n```\n\n### Testing\n\n```bash\n# Run tests when in the virtual environment\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoda-pa%2Fyoda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoda-pa%2Fyoda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoda-pa%2Fyoda/lists"}