# Trio ## Introduction Trio is an open source automated insulin delivery (OS-AID) system for iOS based on the OpenAPS algorithm, with [adaptations for Trio](https://github.com/nightscout/trio-oref). Trio builds on years of work from the #WeAreNotWaiting diabetes community. Trio emerged from that broader body of work and is now developed as its own independent open-source project with the backing and support of the Nightscout Foundation. Since then, it has seen substantial contributions from many developers, resulting in a wide range of new features and enhancements. Its roots trace back to Ivan Valkou’s [FreeAPS X](https://github.com/ivalkou/freeaps), an iPhone implementation of the [OpenAPS algorithm](https://github.com/openaps/oref0), as well as subsequent community development (later known as iAPS), the [LoopKit](https://github.com/LoopKit) set of tools for building AID systems on iOS, and a broad set of open source pump and CGM drivers developed by the wider OS-AID contributor community. Trio is developed in active collaboration with the wider open source AID ecosystem across both iOS and Android. The project is committed not only to building Trio itself, but also to enabling collaboration across communities, platforms, and contributor groups in support of stronger and more accessible OS-AID solutions. In parallel, Trio contributors are actively involved in collaboration with researchers and healthcare professionals to help push the boundaries of what open source AID can achieve. Trio continues to evolve through contributions from developers, testers, documentation writers, translators, and community members across the open source diabetes ecosystem. ### Mission Trio aims to make open source automated insulin delivery safer and more accessible for people with diabetes who are willing to learn, including those supported by experienced users and healthcare professionals, while continuing to support the experienced users and contributors who help build and improve it. ### Target Audience Today, Trio primarily serves: - people with diabetes (PwD) who are experienced users and want a highly configurable system they can fine-tune - PwD who already have good control and want a system that requires less day-to-day intervention - PwD coming from commercial systems who discover open source AID through community support, advocacy, and social channels - PwD who are learning Trio with support from experienced users or healthcare professionals ### Direction Over time, Trio aims to work safely for **any** person with diabetes who is willing to learn, while continuing to bring along the experienced users, "super users", and contributors who help shape and improve the project and the OS-AID ecosystem as a whole. --- ## To download this repo: You can either use the Build Script or you can run each command manually. ### Build Script: If you copy, paste, and run the following script in Terminal, it will guide you through downloading and installing Trio. More information about the script can be found [here](https://triodocs.org/0.2.x/operate/build/#build-trio-with-script). ``` /bin/bash -c "$(curl -fsSL \ https://raw.githubusercontent.com/loopandlearn/lnl-scripts/main/TrioBuildSelectScript.sh)" ``` ### Command Line Interface (CLI): In Terminal, `cd` to the folder where you want your download to reside, change `` in the command below to the branch you want to download (ie. `dev`), and press `return`. ``` git clone --branch= --recurse-submodules https://github.com/nightscout/Trio.git && cd Trio ``` Create a ConfigOverride.xcconfig file that contains your Apple Developer ID (something like `123A4BCDE5`). This will automate signing of the build targets in Xcode: Copy the command below, and replace `xxxxxxxxxx` by your Apple Developer ID before running the command in Terminal. ``` echo 'DEVELOPER_TEAM = xxxxxxxxxx' > ConfigOverride.xcconfig ``` Then launch Xcode and build the Trio app: ``` xed . ``` --- ## To build directly in GitHub, without using Xcode: **Instructions**: - For **`main`** branch: https://github.com/nightscout/Trio/blob/main/fastlane/testflight.md - For **`dev`** branch: https://github.com/nightscout/Trio/blob/dev/fastlane/testflight.md Instructions in **greater detail**, but **not Trio-specific**: - https://loopkit.github.io/loopdocs/gh-actions/gh-overview/ --- ## Please understand that Trio is: - an open-source system developed by enthusiasts and for use at your own risk - not CE or FDA approved for therapy. ## Documentation - [Discord Trio - Server ](https://discord.triodocs.org/) - [Trio documentation](https://triodocs.org/) - [OpenAPS documentation](https://openaps.readthedocs.io/en/latest/) - [Crowdin](https://crowdin.triodocs.org/) is the collaborative platform we are using to manage the **translation** and localization of the Trio App. ## Support - [Trio Facebook Group](https://facebook.triodocs.org/) - [Loop and Learn Facebook Group](https://m.facebook.com/groups/LOOPandLEARN/) - [Looped Facebook Group](https://m.facebook.com/groups/TheLoopedGroup/) --- ## Contribute If you would like to give something back to the Trio community, there are several ways to contribute: - **Help others**: assist users by answering questions and guiding them in support communities. - Improve the **documentation**: update or expand TrioDocs to help users build and use Trio. - Improve the **app**: contribute **code**, features, or fixes to the Trio iOS app. ### Pay it forward When you have successfully built Trio and managed to get it working well for your diabetes management, it's time to pay it forward. You can start by **responding to questions** in the **Facebook or Discord** support groups, **helping others** make the best out of Trio. ### Translate Trio is translated into several languages to make sure it's easy to understand and use all over the world. Translation is done using [Crowdin](https://crowdin.triodocs.org/), and does not require any programming skills. If your preferred language is missing or you'd like to improve the translation, please sign up as a translator on [Crowdin](https://crowdin.com/project/trio). ### Develop Can you code in Swift? Do you have UI/UX skills? Do you know how to optimize API calls or improve data storage? Do you have experience with testing and release management? Trio is a collaborative project. We always welcome fellow enthusiasts who can contribute with new code, improvements, or help with testing. If you want to contribute to the development of Trio, please reach out on Discord or Facebook. For questions or contributions, please join our [Discord server](https://discord.triodocs.org).