智能而强大的个人助理,可在您附近的终端中使用
Personal Assistant on the command line.
pip install yodapa
yoda --helpyoda configureYoda is designed to be extensible. You can write your own plugins or use the AI to generate one for you.
The help command will list all the available plugins.
…You can find the details for each plugin with the --help flag. Some examples:
……Simply create a class with the @yoda_plugin(name="plugin-name") decorator and add methods to it. The non-private
methods will be automatically added as sub-commands to Yoda, with the command being the name you provide to the
decorator.
import typer
app = typer.Typer(help="""
Hi plugin. Say hello.
Example:
$ yoda hi hello --name MP
$ yoda hi hello
""")
@app.command()
def hello(name: str = None):
"""Say hello."""
name = name or "Padawan"
typer.echo(f"Hello {name}!")….. or chat with Yoda:
❯ yoda ai chat "How are you?"
AI response:
I am well, young one. The Force is strong with me.# 1. Install poetry from their website: https://python-poetry.org/docs/#installation
# 2. Install dependencies and this package
poetry install
# 3. Activate the virtual environment
poetry shell
# Now you should be able to communicate with yoda
yoda --help# Run tests when in the virtual environment
pytest暂无开放 Issues,或尚未同步最近议题。