IPython is All You Need

18 points by ncoop57 a day ago on lobsters | 10 comments

ab5tract | a day ago

Honestly pretty confused by this post. What does an LLM have to do with using IPython as a shell?

Edit: it hardly sounds like IPython is “all you need” if you also need an OpenAI API key.

sigmonsez | a day ago

this post is missing so much and adding too much all at the same time. Is this AI SLOP !?!?

The gist I get is enable %rehashx in python to get command aliases created from $PATH

but what if I change PATH or ya know, add a command to PATH after running %rehashx or source a file..

It does not behave like a shell at all this page is honestly too long for me to read since I got very little from its verbosity. Can anyone with more time explain what the main purpose of this article was?

jbeckford | 22 hours ago

It doesn’t read like AI slop to me.

The important part is 2/3 down the page. After printing a picture of a cat to the terminal using ipython (scroll until you see the cat), the next ipython input ":What do you see?" calls a multimodal LLM that interprets your ipython session and spits out that it sees a cat.

The technique on that page is an interesting way to interact with LLMs. Having a full Python interpreter available so you can mix and match precision (Python statements) and power (LLM queries) deserves a look.

If the author is reading this, putting the cat example at the top will help readers understand what makes your contribution unique. And condense the dialogue, or intersperse the dialogue throughout your ipython session.

KnorrFG | 21 hours ago

what is the startup time of opening a new terminal? Did you chsh to ipython?

kraxen72 | 17 hours ago

interesting. imo there's too many moving parts to set up as described in the post, but the end result is undeniably useful and a nice qol experience, esp if you're a ml eng./data scientist/work with numpy/matplotlib/pandas a lot. i wonder if there's significant benefits to this over just using xonsh.

having an ai agent in the terminal is also undeniably useful, and dangerous! esp. with allow/denylist based security instead of proper sandboxing. that's why i prefer running my agents in devcontainers (docker/podman containers w a declarative config on top), but for having the agent configure the system, that doesn't really work. in that case, i find that whatever ml-based classifiers and manual auto-approval the cli/tui harnesses ship with are ultimately going to be much less risky that whatever OP is suggesting.

pbronez | 11 hours ago

The author recommends ipyai as a packaged solution in the conclusion:

If everything above made you think, "This is such a good idea!" then you should check out ipyai. It is a library Jeremy made that take many of these bits and build a proper Intelligent IPython Shell. If you've used Answer.AI's SolveIt platform, you'll find it surprisingly similar, but in the terminal.

jrwren | 11 hours ago

sure bruh, and also: bash is all you need.

and also: korn shell is all you need.

and also: csh is all you need.

and also: dash is all you need.

pbronez | 11 hours ago

cool idea! I recently circled back to iPython after a while away. Lots of little features that will take time to re-learn.

I might try using this instead of fish for a bit. Native AI integration is, honestly, pretty interesting when combined with a more structured history. Scary from a security perspective, but that's perhaps mitigated with local ai. Should be straightforward to spin up a local model in the background on first call...

This is a fun idea. It seems IPython used to support this usecase, but they recommend "xonsh" instead now:

https://ipython.readthedocs.io/en/stable/interactive/shell.html

pbronez | 11 hours ago

Cool, first I heard of xonsh. The meta-shell features are interesting... several solutions that give you a xonsh shell on a remote machine without installing xonsh there. That's always been a big challenge with fancy shells; you build the muscle memory but it only helps you on boxes you pre-configure.