Rift is open-source infrastructure for AI-native development environments. Rift makes your IDE agentic. Software will soon be written mostly by AI software engineers that work alongside you. Codebases will soon be living, spatial artifacts that maintain context, listen to, anticipate, react to, and execute your every intent. The Rift Code Engine implements an AI-native extension of the language server protocol. The Rift VSCode extension implements an client and end-user interface which is the first step into that future.
rift.mp4
Conversational code editing
Codebase-wide edits
Contextual codebase generation
- Press Command+K to focus the Rift Omnibar.
- Once focused, you can either engage with the current chat or use a slash-command (e.g.
/aider
) to spawn a new agent.
- Once focused, you can either engage with the current chat or use a slash-command (e.g.
- Each instance of a Rift Chat or Code Edit agent will remain attached to the open file / selection you used to spawn it.
- To switch to a new file or request a code edit on a new selection, spawn a new agent by pressing Command+K and running a slash-command (e.g.
/edit
) - Both Rift Chat and Code Edit see a window around your cursor or selection in the currently active editor window. To tell them about other resources in your codebase, mention them with
@
. - Code Edit
- To switch to a new file or request a code edit on a new selection, spawn a new agent by pressing Command+K and running a slash-command (e.g.
- You can
@
-mention files and directories to tell your agents about other parts of the codebase. - Currently, Rift works best when the active workspace directory is the same as the root directory of the
git
project. - Command+Shift+P -> "Rift: Start Server" restarts the server if it has been auto-installed.
Install the VSCode extension from the VSCode Marketplace. By default, the extension will attempt to automatically start the Rift Code Engine every time the extension is activated. During this process, if a rift
executable is not found in a virtual environment under ~/.morph
, the extension will ask you to attempt an automatic installation of a Python environment and the Rift Code Engine. To disable this behavior, such as for development, go to the VSCode settings, search for "rift", and set rift.autostart
to false
.
If the automatic installation of the Rift Code Engine fails, follow the below instructions for manual installation.
Rift Code Engine:
- Set up a Python virtual environment for Python 3.10 or higher.
- On Mac OSX:
- Install homebrew.
brew install [email protected]
mkdir ~/.morph/ && cd ~/.morph/ && python3.10 -m venv env
source ./env/bin/activate/
- On Linux:
- On Ubuntu:
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.10 && sudo apt install python3.10-venv
mkdir ~/.morph/ && cd ~/.morph/ && python3.10 -m venv env
source ./env/bin/activate/
- On Arch:
yay -S python310
mkdir ~/.morph/ && cd ~/.morph/ && python3.10 -m venv env
source ./env/bin/activate/
- On Ubuntu:
- On Mac OSX:
- Install Rift. We recommend that you
pip install
Rift in a dedicated Python >=3.10 virtual environment from this repository.- Make sure that
which pip
returns a path whose prefix matches the location of a virtual environment, such as the one installed above.
- using
pip
from GitHub:pip install "git+https://github.com/morph-labs/rift.git@dc27f3b299b79e37b1bcd169efa2216aa07f65b0#egg=pyrift&subdirectory=rift-engine"
- From source:
cd ~/.morph/ && git clone [email protected]:morph-labs/rift && cd ./rift/rift-engine/ && pip install -e .
- Make sure that
Rift VSCode Extension (via code --install-extension
, change the executable as needed):
cd ./editors/rift-vscode && npm i && bash reinstall.sh
Existing code generation tooling is presently mostly code-agnostic, operating at the level of tokens in / tokens out of code LMs. The language server protocol (LSP) defines a standard for language servers, objects which index a codebase and provide structure- and runtime-aware interfaces to external development tools like IDEs.
The Rift Code Engine is an AI-native language server which will expose interfaces for code transformations and code understanding in a uniform, model- and language-agnostic way --- e.g. rift.summarize_callsites
or rift.launch_ai_swe_async
should work on a Python codebase with StarCoder as well as it works on a Rust codebase using CodeGen. Within the language server, models will have full programatic access to language-specific tooling like compilers, unit and integration test frameworks, and static analyzers to produce correct code with minimal user intervention. We will develop UX idioms as needed to support this functionality in the Rift IDE extensions.
We welcome contributions to Rift at all levels of the stack, for example:
- adding support for new open-source models in the Rift Code Engine
- implementing the Rift API for your favorite programming language
- UX polish in the VSCode extension
- adding support for your favorite editor.
See our contribution guide for details and guidelines.
Programming is evolving. Join the community, contribute to our roadmap, and help shape the future of software.