Skip to content
Closed
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ adheres to [Semantic Versioning](https://semver.org/).
defaults for Rust/Go/Python and framework-aware Node fallbacks (Next.js,
Vite). Makefile targets and Justfile recipes are merged into `scripts`
without clobbering manifest keys. `.qr.toml` can override the new fields.
- Optional agent-history mining for `qr learn` (default **off**): when
`[learn].mine_agent_history = true` (prompted during `qr init`, or
`QR_LEARN_MINE_AGENT_HISTORY=true`), learn extracts bash/exec-like commands
from Claude, Codex, Pi, omp, and OpenCode session histories for the current
project into `agent_commands` and may fill empty role fields.

### Fixed
- `qr learn` no longer treats plain `main.py` as FastAPI, invents `next lint`,
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ QuickRunner (`qr`) is a fast Rust CLI for common developer shell workflows: jump
- `qr stats` / `qr s`: aggregated command stats from a local SQLite database
- `qr scan` / `qr x`: manual project rescan
- `qr do <task>` / `qr d`: natural language → a shell command (run only after explicit confirmation) or a suggested coding-agent hand-off
- `qr learn` / `qr l`: profile the current project (language, package manager, common build/test/dev/run/debug commands, scripts) into `./.qr/profile.json`
- `qr learn` / `qr l`: profile the current project (language, package manager, common build/test/dev/run/debug commands, scripts) into `./.qr/profile.json`; optionally mines agent session histories when enabled
- `qr config` / `qr c`: open `config.toml` in your editor (`qr config path` prints its location)
- `qr doctor`: report the health and location of the config and project cache
- `qr init` / `qr i`: creates config, installs the shell wrapper, optionally stores your AI key in the OS keychain, prompts to install an hourly rescan cron (default no), and runs an initial scan
- `qr init` / `qr i`: creates config, installs the shell wrapper, optionally stores your AI key in the OS keychain, asks whether to mine coding-agent session histories during `qr learn` (default no), prompts to install an hourly rescan cron (default no), and runs an initial scan

## Install

Expand All @@ -33,7 +33,11 @@ Run `qr config path` to print the exact location:

On first run after upgrading, QuickRunner automatically migrates an existing config from the legacy location (`~/.config/qr/` on Linux, `~/Library/Application Support/qr/` on macOS) into `~/.qr/`. Set `QR_CONFIG_DIR` to override the directory (used in tests and CI).

Defaults come from [`config/default.toml`](config/default.toml). Common runtime settings also have `QR_*` environment overrides for automation and CI — e.g. `QR_PROJECT_ROOTS` (colon-separated), `QR_SCAN_DEPTH`, `QR_AI_MODEL`, and `QR_STATS_ENABLED`. See [`src/config.rs`](src/config.rs) for the supported override list.
Defaults come from [`config/default.toml`](config/default.toml). Common runtime settings also have `QR_*` environment overrides for automation and CI — e.g. `QR_PROJECT_ROOTS` (colon-separated), `QR_SCAN_DEPTH`, `QR_AI_MODEL`, `QR_STATS_ENABLED`, and `QR_LEARN_MINE_AGENT_HISTORY`. See [`src/config.rs`](src/config.rs) for the supported override list.

### Agent history mining (`qr learn`)

When `[learn].mine_agent_history = true`, `qr learn` also scans local coding-agent session stores for shell commands run in that project (Claude Code, Codex, Pi, omp, OpenCode). Matches are ranked by frequency into `agent_commands` in `.qr/profile.json`. This is **off by default** because it reads session history; `qr init` asks once, and you can flip it later in `config.toml` or with `QR_LEARN_MINE_AGENT_HISTORY=true`.

### AI key

Expand Down
6 changes: 6 additions & 0 deletions config/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ db_path = "__default__"
[do.agents]
codex = "codex --sandbox workspace-write --ask-for-approval on-request -c approvals_reviewer=auto_review exec"
claude = "claude --permission-mode auto -p"

[learn]
# When true, `qr learn` mines bash/exec commands from coding-agent session
# histories (Claude, Codex, Pi, omp, OpenCode) for the current project.
# Default off — enable during `qr init` or set QR_LEARN_MINE_AGENT_HISTORY=true.
mine_agent_history = false
Loading
Loading