
An open source text editor optimized for writing that relies on references.
Foundation model capabilities are rapidly improving and writing support systems are a promising early use case. Because foundation models are better at fluency than factuality, early experiments have focused on creative writing rather than expository, argumentative, or academic writing. Ref Studio will facilitate experimentation with factual writing support systems by providing an open source text editor that integrates foundation models and referenced document contents.
Ref Studio has three main components focused on writing, references, and AI interactions.
The writing component is supported by a text editor with basic styling with Markdown syntax, Notion-like blocks that can be collapsed, re-arranged, and display associated annotation widgets, such as cited references.
References play a crucial role in scientific document writing. Ref Studio offers a built-in feature for managing references. You have the option to upload your PDF references, which will be analyzed and made easily accessible to assist you throughout the writing process. Additionally, Ref Studio provides a dedicated system interface to efficiently manage your references.
When editing documents you can ask AI assistance to rewrite parts of the text, and get answers using the chat. Additionally you can also ask for text completion in the editor.
RefStudio.-.short.mov
- JavaScript: node.js (>= 18.12.0 LTS) and Yarn package manager
- Python: (>= 3.11) and Poetry package manager
- Tauri: Check prerequisites to install Rust and Cargo package manager
Once you have poetry installed, you can install the Python dependencies via:
poetry installTo compile the Python sidecar as a binary:
yarn pythonThis will generate the binary at src-tauri/bin/python and append the appropriate target triple required by Tauri.
You can read more details about the Python backend implementation here.
To install the frontend application built with Tauri and Vite + TypeScript you can run:
yarn installYou should be able to launch the desktop using:
yarn tauri:devTo automatically open the browser devtools you can launch the app via:
$ yarn tauri:dev:debugYou should be able to launch the web app by running the API and the development server (using Vite):
yarn web:apiYou can access the HTTP python backend at http://127.0.0.1:8000. The API documentation is available at http://127.0.0.1:8000/api/sidecar/docs.
yarn web:devYou open the web application at http://localhost:1421/ in your browser.
You can find logs from the Python sidecar in /tmp/refstudio-sidecar.log.
Assuming you are in the root project directory, you can run the Python tests and generate a coverage report by:
poetry run pytest --cov=python python/testsyarn installAssuming you are in the root project directory, you can run one of the following scripts
yarn test
yarn test:watch
yarn test:watch:uiTo completely reset your local environment you should following these steps:
- run
./scripts/reset_refstudio.sh(also available viayarn reset:storage) - run
yarn install && poetry install && yarn pythonto make sure both the FE and BE are up-to-date - run
yarn tauri:dev(oryarn web:apiandyarn web:app) to run the app - run the application and create a new project
- (extra) you might also need to remove the application's local storage cache for browser and Tauri browser
Notes:
- Project state is persisted in the backend storage folder that defaults to
/tmp/web-storage-url - The
reset_refstudio.shreset script will remove the folderuser1from the backend storage folder - The reset script will backup the
user1/settings.jsontouser1.settings.json.bak - You can use the env
WEB_STORAGE_URLif the folder is located in a diferent folder (ex:WEB_STORAGE_URL=/some/path reset_refstudio.sh)
This project version convention is based in a Calendar Versioning scheme.
You should follow the general pattern:
YY.N.PATCH[-PRE_RELEASE]
So the first version is 23.1.0 and a new release, in the same year, would be 23.2.0, while a patch for the first version your be 23.1.1. The first release of 2024 would be 24.1.0.
You can also append a pre-release tag using semantic version rules by appending a dash and a series of dot separated identifiers (ex: 23.2.0-rc.1).
To release a new version use the following steps:
- update
package.jsonwith a new version following the versioning rules. - run the Cut Release workflow by pressing "Run workflow" and select the branch (should be
mainor a release PR). - open the draft release created in the previous step
- download and test the Ref Studio application
- edit release notes to include notable changes and instalation instructions
- remove debug artifacts from the release
- publish release
You can also create a new Ref Studio release (ex: mac .dmg image files) locally using the following steps:
yarn pythonto ensure the backend python server binary is buit.yarn tauri:buildto build all the supported binary files.
If you are interested only on a specific target, you should run:
yarn tauri:build:mac:appleto get Apple silicon binary.yarn tauri:build:mac:intelto get Intel-based mac binary.yarn tauri:build:mac:universalto get a Universal macOS Binary (runs on both Apple silicon and Intel-based Macs).
After the build you can find the .dmg binaries in the /binaries folder.
