Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

lazy-alias: my shell history writes my aliases, with a 1.5B model on my CPU

Описание и применение

lazy‑alias автоматически извлекает частые многократные команды из истории bash, генерирует имена‑алиасы с помощью модели Qwen, сохраняет их в TimescaleDB с векторными эмбеддингами и позволяет находить забытые алиасы по смыслу.

Задача

Users repeatedly type multi‑step shell commands and forget the names of the aliases they create for them.

Результат

On a synthetic 30‑day history, lazy‑alias identified four frequent multi‑step habits, reducing 147 retyped commands to single‑word aliases and enabling semantic retrieval of forgotten aliases.

Рабочий процесс

  • 1. ingest bash history into a TimescaleDB hypertable
  • 2. use SQL window functions to pair commands within 5‑minute gaps and count frequent 2‑ or 3‑step sequences
  • 3. run Qwen2.5‑1.5B‑Instruct via llama.cpp on CPU to generate a name and description for each sequence
  • 4. sanitize and store approved aliases with a tsvector and a 384‑dim all‑MiniLM‑L6‑v2 embedding in pgvector
  • 5. provide a find command that performs hybrid keyword + vector search with reciprocal‑rank fusion to retrieve aliases by meaning or keyword

Доказательства

lazy‑alias reads your bash history, finds the 2-3 step command sequences you keep retyping, and asks a small open‑weight model running on your CPU to name each one as a shell function.

Источник

It returns JSON with a name and a one‑line description; the name is sanitized into a valid, unique shell identifier.

Источник

Each approved function is stored with a tsvector and a 384‑dim all‑MiniLM‑L6‑v2 embedding in a pgvector column.

Источник

On the demo history, lazy‑alias found four habits… That's 147 multi‑step retypes that become one word each.

Источник

  • Дата записи: 2026-10-26T04:26:13.360Z