[HN Gopher] TmuxAI: AI-Powered, Non-Intrusive Terminal Assistant
___________________________________________________________________
TmuxAI: AI-Powered, Non-Intrusive Terminal Assistant
Author : iaresee
Score : 100 points
Date : 2025-04-27 15:35 UTC (7 hours ago)
(HTM) web link (tmuxai.dev)
(TXT) w3m dump (tmuxai.dev)
| iaresee wrote:
| 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.
| alvinunreal wrote:
| 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.
| malux85 wrote:
| > 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
| tough wrote:
| tokens also cost money unless running locally
| mathfailure wrote:
| Is it a locally running model?
| gglon wrote:
| It seems like a model is not included; you need to set an API
| endpoint in a configuration https://tmuxai.dev/getting-
| started#environment-variables
| mathfailure wrote:
| Then why would anyone let this thing into their terminal..?
| dcre wrote:
| You can point it at any API you want, including local. The
| tool is agnostic, like nearly all such tools.
| kurtis_reed wrote:
| it sees the visible contents of panes or the previous lines too?
| alvinunreal wrote:
| It sees by default 200 lines from each pane, can be changed
| with max_capture_lines config parameter.
|
| You can also override during session, with: /config set
| max_capture_lines 1000 - to increase capture lines for the
| current session only.
| smallpipe wrote:
| TIL that `head -5` is equivalent to `head -n 5`, and that's not
| in the manual
| jclulow wrote:
| Depends on which manual you read; e.g., it's documented in
| https://illumos.org/man/1/head
| ksala_ wrote:
| It's called out as obsolete in the coreutils documentation, htt
| ps://www.gnu.org/software/coreutils/manual/html_node/head...,
| which probably explains the lack of references in the manual
| inciampati wrote:
| 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!
| kristopolous wrote:
| 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!
| jarbus wrote:
| Just wanted to say I love this, didn't known I needed this
| until now.
| kristopolous wrote:
| There's this new thing I'm currently working on. I have a
| tool that does a clean execvp of what you pass it through, as
| a total wrapper.
|
| You can do ./tool "bash" and then open up nvim, emacs, do
| whatever, while the tool sits there passing things back and
| forth cleanly. Full modern terminal support.
|
| Now here's the thing. You get context. Lots of it. Here's
| what it can do: psql# <ctrl-x - the tool
| sees this, looks at the previous N I/O bytes and reverses
| video to symbolize it's in a mode> I need to join the users
| and accounts table <enter>
|
| Then it knows from the PPID chain you're in postrgresql, it
| knows the output of previous commands, it then sends that to
| an llm, which processes it and gives you this
| psql# I need to join the users and accounts table [
| select * from users as u ... (Y/n) ]
|
| Then it shows it. Here's the nice thing. You're STILL IN THE
| MODE and now you have more context. You can get out of it at
| any time through another ctrl-x toggle.
|
| This way it follows you throughout your session and you can
| selectively beckon the LLM at your leisure, typing in english
| where you need to.
|
| SSH into a host and you're still in it. Stuck in a weird
| emacs mode? Just press the hotkey and the i/o gets redirected
| as you ask the LLM to get you out.
|
| But more importantly this is generic. It's a tool that allows
| you to intercept terminal session context windows and inject
| middleware, generically and then tie it to hotkeys.
|
| As a result it works with _any_ shell, inside of tmux,
| outside, in the vscode terminal, wherever you want... and you
| can make as many tools for it as you want.
|
| I think it's fundamentally a new unix primitive. And I'm
| someone that researches this stuff
| (https://siliconfolklore.com/scale/ is a conference talk I
| gave last year).
|
| If you know of anything else that's like this please tell me
| I haven't been able to find it.
|
| Btw you cannot do this through pipes, the input of the left
| process isn't available to the piped process on the right.
| You can intercept stdin but you don't get the input file
| descriptor of the left process. The shell starts two
| processes at the time and then passes things through so you
| can't even use PPID cleanly without heuristic guessing. Trust
| me. I tried doing things this way many times. That's why
| nothing else works like this, you need new tricks.
|
| I intend to package this up and release it in the next few
| days.
| rane wrote:
| Maybe if you could explain what exactly is happening in the
| savebrace example because it's not clear how it relates to
| this.
| dimatura wrote:
| 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.
| mkbelieve wrote:
| Uninstalled warp, as the whole thing felt clunky and slow, and
| never even turned on the AI. You can accomplish everything it
| does with zsh + plugins without much fuss.
| daft_pink wrote:
| I moved away from Warp as well... to Ghostty. I didn't find I
| got much benefit from Warp.
| dcreater wrote:
| Same it performs like an electron app. And the whole must
| login thing soured me from the start. I don't need SaaS
| practices for the terminal and I don't trust that they aren't
| snooping either.
| dr_kretyn wrote:
| 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
| jph00 wrote:
| 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...
| rcarmo wrote:
| 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.
| make3 wrote:
| I wish you could use Cursor in Terminal mode, eg I press a
| button, a Cursor window opens with the terminal tab taking up
| all the space. That way we could just reuse Cursor's special+k
| and special+l instead of having to have a different app with
| the same functionality
| atsaloli wrote:
| 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.
___________________________________________________________________
(page generated 2025-04-27 23:00 UTC)