惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
S
SegmentFault 最新的问题
V
Visual Studio Blog
J
Java Code Geeks
宝玉的分享
宝玉的分享
美团技术团队
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hackread – Cybersecurity News, Data Breaches, AI and More
有赞技术团队
有赞技术团队
量子位
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
Google DeepMind News
Google DeepMind News
Jina AI
Jina AI
博客园 - 叶小钗
月光博客
月光博客
P
Proofpoint News Feed
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
博客园_首页
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
Stack Overflow Blog
Stack Overflow Blog

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
Talking to My Terminal with Local Speech-to-text and Pi C...
Prashant Anand · 2026-06-18 · via Hacker News: Show HN

I set up two terminal commands I can talk to, , and q. I enter , in terminal, hit Enter, say what I want, it gives me back the shell command. With q command, I ask a question out loud, and an LLM answers it (and can read files on disk to do so).

This is what it looks like in practice:

I saw this post by Python Monty about wiring up these two terminal commands:

  • , <description> to get a shell command based on your description

  • q <question> to have an LLM answer your question

This setup uses the Pi coding agent under the hood. After configuring these commands, we can do things like the following:

, find the 5 largest files in the current directory

q read run-qwen36-q8.sh and summarize what it does in 3 bullet points

I immediately found this useful for quick shell commands and questions cause I didn't have to launch a full coding-agent session in Pi or Claude or open a web UI.

Now, I'm a big fan of speech-to-text and I use voice typing for all my interactions with LLMs and coding agents. I have built this hns CLI tool for speech-to-text in the terminal. hns writes the transcription to stdout so it integrates well with other CLI tools.

So, of course, I wanted to adapt the workflow suggested by Python Monty so that I don't have to type anything after entering , or q. Instead, I can just speak out loud my request or question.

The transcription part of this setup runs locally on your machine. You can use local LLMs with Pi to keep the end-to-end setup on-device, or you can use remote LLMs.

Setting It Up on macOS

1. Install hns

Install hns by running uv tool install hns. By default, hns uses the base whisper model, about 145 MB in size, which is good enough for this kind of use case. So you don't need to do any other setup for hns. During the first transcription, hns automatically downloads the base model from Hugging Face. After that, transcription happens locally on your machine.

2. Install and Configure Pi

Install Pi coding agent by following the quickstart guide, then configure a provider and model. You can use a local LLM with Pi to keep your entire setup on-device. Or you can set up cloud LLM through a ChatGPT or GitHub Copilot subscription, or an API key.

3. Configure Comma Command

The , command helps you get a shell command for your use case. After setting this up, you just need to type , in the terminal, hit Enter, and start saying what you want the command to do in plain English.

Hit Enter again after you're done speaking and you'll soon see your request and then the shell command in your terminal. The shell command is also copied to the clipboard automatically, so you just need to press Cmd+V and hit Enter to execute the command.

If you're using bash or zsh, add this to your ~/.bashrc or ~/.zshrc file:

,() {
    local prompt command
    prompt=$(hns)
    printf '%s\n' "$prompt"

    command=$(pi --print --no-tools --thinking off \
        --system-prompt "Output exactly one shell command,
        the best one, with no numbering, no explanation,
        no markdown, and no backticks. Output only the raw command
        on a single line." "$prompt" 2>/dev/null)

    printf '%s' "$command" | pbcopy
    printf '%s\n' "$command"
}

If you're using fish, add this to ~/.config/fish/config.fish file:

function ,
    set -l prompt (hns | string collect)
    printf '%s\n' $prompt

    set -l command (pi --print --no-tools --thinking off \
        --system-prompt "Output exactly one shell command,
        the best one, with no numbering, no explanation,
        no markdown, and no backticks. Output only the raw command
        on a single line." $prompt 2>/dev/null | string collect)

    printf '%s' $command | pbcopy
    printf '%s\n' $command
end

Restart your terminal or source the config file, and the , command should be available in your shell.

4. Configure Question Command

The q command helps you get quick answers. I give Pi access to the read, grep, find, and ls tools for this command, so the model can answer questions based on existing knowledge or by reading and searching files on disk. Pi doesn't have a built-in web_search tool but you can configure a web-search tool yourself and make this command more capable.

After setting up this command, you can type q in the terminal, hit Enter, and then say your question aloud in plain English. Hit Enter again after you're done speaking and you'll soon see your question followed by the answer in your terminal.

If you're using bash or zsh, add this to your ~/.bashrc or ~/.zshrc file:

q() {
    local prompt
    prompt=$(hns)
    printf '%s\n' "$prompt"

    pi --print \
        --system-prompt "You are a helpful, concise assistant
        running in a macOS terminal. Answer clearly and accurately.
        You can read files from disk.
        Use this ability for file-specific information." \
        --tools "read,grep,find,ls" \
        "$prompt"
}

If you're using fish, add this to ~/.config/fish/config.fish file:

function q
    set -l prompt (hns | string collect)
    printf '%s\n' $prompt

    pi --print \
        --system-prompt "You are a helpful, concise assistant
        running in a macOS terminal. Answer clearly and accurately.
        You can read files from disk.
        Use this ability for file-specific information." \
        --tools "read,grep,find,ls" \
        $prompt
end

Restart your terminal or source the config file, and the q command should be available in your shell.

If this was useful, and you want workflows like these in your inbox, subscribe below. Thanks!