Skip to content

Develop

EXDYSA edited this page May 6, 2025 · 96 revisions

Development

  • Our Python tools are set up to use uv. Simply git clone a repo:

    git clone https://github.com/darkshapes/nnll
    cd nnll
    
    git clone https://github.com/darkshapes/zodiac
    cd zodiac
    
    git clone https://github.com/darkshapes/sdbx
    cd sdbx
    

    then:

    uv sync
    uv pip install -e ".[dev]"
    

    You can also try Zodiac, sdbx, or nnll commands without any installation:

    uvx --from git+https://github.com/darkshapes/zodiac zodiac
    
  • For singularity :

    We use Bun for TypeScript/React projects.

    Clone the repo

    git clone https://github.com/darkshapes/singularity
    

    Then install and open your dev copy:

    cd singularity
    bun install
    bun run dev
    

Tip

To use 3D graphics cards, please ensure current drivers are installed.

If you are developing or using .gguf format, it is likely you will also need to compile with the installed toolkit appropriate for your card.

MacOS users with M-series GPU who wish to use llamafile with .gguf should install XCode Command Line Tools (1.2gb) using Terminal:

xcode-select --install

or via Apple developer site, or through the XCode app (40gb)

Pip Setup

  • Install Git (Windows Only)

  • Configure advanced GPU settings (OPTIONAL. Linux, flash-attn, PyTorch compile, etc)

  • Clone your repo(s)

    For sdbx :

    git clone https://github.com/darkshapes/sdbx
    pip install -e "sdbx[dev]"
    sdbx
    ```<hr>
    

    For Zodiac :

    git clone https://github.com/darkshapes/zodiac.git
    pip install -e "zodiac[dev]"
    

    Linux users want to ensure libportaudio2 is installed via system package manager. This doesn't apply to Windows or MacOS.

    Ensure Ollama, LMStudio, Cortex, Llamafile is running your models of choice. Then use this command to open the terminal client:

    zodiac
    

    Furthermore, Zodiac is designed to work on a mobile device using the serve command. An independent session can be opened with the method from the same Wi-Fi network using browser or SSH.


    For nnll :

    git clone https://github.com/darkshapes/nnll
    
    • bare minimum (no dependencies):
    pip install nnll
    
    • install select packages:
    pip install -e "nnll[nnll_33,nnll_56]"
    
    • install all packages :
    pip install -e "nnll[all]"
    
    • install all + development packages :
    pip install -e "nnll[dev]"
    

General Development Reference

*  Environment   : uv
*  Logging       : structlog (viztrace on crashes) to `/log` folder
*  Testing       : pytest -vv tests
*  Formatting    : ruff/better align
*  Linting       : ruff/pylint
*  Type Checking : pylance/pyright
*  Spelling      : typos vsc
*  Docstrings    : sphinx

Important

Review the Contributing documentation for more information.

This will help you understand our project's guidelines and what you might enjoy helping with.

Happy Hacking!

Clone this wiki locally