Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Support for REPLs

Open dannyneira opened this issue 1 year ago • 15 comments

Describe the solution

** Support for the running list of non-shell based REPLs without Warp features ( i.e. Blocks, Autocomplete) **

irb, ipython, pipenv, psql, node, mongosh, rails, julia, iex, nix-shell, etc.

How does this Feature request thread work?

We've included comments below for each of the REPLs that has been requested, please 👍 each comment to signal interest in that REPL.

If the REPL isn't on the list, please add a comment for it along with a brief description of the REPL in a similar format (e.g. "Support REPL command: REPL description")

Subscribe to get updates on the status of this request, the Warp team will post any comments if one of the REPLs support is being worked on.

Please avoid commenting with the same REPLs, or comments like "+1 for ipython" as they create spam on the thread.

Note this is a different issue than support for shell-based "subshells", which we launched and you can learn more about here.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support irb: Interactive Ruby (IRB) is a REPL for the Ruby programming language. It allows you to interactively execute Ruby code and see the results immediately.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support ipython: IPython is an enhanced interactive shell for Python. It provides additional features and improvements over the default Python REPL, such as syntax highlighting, tab completion, and support for running shell commands.

Show support for ipython REPL on the dedicated issue https://github.com/warpdotdev/Warp/issues/4400

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support pipenv: pipenv is a tool for managing Python virtual environments and package dependencies. It combines the functionality of pip (the package installer for Python) and virtualenv (a tool for creating isolated Python environments) into a single command-line interface.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support psql: psql is the interactive terminal for PostgreSQL, a popular open-source relational database management system. It allows you to execute SQL queries, manage databases, and interact with the PostgreSQL server.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support node: node is the command-line interface for running JavaScript code using Node.js. It provides an interactive environment where you can execute JavaScript code and experiment with Node.js modules.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support mongosh: mongosh is the official MongoDB Shell, which provides an interactive environment for working with MongoDB databases. It allows you to execute queries, perform CRUD operations, and interact with the MongoDB server.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support rails: Rails is a web application framework written in Ruby. It provides a set of tools and conventions for building web applications, including a command-line interface (CLI) that allows you to generate code, run migrations, and start a development server.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support nix-shell: nix-shell is a command-line tool for creating and managing isolated development environments using the Nix package manager. It allows you to define a set of dependencies and configurations in a Nix expression, and then launch a shell with those dependencies available.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support julia: Julia is a high-level, high-performance programming language for technical computing. It is designed to be fast and efficient while providing a syntax that is familiar to users of other technical computing environments. Julia also comes with its own REPL, which is called the Julia REPL. It allows you to interactively write and execute Julia code.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Support iex: iex stands for Interactive Elixir. It is the REPL for the Elixir programming language. It provides an interactive environment for writing and executing Elixir code. IEx is specifically designed for Elixir and offers features like code evaluation, tab completion, documentation lookup, and shell command execution.

dannyneira avatar Jan 17 '24 18:01 dannyneira

Hopefully, it includes support of REPLs inside of subshells (e.g. calling irb when inside k8s instance)

mib32 avatar Jan 18 '24 11:01 mib32

Support duckdb: it's based on the SQLite command line shell, so CLI-client-specific functionality is similar to what is described in the SQLite documentation although DuckDB’s SQL syntax follows PostgreSQL conventions.

JonathanDCohen avatar Jan 18 '24 21:01 JonathanDCohen

Support clojure / clj: the official REPL for the Clojure programming language. It provides an interactive environment for executing Clojure code.

kennyjwilli avatar Feb 10 '24 19:02 kennyjwilli

Hey there, I'm an IPython dev. I'd love to learn how to make IPython work well with warp (protocols, etc.).

rgbkrk avatar Feb 16 '24 23:02 rgbkrk

i've been working on rewriting bun repl (javascript repl). something i've been wondering about from the perspective of a TUI application developer, is possible to integrate into warps subshell into it, where my terminal application can send and recieve events for things like auto-completion.

i noticed that for bash there is this special message warp can use to activate a subshell

print '\eP$f{ "hook": "SourcedRcFileForWarp", "value": { "shell": "bash" } }\x9c'

which triggers some magic internally, likely specifically designed for warps integration with bash.

it would be very cool if this could be used by a TUI application developer to deeply integrate the blocks and autocomplete feature into the application. but unfortunately, i dont think it is yet possible to do any custom integrations. the warp docs do not seem to have any technical information about what "warpify" actually does; it seems to be a private protocol that outsiders are not meant to use.

it would be very cool to have something like:

print '\eP$f{ "hook": "InitShell", "value": { "shell": "custom" } }\x9c'

along with many other input and output escape sequences to communicate rich terminal features like blocks and request.

is something like this in scope for this issue? or should i raise a separate issue for this "custom" shell integration.

paperclover avatar Feb 18 '24 12:02 paperclover

Support mycli: a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.

rodbecc avatar Feb 25 '24 15:02 rodbecc

Support bun repl: Bun is an all-in-one toolkit for JavaScript and TypeScript apps.

Show support for bun REPL on the dedicated issue https://github.com/warpdotdev/Warp/issues/4401

dannyneira avatar Feb 28 '24 21:02 dannyneira

Hey @rgbkrk & @paperdave, Thanks for reaching out and offering to help support ipython and bun repl on Warp!

We do have plans to support REPLs and a more explicitly designed and thought-out extensibility effort on the roadmap. We plan to dedicate resources to work on this later this year.

We’d love to work with you on them and we’ve opened separate issues to track support for each REPL here. ipython and bun.

We’ll also link them in the meta issue for REPL support so that users can track the progress. Please feel free to reach out with any comments or concerns on the respective issues.

dannyneira avatar Feb 28 '24 22:02 dannyneira

Support radian: an alternative console for the R program with multiline editing and rich syntax highlight. One would consider radian as a ipython clone for R, though its design is more aligned to julia.

mcmahanp avatar Mar 05 '24 15:03 mcmahanp

Its not clear to me the scope of the REPL support imagined in this issue, but I could imagine some fairly fancy and awesome options. But with the "later this year" time scales, I wonder whether there is not some very simple and quick stopgap that would make things 90% usable at least? The only problem with the two I've played with (ipython and julia) is basically simply that the clear screen keyboard shortcut ("Ctrl+L") scrolls the REPL to the wrong spot, or leaves it covered up, whch is unfortunately a serious usability killer. Conversely, an explicit clear is fine, as is everything else. Maybe it would be possible to fix that in the short-term and leave more serious integration to later?

marius311 avatar Mar 06 '24 06:03 marius311

How about https://orbstack.dev/ which using orb commad to enter docker or vm?

dingtang2008 avatar Mar 21 '24 16:03 dingtang2008

If this will take a while to implement, could we at least disable blocks while a REPL is active? If you accidentally select a block (which I do all the time) it's really hard to be able to input again because the input block is selected when you click on it. I think double clicking usually works, but it's hard to remember to do that.

natebrunette avatar May 31 '24 18:05 natebrunette

Support swipl: SWI-Prolog is a popular, open source implementation of Prolog.

ridgeworks avatar Jul 11 '24 15:07 ridgeworks