from Hacker News

TmuxAI: AI-Powered, Non-Intrusive Terminal Assistant

by iaresee on 4/27/25, 3:35 PM with 65 comments

  • by kristopolous on 4/27/25, 6:49 PM

    I've got a similar approach from a Unix philosophy.

    Look at the savebrace screenshot here

    https://github.com/kristopolous/Streamdown?tab=readme-ov-fil...

    There's a markdown renderer which can extract code samples, a code sample viewer, and a tool to do the tmux handling and this all uses things like fzf and simple tools like simonw's llm. It's all I/O so it's all swappable.

    It sits adjacent and you can go back and forth, using the chat when you need to but not doing everything through it.

    You can also make it go away and then when it comes back it's the same context so you're not starting over.

    Since I offload the actual llm loop, you can use whatever you want. The hooks are at the interface and parsing level.

    When rendering the markdown, streamdown saves the code blocks as null-delimited chunks in the configurable /tmp/sd/savebrace. This allows things like xargs, fzf, or a suite of unix tools to manipulate it in sophisticated chains.

    Again, it's not a package, it's an open architecture.

    I know I don't have a slick pitch site but it's intentionally dispersive like Unix is supposed to be.

    It's ready to go, just ask me. Everyone I've shown in person has followed up with things like "This has changed my life".

    I'm trying to make llm workflow components. The WIMP of the LLM era. Things that are flexible, primitive in a good way, and also very easy to use.

    Bug reports, contributions, and even opinionated designers are highly encouraged!

  • by arkasan on 4/28/25, 1:43 AM

    Had a terrible experience with warp. I personally don't use warp, but I know one colleague who uses it. One day, he ran `kubectl describe <resource> <resource name>` and warp suggested `kubectl delete <resource> <resource name>` and he pressed enter. He was lucky the resource was not critical and could be recreated without any damage. Think about what would have happened if the same thing had happened for the namespace resource. People go into automatic accept mode after some time, and this is very dangerous when you do anything at the terminal, because there is no UNDO button.
  • by protocolture on 4/28/25, 12:02 AM

    My first instinct is that this is super useful.

    But then I realise that I do enough sensitive stuff on the terminal that I don't really want this unless I have a model running locally.

    Then I worry about all the times I have seen a junior run a command from the internet and bricked a production server.

  • by malux85 on 4/27/25, 5:43 PM

    > TmuxAI » I'll help you find large files taking up space in this directory.

    Get rid of this bit, so the user asks question, gets command.

    Make it so the user can ask a follow up question if they want, but this is just noise, taking up valuable terminal space

  • by amelius on 4/28/25, 11:41 AM

    Instead of showing:

        Do you want to execute this command? [Y]es/No/Edit
    
    perhaps also add an "Explain" option, because for some commands it is not immediately obvious what they do (or are supposed to do).
  • by iaresee on 4/27/25, 3:35 PM

    A WIP but evolving, it watches your active tmux panes and allows you to work with AI agents who can interact with those panes. For command line folk, this could feel like a pretty good way to bring AI in to your working life.
  • by rcarmo on 4/27/25, 10:21 PM

    I already use aider and VS Code Agent Mode (which occasionally asks me to run commands for libraries, etc.)

    This seems… like an amazing attack vector. Hope it integrates with litellm/ollama without fuss so I can run it locally.

  • by eranrund on 4/28/25, 6:22 PM

    This looks interesting and I’m eager to try it, but my concern is this could easily send sensitive information such as API keys I paste to my terminal to the AI providers. How do you remedy that?
  • by rpigab on 4/28/25, 12:57 PM

    I would usually alt-tab to browser, open up any good LLM in 1 keystroke, write a short prompt, optionally paste the output of "ls" or "find" if context matters, then just copy and paste the result. This tool adds context but I'm fine without it.
  • by dimatura on 4/27/25, 6:59 PM

    The "non-intrusive" part is interesting. I've bit the bullet with AI assistance when coding - even when it feels like it gets in the way sometimes, overall I find it a net benefit. But I briefly tried AI in the shell with the warp terminal and found it just too clunky and distracting. I wasn't even interested in the AI features, just wanted to try a fancy new terminal. Not saying warp might not be useful for some people, just wasn't for me. So far I've found explicitly calling for assistance with a CLI command (I've used aichat for this, but there's several out there) to be more useful in those occasional instances where I can't remember some obscure flag combination.
  • by rawoke083600 on 4/28/25, 9:21 AM

    I do love this, but haven't managed to actually try it out. ( I stopped trying and moved on)

    But well done for launching (the following is not hate, but onboarding feedback)

    Who else had issues about API key ?

    1. What is a TMUXAI_OPENROUTER_API_KEY ?? (is like an OPENAI key) ?

    2. If its an API key for TMUXAI ? Where do I find this ? Can't see on the website ? (probably haven't searched properly, but why make me search ?)

    3. SUPER simple instructions to install, but ZERO (discoverable) instructions where/how to find and set API key ??

    4. When running tmuxai instead of telling me I need an API key. How about putting an actual link to where I can find the API key.

    Again well done for launching... sure it took hard word and effort.

  • by dr_kretyn on 4/27/25, 7:24 PM

    Interesting. I've been working on a similar project, though with more 'agentic' workflow. It's also in golang, CLI-native but also supports MCP and "just finishing" 'agentic tasks'. Potentially a nice overlap :) https://github.com/laszukdawid/terminal-agent
  • by zipping1549 on 4/28/25, 3:40 AM

    LLM + Terminal integration just calls for disaster.
  • by jph00 on 4/27/25, 9:24 PM

    Shellsage has provided this functionality for quite a while. I've been using it for months, and it's been a game-changer for me.

    It was created by one of my colleagues, Nathan Cooper.

    https://www.answer.ai/posts/2024-12-05-introducing-shell-sag...

  • by inciampati on 4/27/25, 6:36 PM

    Just got this running. It took a minute to figure out "where the config file is" but once I got it set up with openrouter keys... wow! This plus speech to text = Look ma no hands!
  • by jmdots on 4/27/25, 11:11 PM

    I would want the command to be shorter in `wc -c` terms -- but cool!
  • by porcoda on 4/28/25, 12:26 AM

    Can this be aimed at ollama or some other locally hosted model? It wasn’t clear from the docs since their config examples seem to presume you want to use a third party hosted API.
  • by sepositus on 4/28/25, 4:42 AM

    So I have yet to use any tool that needs an API key because I am concerned about costs. Does anyone have any idea what the daily usage of something like this would cost?
  • by alvinunreal on 4/27/25, 3:42 PM

    Thanks iaresee! Yes, the non-intrusive observation of panes is the central idea, trying to integrate AI help without breaking the command-line workflow.

    Appreciate the feedback as it evolves.

  • by poulpy123 on 4/28/25, 10:44 AM

    Just curious: why specifically tmux and not any terminal ?
  • by atsaloli on 4/27/25, 10:40 PM

    Can I use it with Perplexity API without going through OpenRouter API? I want to try it but I don't want to go through a third party.
  • by smallpipe on 4/27/25, 6:29 PM

    TIL that `head -5` is equivalent to `head -n 5`, and that's not in the manual
  • by neuroelectron on 4/28/25, 11:41 AM

    I feel like heuristics would be a much better way to do this. Just an "newb assassitmant" with a long list of useful commands but I guess this frees up expert's time from doing something so boring.
  • by pjmlp on 4/28/25, 5:56 AM

    This would be interesting, if voice controled, all this lengthy prompt texts make COBOL feel like a pleasant language.
  • by mathfailure on 4/27/25, 6:16 PM

    Is it a locally running model?
  • by kurtis_reed on 4/27/25, 6:19 PM

    it sees the visible contents of panes or the previous lines too?