Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgbase = ai-flow-cli
pkgdesc = Ultra-fast streaming AI CLI & agent for Unix terminals
pkgver = 0.11.0
pkgdesc = Fast terminal AI for Unix pipelines: wraps pi, omp, claude, codex, copilot & opencode
pkgver = 0.12.0
pkgrel = 1
url = https://github.com/Codder13/ai-flow-cli
arch = any
Expand All @@ -11,7 +11,7 @@ pkgbase = ai-flow-cli
depends = python
depends = python-rich
depends = python-pylatexenc
source = ai-flow-cli-0.11.0.tar.gz::https://github.com/Codder13/ai-flow-cli/archive/refs/tags/v0.11.0.tar.gz
source = ai-flow-cli-0.12.0.tar.gz::https://github.com/Codder13/ai-flow-cli/archive/refs/tags/v0.12.0.tar.gz
sha256sums = 4292cd8f5e36141a7347e33431491c633725ad5b2549dd8ce65aadb3d57bc62c

pkgname = ai-flow-cli
4 changes: 2 additions & 2 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Maintainer: Denis Bolba <https://github.com/Codder13>
pkgname=ai-flow-cli
pkgver=0.11.0
pkgver=0.12.0
pkgrel=1
pkgdesc="Ultra-fast streaming AI CLI & agent for Unix terminals"
pkgdesc="Fast terminal AI for Unix pipelines: wraps pi, omp, claude, codex, copilot & opencode"
arch=('any')
url="https://github.com/Codder13/ai-flow-cli"
license=('MIT')
Expand Down
71 changes: 70 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ Wraps fast headless AI harnesses (`pi`, `omp`, `claude`, `codex`, `copilot`, `op
- 🎨 **Rich Terminal Markdown & LaTeX** — renders clean markdown, tables, syntax highlighting, and math formulas in the terminal.
- 💬 **No Quotes Required** — run `ai what is the biggest object on earth` directly.
- 🚰 **Pure Unix Pipelines** — stdin context injection and clean raw text output when piped.
- 🛠️ **Tools On Demand** — pass `--tools` when agentic filesystem/system actions are needed.
- 🛠️ **Tools On Demand** — tools are on by default; `--no-tools` for plain answers.
- 🐚 **`ai do`** — natural language → one shell command, confirm `[Y/e/n]` before it runs.
- 📝 **`ai commit`** — Conventional Commit message from your staged diff, matching your repo's style.
- 🩺 **`ai explain`** — `make 2>&1 | ai explain` tells you what broke and how to fix it.
- 📂 **`-f 'src/**/*.py'`** — attach files by glob as context.
- 📋 **`-c / --copy`** — copy the answer (or just its code block) to the clipboard.
- 🧭 **Per-directory context** — `.ai.md` in a project + `~/.config/ai/context.md`, injected automatically.
- 🔎 **`ai log`** — fuzzy-search past sessions with fzf and a live preview.
- 🧾 **`--json`** — machine-readable output for scripts.
- ⌨️ **zsh widget** — type what you want, press `Ctrl+G`, get the command.

---

Expand Down Expand Up @@ -104,6 +113,58 @@ Output is automatically raw and unformatted when redirected to a pipe or file:
ai "generate a python regex for uuid4" > regex.txt
```

### 7. Shell Commands: `ai do`
```bash
ai do find files over 100MB in my home
# $ find ~ -type f -size +100M -exec ls -lh {} +
# Run it? [Y/e/n]
```
`e` lets you edit the command before running; executed commands land in your shell history.
`ai do --print ...` only prints the command (great for scripts).

### 8. Commit Messages: `ai commit`
```bash
git add -p
ai commit # shows the message → [Y]es commit / [e]dit in $EDITOR / [n]o
ai commit --print # just print it
ai commit "mention the issue #12"
```

### 9. Explain Errors: `ai explain`
```bash
cargo build 2>&1 | ai explain
journalctl -u nginx -n 50 | ai explain "why won't it start?"
```

### 10. Files as Context: `-f / --file`
```bash
ai -f 'src/**/*.luau' "where is player data saved?"
ai -f README.md -f pyproject.toml "is the install section accurate?"
```
Binary files are skipped; each file is capped at 200 KB (1 MB total).

### 11. Clipboard, JSON & Footer
```bash
ai -c "regex for an ipv4 address" # copies the code block (wl-copy/xclip/pbcopy)
ai --json "capital of France" | jq -r .response
```
A dim `harness · model · 3.2s` footer is shown on terminals. Hide it with `AI_NO_FOOTER=1`.

### 12. Session History: `ai log`
```bash
ai log # fzf picker with preview (plain list without fzf)
ai log rojo # only sessions mentioning "rojo"
ai log -a --json # everything, as JSON
```

### 13. zsh Widget
```bash
# ~/.zshrc
eval "$(ai --zsh)"
```
Type `undo last git commit but keep changes`, press **Ctrl+G** → the line becomes
`git reset --soft HEAD~1`. Review, then Enter. Change the key with `AI_ZSH_KEY`.

---

## ⚙️ Configuration
Expand All @@ -120,6 +181,14 @@ You can change it anytime via:
ai --wizard
```

### Context files
Anything in these files is prepended to every prompt (skip with `--no-context`):

| File | Scope |
|---|---|
| `~/.config/ai/context.md` | Always: who you are, your OS, preferences |
| `.ai.md` (nearest, walking up from cwd, stops at `$HOME`) | Per project: conventions, stack, commands |

---

## 📄 License
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ build-backend = "hatchling.build"

[project]
name = "ai-flow-cli"
version = "0.11.0"
version = "0.12.0"
description = "⚡ Fast, beautiful AI CLI wrapper around modern coding harnesses for Unix pipelines"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"rich>=13.0.0",
"pylatexenc>=2.10",
Expand Down Expand Up @@ -43,7 +44,7 @@ pythonpath = ["src"]
testpaths = ["tests"]

[tool.ruff]
line-length = 110
line-length = 125
target-version = "py311"

[tool.ruff.lint]
Expand Down
2 changes: 1 addition & 1 deletion src/ai_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""ai-flow-cli: terminal AI wrapper around coding harnesses for Unix pipelines."""

__version__ = "0.11.0"
__version__ = "0.12.0"
Loading
Loading