No description
  • Nix 98.7%
  • Python 0.9%
  • Rust 0.4%
Find a file
municorn b2f48c9e32
chore(rust): move edition config from rustfmt to rustfmt.toml
- migrate `edition = "2024"` from treefmt rustfmt config to `style_edition` in rustfmt.toml
- aligns with rustfmt's preferred configuration location
- simplifies treefmt configuration by removing redundant edition setting
2026-04-17 02:51:36 -06:00
modules chore(rust): move edition config from rustfmt to rustfmt.toml 2026-04-17 02:51:36 -06:00
templates chore(templates): remove flake: false from musicaloft-shell input 2026-04-14 22:56:41 -06:00
.envrc refactor!: move completely over to devenv, no flakes 2026-03-15 00:00:20 -06:00
.gitignore chore(templates): ignore nix build result directory 2026-03-28 23:44:33 -06:00
devenv.lock chore(devenv): update flake dependencies 2026-04-14 22:07:22 -06:00
devenv.nix chore(devenv): remove yamlfmt formatter 2026-04-14 22:39:34 -06:00
devenv.yaml chore: remove cocoa devenv import 2026-03-23 16:43:53 -06:00
flake.nix feat: change default template to basic 2026-03-15 22:50:39 -06:00
LICENSE chore: add MIT license 2026-02-12 08:06:58 -07:00
README.md docs: update hook name from commitlint-rs to cocoa-lint 2026-03-22 09:26:20 -06:00

musicaloft-shell

This is the standardized Musicaloft code style for consistent formatting and development practices across all Musicaloft projects.

This repository is open for you to use on your own projects as well!

Overview

musicaloft-shell provides a devenv module for consistent development environments across projects.

Features

Code formatters

Automatically formats code using treefmt with the following tools:

  • kdlfmt - KDL formatting
  • nixfmt - Nix code formatting
  • oxfmt - TypeScript and JavaScript formatting
  • ruff-check - Python linting
  • ruff-format - Python formatting
  • rustfmt - Rust code formatting
  • sqruff - SQL formatting
  • taplo - TOML formatting

Git hooks

Pre-commit hooks powered by git-hooks-nix:

Universal hooks

  • treefmt - Automatically formats staged files before commit
  • cocoa-lint - Validates commit messages using conventional commit format

Rust projects

  • clippy - Lints Rust code with all features enabled, denying warnings

TypeScript projects

  • oxlint - Type-aware linting with warnings treated as errors

Python projects

  • ruff - Lints Python code
  • ruff-format - Formats Python code
  • ty - Type-checks Python code

Commit message format

type(scope): description under 72 characters

Allowed types:

Type Description
build Changes the build process
chore Doesn't affect source code
ci Affects CI/CD pipelines
docs Affects comments or documentation
dx Improves or changes developer experience
feat Adds a new user-facing feature
fix Introduces a user-facing bug fix
perf Improves performance
refactor Changes source code without a new feature or fix
revert Reverts a previous commit
style Changes how code or documents are formatted
test Changes or adds automated testing

Rules:

  • Description must be lowercase
  • Maximum 72 characters
  • Scope maximum 10 characters (warning)

Usage

In devenv.yaml:

inputs:
  musicaloft-shell:
    url: github:musicaloft/musicaloft-shell
    flake: false

    # optional
    inputs:
      nixpkgs:
        follows: nixpkgs

  # you may need to add these dependencies and more, depending on your project
  git-hooks:
    url: github:cachix/git-hooks.nix
    inputs:
      nixpkgs:
        follows: nixpkgs
  treefmt-nix:
    url: github:numtide/treefmt-nix
    inputs:
      nixpkgs:
        follows: nixpkgs

# import the module
imports:
  - musicaloft-shell

And that's it!

Setup

# clone the repository
git clone git@git.musicaloft.com:musicaloft/musicaloft-shell.git
cd musicaloft-shell

# allow direnv for automatic environment loading
direnv allow

# or manually enter the development shell
devenv shell

License

MIT License - Copyright (c) 2026 Musicaloft LLC

See LICENSE for details.