Strudel Development Environment

A Nix-based development setup for Strudel, a JavaScript-based live coding environment for algorithmic music composition and performance, inspired by TidalCycles.

Overview

This repository provides a reproducible development environment for Strudel using Nix and includes the Strudel codebase as a git submodule. It includes:

  • Nix Flake: Reproducible development environment with Node.js 20, pnpm, and git
  • Makefile: Convenient shortcuts for common development tasks
  • Git Submodule: Tracks the official Strudel repository in the src/ directory
  • Agent Guidelines: Comprehensive guidelines for AI assistants working with Strudel

Prerequisites

  • Nix package manager (version 2.4+ recommended)
  • Git

Quick Start

  1. Clone this repository:

    git clone <this-repo-url>
    cd strudel
    
  2. Initialize and update submodules:

    make submodules-init submodules-update
    
  3. Enter the development environment:

    make shell
    # or directly: nix develop
    
  4. Install dependencies:

    make install
    
  5. Start the development server:

    make dev
    

The Strudel REPL should now be available at http://localhost:5173 (or similar, check the output).

Project Structure

strudel/
├── src/                    # Strudel codebase (git submodule)
├── AGENTS.md              # Guidelines for AI assistants
├── Makefile               # Development shortcuts
├── flake.nix              # Nix development environment
├── flake.lock             # Nix flake lockfile
└── README.md              # This file

Development Workflow

The Makefile provides shortcuts for all common tasks:

make help              # Show all available targets
make update            # Initialize and update git submodules
make install           # Install dependencies
make dev               # Start development server
make build             # Build the project
make test              # Run tests
make lint              # Run linter
make format            # Format code
make check             # Run all checks
make clean             # Clean build artifacts
make shell             # Enter Nix development shell

Direct Commands

If you prefer direct commands, all operations run within the Nix environment:

# Enter shell
nix develop

# Install dependencies
pnpm install

# Start dev server
pnpm dev

# Run tests
pnpm test

# etc.

Contributing

  • Follow the guidelines in AGENTS.md for AI-assisted development
  • Use lowercase commit messages
  • Ensure all changes pass make check
  • Test your changes thoroughly

License

The Strudel codebase in src/ is licensed under the terms in src/LICENSE. This development environment setup is provided as-is for Strudel development.

Resources

Troubleshooting

  • Submodule issues: Run make update to ensure the submodule is properly initialized
  • Dependency issues: Try make clean && make install to reinstall dependencies
  • Nix issues: Ensure Nix is installed and up-to-date

For more help, refer to the Strudel documentation or check the AGENTS.md guidelines.

Description
No description provided
Readme 149 KiB
Languages
Makefile 61.4%
Nix 21.2%
JavaScript 17.4%