Skip to content

Conversation

@tvararu
Copy link
Member

@tvararu tvararu commented Sep 4, 2025

Breaking change: To migrate from an existing local .env, add [env] to the top of the file and rename it to mise.local.toml.

Context

mise can be used to simplify our existing dev setup by replacing other dependencies.

Running the project is now two commands:

mise install
mise dev

mise dev will automatically re-run bundler scripts, build scripts, only when relevant files change, as the tasks specify relevant sources and outputs. This was previously accomplished using a sentinel file which is no longer necessary. (Technical detail: mise automatically creates sentinels in ~/.mise as necessary)

New tasks

mise tasks lists available tasks:

$ mise tasks
Name            Description
build           Build all assets
build:css       Build CSS from SCSS
build:favicons  Copy NHS UK frontend favicons
build:js        Build JavaScript bundles
bundle          Install all dependencies
ci              Run CI checks in parallel
clean           Clean build artifacts and dependencies
dev             Start development servers
dev:flask       Run Flask development server
dev:js          Watch and build JS files
dev:scss        Watch and build SCSS files
docker          Build and run Docker container
docker:build    Build Docker image
docker:run      Run Docker container
gitleaks        Detect secrets with gitleaks
lint            Run code linting
lint:fix        Run code linting with autofix
npm:install     Install Node.js dependencies
test            Run all tests
test:coverage   Run tests with coverage reporting
uv:sync         Sync Python dependencies with uv

Notable cool new tasks: mise ci which runs all the CI checks in parallel.

Local dev-only environment variables are now declared via mise.local.toml.

Environment variables

Breaking change: To migrate from an existing local .env, add [env] to the top of the file and rename it to mise.local.toml.

mise env can be used to list env vars:

$ mise env
set -gx CLIENT_ID deadbabe
set -gx CLIENT_SECRET cafebabe
set -gx DOCKER_IMAGE 'mavis-reporting:latest'
set -gx FLASK_APP 'mavis.reporting:create_app'
set -gx FLASK_ENV development
set -gx HOST_PORT 4001
set -gx MAVIS_ROOT_URL 'http://localhost:4000/'
set -gx PATH '/Users/...'
set -gx PYTHONPYCACHEPREFIX tmp/pycache
set -gx SECRET_KEY deadbeef
set -gx SESSION_TTL_SECONDS 600

Other improvements

  • Remove of .tool-versions in favour of declaring them in mise.toml
  • mise clean now thoroughly cleans ~everything
  • New tmp folder, and __PYCACHE__ bytecode directories will spawn there instead of polluting ./mavis/. This is a quality of life improvement when using tools like tree

**Breaking change:** To migrate from an existing local `.env`, add
`[env]` to the top of the file and rename it to `mise.local.toml`.

`mise` can be used to simplify our existing dev setup by replacing other
dependencies.

Running the project is now two commands:

```sh
mise install
mise dev
```

`mise dev` will automatically re-run bundler scripts, build scripts,
only when relevant files change, as the tasks specify relevant `sources`
and `outputs`. This was previously accomplished using a `sentinel` file
which is no longer necessary. (Technical detail: mise automatically
creates sentinels in `~/.mise` as necessary)

`mise tasks` lists available tasks:

```sh
$ mise tasks
Name            Description
build           Build all assets
build:css       Build CSS from SCSS
build:favicons  Copy NHS UK frontend favicons
build:js        Build JavaScript bundles
bundle          Install all dependencies
ci              Run CI checks in parallel
clean           Clean build artifacts and dependencies
dev             Start development servers
dev:flask       Run Flask development server
dev:js          Watch and build JS files
dev:scss        Watch and build SCSS files
docker          Build and run Docker container
docker:build    Build Docker image
docker:run      Run Docker container
gitleaks        Detect secrets with gitleaks
lint            Run code linting
lint:fix        Run code linting with autofix
npm:install     Install Node.js dependencies
test            Run all tests
test:coverage   Run tests with coverage reporting
uv:sync         Sync Python dependencies with uv
```

Notable cool new tasks: `mise ci` which runs all the CI checks in
parallel.

Local dev-only environment variables are now declared via `mise.local.toml`.

**Breaking change:** To migrate from an existing local `.env`, add
`[env]` to the top of the file and rename it to `mise.local.toml`.

```sh
$ mise env
set -gx CLIENT_ID deadbabe
set -gx CLIENT_SECRET cafebabe
set -gx DOCKER_IMAGE 'mavis-reporting:latest'
set -gx FLASK_APP 'mavis.reporting:create_app'
set -gx FLASK_ENV development
set -gx HOST_PORT 4001
set -gx MAVIS_ROOT_URL 'http://localhost:4000/'
set -gx PATH '/Users/...'
set -gx PYTHONPYCACHEPREFIX tmp/pycache
set -gx SECRET_KEY deadbeef
set -gx SESSION_TTL_SECONDS 600
```

- Removal of `.tool-versions` in favour of declaring them in `mise.toml`
- `mise clean` now thoroughly cleans ~everything
- New `tmp` folder, and `__PYCACHE__` bytecode directories will spawn
  there instead of polluting `./mavis/`. This is a quality of life
  improvement when using tools like `tree`
@tvararu tvararu merged commit 050db4c into main Sep 4, 2025
4 checks passed
@tvararu tvararu deleted the misemaxxing branch September 4, 2025 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants