Skip to content

Commit

Permalink
docs: Update README and justfile for improved Nix usage
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
G-structure committed Oct 16, 2024
1 parent c77d7a0 commit 6df478c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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'.

Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
build:
poetry build
pip install .

run:
topos run
nix run .

zrok:
zrok share public http://0.0.0.0:13341
Expand All @@ -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"
create-dmg topos.app --volicon "topos/assets/topos_blk_rounded.png" --icon "topos/assets/topos_blk_rounded.png"

0 comments on commit 6df478c

Please sign in to comment.