From 6df478ce8be1cc12dc9ca69cdbf789c504ae833d Mon Sep 17 00:00:00 2001 From: luc Date: Tue, 15 Oct 2024 10:39:13 -0400 Subject: [PATCH] docs: Update README and justfile for improved Nix usage - README.md: - Add instructions for running Topos and its dependencies using `nix run` - Reorganize setup instructions into "Production" and "Development" sections - Remove outdated instructions for setting up Spacy models - Remove requirement for python-tk - Update development shell instructions - justfile: - Update 'run' recipe to use `nix run .` instead of `topos run` These changes simplify the setup process for new users and developers, leveraging Nix to manage dependencies and provide a consistent environment. The updated documentation reflects our shift towards a more Nix-centric workflow, making it easier for contributors to get started with the project. --- README.md | 28 +++++++++++++++------------- justfile | 6 +++--- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 99ffad8..f34044a 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,21 @@ If nix is not installed: 1. Install nix: macos/linux: `sh <(curl -L https://nixos.org/nix/install)` windows: `sh <(curl -L https://nixos.org/nix/install) --daemon` -Run the software with nix: -2. Download this repo `git clone https://github.com/jonnyjohnson1/topos-cli` -3. `cd topos-cli` -3. ~~build the backend service (only run the topos set --spacy trf line if it is your first time setting up)~~ +2. Run Topos and all its dependencies: + ``` + nix run github:jonnyjohnson1/topos-cli + ``` + This will start all services including Topos, Postgres, Kafka, and Ollama. + +## Development +Clone the repository: +``` +git clone https://github.com/jonnyjohnson1/topos-cli +cd topos-cli +``` -### Production +For development, you have several options: +### Build Binary First build topos binary (only usable on machines with nix installed) ``` nix build .#topos @@ -40,12 +49,7 @@ run built binary ### Dev Shell ``` nix develop -run topos -``` - -### Dev Shell (auto start server) -``` -nix develop .#topos +topos run ``` ### Poetry Shell @@ -56,7 +60,6 @@ nix develop .#poetry ## Install Instructions requires `brew install just` requires `brew install poetry` -requires `brew install python-tk` ## Graph Database - Install Neo4j @@ -70,7 +73,6 @@ brew services start neo4j install the topos package with the command `just build` ### Step 2: Set the Spacy Model Size -**BROKEN** Set the size of the spacy model you wish to use on your system. There are 'small', 'med', 'large', and 'trf'. diff --git a/justfile b/justfile index b7b5845..effe003 100644 --- a/justfile +++ b/justfile @@ -1,9 +1,9 @@ build: poetry build pip install . - + run: - topos run + nix run . zrok: zrok share public http://0.0.0.0:13341 @@ -21,4 +21,4 @@ python: create-dmg 'dist/main' --overwrite dmg: - create-dmg topos.app --volicon "topos/assets/topos_blk_rounded.png" --icon "topos/assets/topos_blk_rounded.png" \ No newline at end of file + create-dmg topos.app --volicon "topos/assets/topos_blk_rounded.png" --icon "topos/assets/topos_blk_rounded.png"