Skip to content

Latest commit

 

History

History
173 lines (119 loc) · 3.08 KB

File metadata and controls

173 lines (119 loc) · 3.08 KB

Mise Setup Guide

Mise is a polyglot version manager and task runner that makes development setup easier and more consistent across team members.

What is Mise?

Mise:

  • 🔧 Manages multiple language runtimes (Bun, Node.js, Python, etc.)
  • 📋 Defines development tasks in .mise.toml
  • 📦 Ensures everyone has the same tool versions
  • ⚡ Fast and lightweight
  • 🤝 Works with direnv for automatic environment setup

Installation

macOS / Linux

curl https://mise.jdx.dev/install.sh | sh

macOS (Homebrew)

brew install mise

Verify Installation

mise --version

Project Setup

Once you have Mise installed, the project is fully configured via .mise.toml:

Step 1: Install Tools

cd /home/bigmichi1/projects/codebot
mise install

This will:

  • ✅ Install Bun 1.3.14
  • ✅ Set up the environment

Step 2: Run Any Task

# View all available tasks
mise tasks

# Install dependencies
mise run install

# Start development
mise run dev

# Build the project
mise run build

# Start bot with Docker
mise run docker-up

Available Tasks

Development

mise run install # Install dependencies
mise run dev     # Run bot in dev mode (with TypeScript support)
mise run build   # Build TypeScript to JavaScript
mise run watch   # Watch & rebuild on file changes
mise run start   # Run production bot

Docker

mise run docker-build   # Build Docker image
mise run docker-up      # Start with docker-compose
mise run docker-down    # Stop containers
mise run docker-logs    # View logs
mise run docker-restart # Restart bot

Maintenance

mise run lint     # Check code quality with ESLint
mise run lint:fix # Auto-fix ESLint issues
mise run audit    # Check for vulnerabilities
mise run update   # Update all dependencies
mise run clean    # Remove build artifacts

Help

mise run help # Show all tasks

Manual Commands

If you prefer not to use Mise tasks, you can still run everything manually:

# Activate tools manually
eval "$(mise activate)"

# Then use bun directly
bun install
bun run dev

Environment Setup (Optional: direnv)

Mise integrates with direnv for automatic environment loading:

# Install direnv
brew install direnv # or apt-get install direnv

# Setup direnv hook in your shell
# Add this to ~/.zshrc or ~/.bashrc:
eval "$(direnv hook zsh)" # or bash

# Allow direnv in this project
direnv allow

Now when you cd into the project, tools and environment variables load automatically!

.mise.toml Structure

Tools Section

[tools]
bun = "1.3.14" # Pinned version for reproducibility

Troubleshooting

Mise command not found?

# Add to ~/.zshrc or ~/.bashrc and reload shell
export PATH="$HOME/.local/bin:$PATH"

Tools not installed?

mise install
mise cache clean # Clear cache if issues persist

Environment not loading?

eval "$(mise activate)"

References