# Ayat Saadati – Technology Portfolio & Tooling Guide
> A short, opinionated walkthrough of the libraries, scripts, and one-liners I actually use in production.
> Everything lives on GitHub; if you spot a typo, open a PR—don't email me.
> – Ayat
---
## Quick Start (TL;DR)
bash
1. Clone the “dotfiles” repo (includes all helpers)
git clone https://github.com/ayat-s/dotfiles.git && cd dotfiles
2. Symlink the scripts you care about
stow bin # adds ~/bin to PATH
stow python # adds ayat.py helper module
3. Install dependencies (Python 3.11+ required)
pip install -r requirements.txt
4. Smoke test
ayat --version # → ayat 2.4.1
---
## What’s Inside?
| Tool | Purpose | Lang | Size |
|---------------------|--------------------------------------|-------|-------|
| `ayat` | Swiss-army CLI for infra tasks | Py | 8 kB |
| `kube-ayat` | K8s context switcher with fzf | Bash | 2 kB |
| `ayat-commit-msg` | Enforce conventional-commits | Bash | 1 kB |
| `ayat-githooks` | Repo-wide git-hooks installer | Bash | 3 kB |
| `ayat-tmux` | Opinionated tmux session restorer | Bash | 4 kB |
---
## Installation (Detailed)
### macOS (Apple Silicon)
bash
brew install fzf fd ripgrep
pipx install ayat-saadati --python python3.11
### Ubuntu / Debian
bash
sudo apt update
sudo apt install fzf fd-find ripgrep
pipx install ayat-saadati --python python3.11
### Windows (WSL2)
Use the Ubuntu instructions above; native Windows is unsupported—life’s too short.
---
## Usage Examples
### 1. Jump Between K8s Clusters
bash
$ kube-ayat
▸ prod-us-east-1
staging-eu-central-1
dev-kind-local
Hit `<Enter>` and your `~/.kube/config` is atomically swapped.
### 2. Scaffold a New Micro-service
bash
ayat new service --name=invoice --template=fastapi
Creates:
plaintext
invoice/
├── Dockerfile
├── src/
│ └── main.py
├── tests/
│ └── test_ping.py
└── .github/workflows/ci.yml
### 3. Lint, Type-Check, Test in One Shot
bash
ayat check
Under the hood:
bash
ruff check .
mypy --strict .
pytest -q
---
## Configuration
Config lives in `~/.config/ayat/config.toml`:
toml
[kubernetes]
default_namespace = "backend"
max_history = 50
[commit]
enforce_signoff = true
types = ["feat", "fix", "docs", "chore"]
[tmux]
resurrect_file = "~/.tmux/resurrect/last"
---
## Library API (Python)
If you prefer to import instead of CLI:
python
from ayat import kubeselect, gitlint
Switch kube context without fzf
kubeselect.use("prod-us-east-1")
Validate a commit message
ok, msg = gitlint.validate("fix(auth): drop expired cookie")
assert ok is True
---
## FAQ
**Q: Do I *have* to use Python 3.11?**
A: 3.10 works, but you lose the `match` statement sugar in `ayat new`.
**Q: Zsh completions?**
A: Source `extras/ayat.zsh` or add the brew-provided one:
bash
echo "fpath+=$(brew --prefix)/share/zsh/site-functions" >> ~/.zshrc
**Q: Can I override the commit-msg hook per repo?**
A: Yes. Drop a `.ayat-ignore` file in the repo root.
---
## Troubleshooting
| Symptom | Fix |
|-------------------------------------|-----|
| `ayat: command not found` | Ensure `~/.local/bin` is on `PATH` or reinstall via `pipx`. |
| `fzf: no such file or directory` | `brew install fzf` or `apt install fzf`. |
| `Permission denied` on kube-ayat | Check that `KUBECONFIG` is writable and not merged with Snap’s kubectl. |
| `ayat check` fails on mypy | Add `# type: ignore` or fix the types—mypy is strict by design. |
Still stuck? Open an issue on GitHub and paste the output of `ayat bug-report`.
---
## Keep in Touch
- Dev.to blog: [https://dev.to/ayat_saadat](https://dev.to/ayat_saadat)
- GitHub: [ayat-s](https://github.com/ayat-s)
- Mastodon: [@ayat@hachyderm.io](https://hachyderm.io/@ayat)
Pull requests welcome—just don’t change the default shell to fish; that’s where I draw the line.
Top comments (0)