# Ayo's Scripts BASH scripting. Escalated quickly. ## Setup 1\. Clone repo ``` bash # By default this should be inside ~/Projects/ directory # otherwise, you have to update the config in the next step $ git clone git@git.sr.ht:~ayoayco/scripts $ cd scripts ``` 2\. Copy config (and update values as needed!) ``` bash $ cp example.conf ~/ayo.conf ``` 3\. Install some dependencies 1. [Typora](https://typora.io) - used as an alternative editor for notes (using flag `-t`) 1. `timeout` - install on mac via coreutils: `brew install coreutils` 1. `ollama` - running a locall LLM via ollama. See [installation on linux](https://ollama.com/download/linux) 4\. update your `.bashrc` to add a `yo` alias for the parent command `scripts/ayo.sh` ``` bash alias yo='~/Projects/scripts/ayo.sh' ``` ## Tasks The `tasks` app uses a `tasks_dir` variable in the configuration file. It looks for plain text files that follow the task template. The template is a single source of truth that defines a task's shape. Its location is set by the `tasks_template` config variable, which is derived from `tasks_dir` (default `${tasks_dir}/_TEMPLATE.md`). `tasks` renders every new task from it (auto-creating it with a sensible default the first time it is missing); edit that file to change what new tasks look like. Its frontmatter fields are: - `id` — stable creation-stamped handle, never changes on later renames - `title` — one-line task title - `priority` — `P0` urgent · `P1` high · `P2` normal · `P3` someday - `context` — `@code` · `@calls` · `@errand` · `@home` · `@admin` · `@waiting` - `project` — optional ID(s) of related project(s) - `created` — creation date - `links` — related tasks or output files The tasks text files need to be in one of the status directories: `backlog`, `next`, `in-progress`, or `done`. Status is the folder a task lives in, and the filename's date is its last-updated date. After setting the `tasks_dir` variable in the configuration file `ayo.conf` and an alias to `ayo.sh` with `yo` in your `.bashrc` file, you can run the app with `yo tasks`. Beyond the interactive TUI, `tasks` also has headless subcommands for scripting: `list`, `show`, `new`, and `move` (run `yo tasks help` for the full usage). ## Examples To ask the AI a question ``` yo ai "Why is the sky blue?" ``` If I want to use the `journal` script, I can use the shortcut `j`. The following will create a new file for the current day if it doesn't exist yet, otherwise it open an editor to the existing entry ``` yo j ``` ## Features 1. Create journal entry for the day, or edit if it already exists 1. Access `ollama` LLM with ease 1. Operating System stuff like, update packages, adjust display to some preferences, etc. ## Scripts 1. ayo.sh (`yo`) - parent command, lists all available scripts or accepts parameters 1. journal (j) - creates a new journal entry if it doesn’t exist yet; opens on editor 1. append (ja) - append one thought at the end of the day's entry 1. notes - notes management 1. git (g) - args can be list of files to commit & push 1. stat (gs) - git status 1. push (gp) - git push ## Planned 1. blog - tools for blogging (eg, bn - generate blog from a note) 1. config - create configuration for variables (eg, editor, locations) --- *Just keep scripting. :)* *A project by [Ayo](https://ayo.ayco.io)*