Skip to content

Commit

Permalink
add install script + isntructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyjohnson1 committed Aug 12, 2024
1 parent 7f4937e commit c5fd2a6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Topos

<p align="center">
<img src="https://github.com/jonnyjohnson1/topos-cli/blob/main/topos/assets/topos_blk_rounded.png" style="max-width: 100%; height: 65; max-height: 65px;" alt="Private LLMs" />
<img src="https://github.com/jonnyjohnson1/topos-cli/blob/main/topos/assets/topos_blk_rounded.png" style="width: 70px; height: 70px;" alt="Private LLMs" />
</p>
<p align="center">
<em>Private AI Backend Service</em>
</p>

A simple server running on your machine to use your local machine to power private conversations with friends, family, and coworkers. Runs with the [chat arena](https://github.com/jonnyjohnson1/chat-arena) app available on desktop and mobile.

## (MacOS) Install App With .dmg
*experimental*: This is new, and should work on most MacOS machines!
Simply double click the topos.dmg file, and drag the app into your Applications directory.
You should be able to launch the Topos service anywhere from your machine.

## Install with nix (Recommended)
If nix is not installed:
1. Install nix:
Expand Down
33 changes: 33 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# Find the 'topos-cli' directory
TOPOS_CLI_DIR=$(find "$HOME" -type d -name "topos-cli" -print -quit 2>/dev/null)

if [ -z "$TOPOS_CLI_DIR" ]; then
echo "Error: 'topos-cli' directory not found"
exit 1
fi

# Switch to the 'topos-cli' directory
cd "$TOPOS_CLI_DIR"

# Open a new Terminal window and run nix-shell
# Force install nix on user's system: https://github.com/DeterminateSystems/nix-installer
osascript <<EOF
tell application "Terminal"
do script "cd '$TOPOS_CLI_DIR' && \
if ! command -v nix &> /dev/null && [ ! -d /nix ] && [ ! -f ~/.nix-profile/etc/profile.d/nix.sh ] && [ ! -d ~/.nix-profile ]; then \
echo 'Nix is not installed. Installing Nix...'; \
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm; \
if [ -f ~/.nix-profile/etc/profile.d/nix.sh ]; then \
source ~/.nix-profile/etc/profile.d/nix.sh; \
else \
echo 'Error: Nix profile script not found. Please check the installation.'; \
exit 1; \
fi; \
echo 'Nix installation complete.'; \
else \
echo 'Nix is already installed.'; \
fi && nix-shell"
end tell
EOF
Binary file modified topos.dmg
Binary file not shown.

0 comments on commit c5fd2a6

Please sign in to comment.