diff --git a/README.md b/README.md index 454b89c..3fc66b2 100644 --- a/README.md +++ b/README.md @@ -29,19 +29,62 @@ Yoda is designed to be extensible. You can write your own plugins or use the AI The help command will list all the available plugins. -```bash -$ yoda --help ``` - -![img.png](docs/docs/img.png) +❯ yoda --help + + Usage: yoda [OPTIONS] COMMAND [ARGS]... + +╭─ Options ────────────────────────────────────────────────────────────────╮ +│ --install-completion Install completion for the current shell. │ +│ --show-completion Show completion for the current shell, to │ +│ copy it or customize the installation. │ +│ --help Show this message and exit. │ +╰──────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ───────────────────────────────────────────────────────────────╮ +│ ai AI command. Allows you to communicate with your local LLMs │ +│ config Config management │ +│ dev │ +│ init Init yoda configurations │ +│ plugin Commands to manage plugins │ +│ url │ +╰──────────────────────────────────────────────────────────────────────────╯ +``` You can find the details for each plugin with the `--help` flag. Some examples: -![img_1.png](docs/docs/img_1.png) - -![img_2.png](docs/docs/img_2.png) +``` +❯ yoda ai --help + + Usage: yoda ai [OPTIONS] COMMAND [ARGS]... + + AI command. Allows you to communicate with your local LLMs + +╭─ Options ────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰──────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ───────────────────────────────────────────────────────────────╮ +│ chat Chat with the AI model based on the provided prompt. │ +│ generate-command Generate code for a new plugin command based on the │ +│ provided prompt. │ +╰──────────────────────────────────────────────────────────────────────────╯ +``` -![img_3.png](docs/docs/img_3.png) +``` +❯ yoda dev --help + + Usage: yoda dev [OPTIONS] COMMAND [ARGS]... + +╭─ Options ────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰──────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ───────────────────────────────────────────────────────────────╮ +│ checksite Check if a site is up and running │ +│ coinflip Flip a coin! │ +│ generatepassword Generates a secure password │ +│ speedtest Test your internet connection │ +│ whois Check whois info for a domain name │ +╰──────────────────────────────────────────────────────────────────────────╯ +``` ### Write your own plugin for Yoda @@ -121,7 +164,12 @@ def weather(location: str, units: Optional[str] = None): ``` .. or chat with Yoda: -![img_5.png](docs/docs/img_5.png) + +```bash +❯ yoda ai chat "How are you?" +🤖 AI response: +I am well, young one. The Force is strong with me. +``` ## Development setup diff --git a/docs/docs/config.md b/docs/docs/config.md new file mode 100644 index 0000000..92d8167 --- /dev/null +++ b/docs/docs/config.md @@ -0,0 +1,21 @@ +# Config Management + +``` +❯ yoda config --help + + Usage: yoda config [OPTIONS] COMMAND [ARGS]... + + Config management + +╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ get Get value of a key set in yoda config │ +│ init Initializes a sqlite db that will store the config │ +│ list List all key-value pairs in the config │ +│ set Set a value for a key in config │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +``` + +::: yodapa.core.config diff --git a/docs/docs/img.png b/docs/docs/img.png deleted file mode 100644 index 58e0fa3..0000000 Binary files a/docs/docs/img.png and /dev/null differ diff --git a/docs/docs/img_1.png b/docs/docs/img_1.png deleted file mode 100644 index cc26ba1..0000000 Binary files a/docs/docs/img_1.png and /dev/null differ diff --git a/docs/docs/img_2.png b/docs/docs/img_2.png deleted file mode 100644 index ea7642a..0000000 Binary files a/docs/docs/img_2.png and /dev/null differ diff --git a/docs/docs/img_3.png b/docs/docs/img_3.png deleted file mode 100644 index ece59aa..0000000 Binary files a/docs/docs/img_3.png and /dev/null differ diff --git a/docs/docs/img_5.png b/docs/docs/img_5.png deleted file mode 100644 index 06abb76..0000000 Binary files a/docs/docs/img_5.png and /dev/null differ diff --git a/docs/docs/index.md b/docs/docs/index.md index 8ba733b..3fc66b2 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -29,19 +29,62 @@ Yoda is designed to be extensible. You can write your own plugins or use the AI The help command will list all the available plugins. -```bash -$ yoda --help ``` - -![img.png](img.png) +❯ yoda --help + + Usage: yoda [OPTIONS] COMMAND [ARGS]... + +╭─ Options ────────────────────────────────────────────────────────────────╮ +│ --install-completion Install completion for the current shell. │ +│ --show-completion Show completion for the current shell, to │ +│ copy it or customize the installation. │ +│ --help Show this message and exit. │ +╰──────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ───────────────────────────────────────────────────────────────╮ +│ ai AI command. Allows you to communicate with your local LLMs │ +│ config Config management │ +│ dev │ +│ init Init yoda configurations │ +│ plugin Commands to manage plugins │ +│ url │ +╰──────────────────────────────────────────────────────────────────────────╯ +``` You can find the details for each plugin with the `--help` flag. Some examples: -![img_1.png](img_1.png) - -![img_2.png](img_2.png) +``` +❯ yoda ai --help + + Usage: yoda ai [OPTIONS] COMMAND [ARGS]... + + AI command. Allows you to communicate with your local LLMs + +╭─ Options ────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰──────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ───────────────────────────────────────────────────────────────╮ +│ chat Chat with the AI model based on the provided prompt. │ +│ generate-command Generate code for a new plugin command based on the │ +│ provided prompt. │ +╰──────────────────────────────────────────────────────────────────────────╯ +``` -![img_3.png](img_3.png) +``` +❯ yoda dev --help + + Usage: yoda dev [OPTIONS] COMMAND [ARGS]... + +╭─ Options ────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰──────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ───────────────────────────────────────────────────────────────╮ +│ checksite Check if a site is up and running │ +│ coinflip Flip a coin! │ +│ generatepassword Generates a secure password │ +│ speedtest Test your internet connection │ +│ whois Check whois info for a domain name │ +╰──────────────────────────────────────────────────────────────────────────╯ +``` ### Write your own plugin for Yoda @@ -121,7 +164,12 @@ def weather(location: str, units: Optional[str] = None): ``` .. or chat with Yoda: -![img_5.png](img_5.png) + +```bash +❯ yoda ai chat "How are you?" +🤖 AI response: +I am well, young one. The Force is strong with me. +``` ## Development setup diff --git a/docs/docs/modules.md b/docs/docs/modules.md deleted file mode 100644 index 36a235a..0000000 --- a/docs/docs/modules.md +++ /dev/null @@ -1,3 +0,0 @@ -# Modules - -::: yodapa.config.ConfigManager diff --git a/docs/docs/pluginlist.md b/docs/docs/pluginlist.md new file mode 100644 index 0000000..58931d3 --- /dev/null +++ b/docs/docs/pluginlist.md @@ -0,0 +1,75 @@ +``` +❯ yoda --help + + Usage: yoda [OPTIONS] COMMAND [ARGS]... + +╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ --install-completion Install completion for the current shell. │ +│ --show-completion Show completion for the current shell, to copy it or customize the installation. │ +│ --help Show this message and exit. │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ ai AI command. Allows you to communicate with your local LLMs │ +│ config Config management │ +│ dev │ +│ init Init yoda configurations │ +│ plugin Commands to manage plugins │ +│ url │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +``` + +## AI + +> Requires local LLM setup using [ollama](https://ollama.com/) + +``` +❯ yoda ai --help + + Usage: yoda ai [OPTIONS] COMMAND [ARGS]... + + AI command. Allows you to communicate with your local LLMs + +╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ chat Chat with the AI model based on the provided prompt. │ +│ generate-command Generate code for a new plugin command based on the provided prompt. │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +``` + +## Dev tools + +``` +❯ yoda dev --help + + Usage: yoda dev [OPTIONS] COMMAND [ARGS]... + +╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ checksite Check if a site is up and running │ +│ coinflip Flip a coin! │ +│ generatepassword Generates a secure password │ +│ speedtest Test your internet connection │ +│ whois Check whois info for a domain name │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ + +``` + +## URL shortner + +``` +❯ yoda url --help + + Usage: yoda url [OPTIONS] COMMAND [ARGS]... + +╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ expand Get expanded URL from short name │ +│ shorten Store URL as a short name │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +``` \ No newline at end of file diff --git a/docs/docs/plugins.md b/docs/docs/plugins.md index c8b0b10..4e7c074 100644 --- a/docs/docs/plugins.md +++ b/docs/docs/plugins.md @@ -1,9 +1,40 @@ # Plugin Management -## Decorator +## Commands -::: yodapa.plugin_manager.decorator +``` +❯ yoda plugin --help + + Usage: yoda plugin [OPTIONS] COMMAND [ARGS]... + + Commands to manage plugins + +╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ --help Show this message and exit. │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ disable Disable a plugin │ +│ enable Enable a plugin │ +│ list List all available plugins │ +│ refresh Re-discovers all available plugins and enables them │ +╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -## Plugin Manager +❯ yoda plugin list + Yoda Plugins +┏━━━━━━━━┳━━━━━━━━━┓ +┃ Name ┃ Enabled ┃ +┡━━━━━━━━╇━━━━━━━━━┩ +│ config │ Yes │ +│ plugin │ Yes │ +│ ai │ Yes │ +│ bye │ No │ +│ dev │ Yes │ +│ hi │ No │ +│ url │ Yes │ +│ dummy │ No │ +└────────┴─────────┘ +``` -::: yodapa.plugin_manager.plugin.PluginManager +## Docs + +::: yodapa.core.plugin diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 779f615..8ffba5f 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -27,8 +27,9 @@ plugins: nav: - Home: index.md - Documentation: - - Plugins: plugins.md - - Modules: modules.md + - Config Management: config.md + - Plugin Management: plugins.md + - Plugin list: pluginlist.md - About: - Contributors: contributors.md - License: license.md \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6b60a51..e9239cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "yodapa" -version = "2.0.1" +version = "2.0.2" description = "Personal Assistant on the command line" authors = ["Man Parvesh Singh Randhawa "] license = "MIT"