morph-labs / rift
- воскресенье, 13 августа 2023 г. в 00:00:07
Rift: an AI-native language server for your personal AI software engineer
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.
Conversational code editing
Codebase-wide edits
Contextual codebase generation
/aider
) to spawn a new agent./edit
)@
.@
-mention files and directories to tell your agents about other parts of the codebase.git
project.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:
brew install python@3.10
mkdir -p ~/.morph/ && cd ~/.morph/ && python3.10 -m venv env
source ./env/bin/activate
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 -p ~/.morph/ && cd ~/.morph/ && python3.10 -m venv env
source ./env/bin/activate
yay -S python310
mkdir -p ~/.morph/ && cd ~/.morph/ && python3.10 -m venv env
source ./env/bin/activate
pip install
Rift in a dedicated Python >=3.10 virtual environment from this repository.
which pip
returns a path whose prefix matches the location of a virtual environment, such as the one installed above.pip
from GitHub:
pip install "git+https://github.com/morph-labs/rift.git@dc27f3b299b79e37b1bcd169efa2216aa07f65b0#egg=pyrift&subdirectory=rift-engine"
cd ~/.morph/ && git clone git@github.com:morph-labs/rift && cd ./rift/rift-engine/ && pip install -e .
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:
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.