10 ms·
Mise: Dev tools, env vars, task runner
- jindongz 2y agoFinally I can retire makefiles in my python projects
- zero-g 2y agoJustfile[0] was a more familiar makefiles replacement for me [0]: https://github.com/casey/just https://github.com/casey/just
- konradb 2y agoHave enjoyed replacing makefiles with https://taskfile.dev/ https://taskfile.dev/ which looks like it could be more powerful due to being able to detect changes etc. But glad Just has been good.
- spott 2y agoJust curious: what do you use make for in python projects?
- MadsRC 2y agoNot the parent, but I use it for projects (including Python projects) to run tests, code generation etc. when I can’t use mise.
- whilenot-dev 2y agoAs a task runner. What do you use?
- devjab 2y agoI’m not GP but I use poetry. Can’t even imagine working with Python without it. https://python-poetry.org/docs/cli/ https://python-poetry.org/docs/cli/
- nxpnsv 2y agoYou might enjoy https://poethepoet.natn.io/ https://poethepoet.natn.io/ it makes tasks easier, and you don't even need poetry to benefit from it (I use it with UV these days)
- spott 2y agoI can’t imagine going back to poetry after using uv. uv is like 10x faster than poetry for installs and dependency resolution.
- whilenot-dev 2y agoPoetry is a package manager though, there's Poe the Poet[0] for a reason. How do you use poetry to run custom tasks? [0]: https://poethepoet.natn.io/poetry_plugin.html https://poethepoet.natn.io/poetry_plugin.html
- spott 2y agoJust. It is a less heavyweight make. Similar syntax and behavior, no .PHONY, a couple of helper functions and behaviors. It is designed as a task runner rather than a build system.
- ashishb 2y agoIf not makefile then what do you use for a project that has Python for backend and JavaScript for frontend? Does everyone learns all the tools or do you just provide a 'make lint' that works in all codebases?
- jindongz 2y agoDo what I can do in npm scripts
- deleted 2y ago[deleted]
- aaronbrethorst 2y agoI recently switched to Mise for all of my JS, ruby, python, and java sdk management needs, and I’ve been delighted with it so far. Not having to install RVM, NVM, some toxic brew of python installers until I get a working python environment, and SDKMan has been such a breath of fresh air.
- Zaloog 2y ago`brew install uv` and no more python troubles occur
- syhol 2y ago`mise use uv`, there, I fixed it for you. Mise actually has a great integration with uv, like auto venv activation.
- semi-extrinsic 2y agoI think uv has auto venv activation and workspaces and stuff, now that uv is the official successor of Rye?
- xelamonster 2y agoIt does but you need to run commands through uv to use it, I assume this means if you run bare python commands in the task runner or whatever mise will use the venv.
- aaronbrethorst 2y agoAh, from the Astral folks. Right on, I'll check that out sometime. Maybe on my work laptop, which resembles this xkcd classic: https://xkcd.com/1987/ https://xkcd.com/1987/
- rtpg 2y agouv is its own thing, but direnv + `source .venv/bin/activate` is straightforward nowadays. Direnv has saved me so much pain nowadays
- sureglymop 2y agoThis is nice! Jetbrains tools sometimes need a bit more configuration with it, otherwise it's very seamless.
- MadsRC 2y agoI find the JetBrains integration spotty - I have to run ‘eval “$(mise activate)”’ in every terminal session for it to pick up the env. I have vague recollections of also having issues with running executables from the IDE as it is missing the env details. The SDK discovery works great though :D
- hinkley 2y agoI believe, and I could be wrong about this, that JetBrains only picks up changes to your .shell_rc files on a restart. What I learned instead was to stop using the built in terminal in WebStorm. If WebStorm crashes you’re fucked. Objectively, it never did that a lot and does less so recently, but not never. WebStorm likes to pick up file system changes when you give it focus, so any manipulation you do in the builtin terminal doesn’t necessarily do that.
- jdxcode 2y agolmk if there might be a way I can help with that, I don't think anyone's posted an issue about jetbrains issues—not for a long time at least
- hv42 2y agoThere is a plugin that works well to automatically configure some of the SDKs https://plugins.jetbrains.com/plugin/24904-mise https://plugins.jetbrains.com/plugin/24904-mise
- syhol 2y agoI'm using it to unify my teams toolchain without resorting to nix or running everything in docker. I still use docker to run services and I still like the idea of nix, but the DX of mise is too good. Tasks are really nice too, all my repo scripts now have completions.
- aiono 2y agoDid you try https://devenv.sh/ https://devenv.sh/? It uses Nix under the hood but with an improved DX experience. I haven't used it myself personally since I find Nix good enough but I am curious if you would still choose mise over devenv.
- konradb 2y agoI'd be interested in anybody who has tried https://devenv.sh/ https://devenv.sh/ and https://www.jetify.com/devbox https://www.jetify.com/devbox and chosen one over the other. Tried devbox which has been good, but not devenv.
- yawaramin 2y agoWe are starting to adopt devenv in our team. Overall it's really good--we have control over our toolchain, environment, and the processes that we start. There are some lingering papercuts though, like they haven't yet released a version where they allow specifying the Go toolchain version, and they seem to periodically re-download the Nix package archive. But I think they are improving fairly quickly. Ultimately, we might still end up moving to straight Nix flakes, just not sure yet.
- mongol 2y agoI use direnv but miss that it can't initialize bash completions as I enter a directory. Can mise do that?
- jdxcode 2y agothere isn't a hook for executing shell source, but it would be possible to add I think. The current hooks already execute inside of a shell function so there would just need to be a way to declare that you want a hook to run inside the shell, maybe like this: [hooks.enter] shell = true run = ". completions/mycli.sh" I made an issue if you'd like to track: https://github.com/jdx/mise/issues/3412 https://github.com/jdx/mise/issues/3412
- mongol 2y agoVery helpful! If this can be made to work I may switch from direnv
- jdxcode 2y agoyou should see this in tomorrow's release, or you can install with cargo from main branch now: https://github.com/jdx/mise/pull/3414 https://github.com/jdx/mise/pull/3414
- halostatue 2y agoYou just mentioned the only thing that bugs me with mise: the frequent (sometimes 3x per day) releases. I say this only because I’m one of the maintainers of the MacPorts port for mise, and while I’ve automated things, I have had more than one port update be outdated before it gets merged because of these releases. I’ve automated the PR submission steps (not with GHA, but with a shell script I run on my Mac), but after discussion with the gentleman who usually merges those PRs, we decided that we'll probably do them every 2 or 3 days.
- jdxcode 2y ago
- aiono 2y agoThis is already a solved problem with Nix shell (except the task runner part). I don't understand why there are any other alternatives still being developed. Nix supports more packages than any other solution, it's battle tested and cross platform (didn't try on Windows but on Mac OS it works fine). And it's more reproducible than any other package manager.
- bloopernova 2y agoBecause some people may not want nix. Mise is, in my experience, much easier to get into and start using.
- jdxcode 2y agoI started writing mise in a bout of frustration after trying to use nix
- lifty 2y agothank you!
- yawaramin 2y agoHave you tried devenv? What do you think?
- jdxcode 2y agoI think the entire concept of nix is a broken model not fixable by docs and better DX. Precompiled, portable binaries are the way to go which is what mise is built on. Trying to maintain this separate build chain where everything is compiled in a sandbox gives your system a "split-brain" problem where you have the "nix world" and the "macos (or whatever) world". Ultimately, this just causes problems. Of course I'm ignoring NixOS but that's a sledgehammer for this supposed "problem" nix is trying to solve in the first place. mise is for the 90% of developers that just want things to be fast and work and don't care about the nuts and bolts.
- 2y ago
- lijok 2y agoThe name is absolutely perfect.
- helix278 2y agoWhat is the main difference with just?
- jdxcode 2y agoI wrote a detailed comment yesterday about this: https://news.ycombinator.com/item?id=42353634 https://news.ycombinator.com/item?id=42353634 tl;dr: mise has more functionality like parallel tasks, watching for changes, and comprehensive argument parsing support (including custom autocomplete) the biggest difference is the syntax. just is more concise and you really need to learn the syntax in order to use it. In mise things are more verbose but I feel easier to read for someone unfamiliar with it.
- BiteCode_dev 2y agoMy experience with such tools is that when you do everything, you don't do anything right. The chances that it doesn't leak greatly the underlying abstraction and creates troubles to figure it out when it will invariably fail is zero. Because most people barely know in depth the packaging challenges for one ecosystem. In Python there are maybe a dozen in the world that have a good hang of __all__ of it. And the devs of this tool would need to know so many. Of course they don't, they wrap existing tools, which implies exactly what I said above.
- hinkley 2y agoExample: I tried to convince our deployment system to deploy patch releases to simplify our hotfix solution. The code was in Node and the deployment tool in Python. I had to thread the needle to come up with a semver pattern that was legal in both Python and NodeJS. Not impossible but annoying. (Then discovered our deployment tool wasn’t using the semver parser in Python and it still didn’t work. Goddamnit.)
- n144q 2y agoExactly. A task runner for Node.js is already complex enough. And it's not just a task runner itself, but rather an ecosystem of things working together. Now you tell me this can somehow handle Node.js, Python and others. I'll need to see how it actually works in the real world to believe the claim.
- rsyring 2y agoI think mise gets a lot right. I use it for environment variables, Python virtualenv creation and activation, and task scripts. I've been a software developer for over twenty years and am usually reluctant to use new tools. But mise has been a fantastic addition to my dev workflow.
- stavros 2y agoI have two problems with Mise: There isn't a page with the most common commands I might want to run, and whenever I try it, some Python imports mysteriously fail. Then I disable it, and everything is fine again. I might be motivated to persevere if I only had one of the above problems, but with both of them together, it's too much of a hassle.
- dmarinus 2y agoLately I was thinking "what's the best way to integrate/use a task runner like mise in a github actions workflow". Looking at the workflow files in the mise repository it seems like they gave up and just put in a few run: mise steps (having to rewrite / unable to use dependencies etc). I think it would be better if you could generate the workflow files but I haven't found such a project yet.
- jdxcode 2y agothere is a `mise generate github-action` command which uses https://github.com/jdx/mise-action https://github.com/jdx/mise-action not sure I understand what you mean by "mise steps (having to rewrite / unable to use dependencies etc)."
- DrBenCarson 2y agoJust using mise as a drop-in asdf replacement has been delightful Same functionality but much snappier with better ux
- PittleyDunkin 2y agoTbh just having to install node ensures I'll never use this. At least use something like python that's already on my system!
- jdxcode 2y agonode is used in a lot of the examples (because it's popular) but mise is written in rust and certainly doesn't require node
- mirashii 2y agoYou don't have to install node, or Python. mise is written in rust and distributed as a binary.
- PufPufPuf 2y agoWhat gave you the idea that it needs Node?
- PittleyDunkin 2y agoPoor reading comprehension; I read "The following shows using mise to install different versions of node." as "The following shows using node to install different versions of mise."
- banseljaj 2y agoWhat are you talking about? You don't need to install node for this. It's a self-contained rust binary.
- cdaringe 2y agoUnrelated, but triggered by the remark: I can’t wait to meet the person on HN who has the take of “if it’s not in COBOL, I won’t touch it”. I could suggest a lisp, but I think those folks are actually somewhat plentifully here?
- 0xbadcafebee 2y agoI'm not "a developer" so I never got the use case of tools like these. Instead I just use the stuff they mention (asdf, make). I use Asdf to manage versions of all programs in a monorepo. Works great (well, actually asdf's UX is terrible, but it works reliably, and the plugin design is great). For development, I don't ever load environment variables into my current shell session. I run a script or Makefile which loads any necessary variables, does a thing, and then exits. It would be a nightmare to have to constantly check if my current shell session had X variable in it. I use Make for repeatable small commands that will vary per directory, or for simple parallelizing or ordered execution of commands. I have a big one that handles Helm installs, and a few more for Terraform, Packer, asdf, etc. I also use them for deployments in hierarchical environment directories, where environment variables are loaded from parent directories. I love that Make has all the features it has, because I always find myself eventually reaching for something you don't find in "just a task runner", and it makes my life easier. I use shell scripts when I need to make a composeable tool that'll be slightly longer or more complicated than a Make target should be. I have saved so much time and effort writing these tools in shell rather than Python or something, where there is inevitably way more bugs and dependencies. The only time I have needed to use something more complex than shell is when I have a lot of APIs to deal with that also deal in JSON; if it's a lot of complexity it's better than curl/jq, but if it's only one small task, curl/jq is better. The end result works great. The whole environment just needs asdf installed (from Homebrew, for example). With stock Make and the stock Bash v3, I can manage everything automatically, everything's version-pinned and automated, all variables get loaded at runtime as needed, and the whole thing can be grokked by just reading some simple Makefiles. The only thing I want to fix now is to get rid of the superfluous Makefiles from directories (they're all symlinked back to one Makefile). It's a pain to re-symlink them all when I change directory structure. Probably should just write a script for it...
- jdxcode 2y agoif you use asdf you can drop mise right in and it'll work the same but faster and with better supply-chain security. people have been doing this for almost 2 years and mise fits that use-case perfectly. You don't have to touch the env vars and tasks stuff.
- 2y ago
- whydid 2y agoWhy do JavaScript programmers call ini files "environment variables" ?
- Izkata 2y agoEnvironment variables are key/value pairs that are passed from parent process to child process when the child is first created. A convention has also arisen where these can be put into environment files so the overarching system (for example, docker) can load them from a consistent place (without having to add them to your shell and risk leakage across projects) and then pass them down to child processes in typical environment variable fashion. Also there are no sections like there are in ini files.
- cstrahan 2y agoThey don’t. I’m guessing you navigated to the https://mise.jdx.dev/environments.html https://mise.jdx.dev/environments.html page and saw the TOML syntax (which looks an awful lot like INI), and confused yourself. Mise (like a lot of software) uses TOML as the format for its config files (as opposed to something like JSON). Mise reads that config, to automatically export environment variables on a per directory tree basis. When the docs refer to environment variables, they very literally do mean environment variables. The values of which are taken from a format that resembles INI, as you have noticed.
- harha_ 2y agoAll that complexity, for what?
- PufPufPuf 2y agoHaving to manage Python / Ruby / Node etc. versions by hand is less complex?
- gavmor 2y agoFor me, this competes with asdf. Otherwise, it would compete with eg nvm, rvm. I haven't managed versions "by hand" for over a decade.
- halostatue 2y agomise is asdf written with security and performance in mind (I believe it started with performance, but has become much more obsessed – in a very good way — about security).
- harha_ 2y agoWell I'm tired of all this bullshit anyways. I don't want to manage multiple versions of the same language on my system in the first place, but I guess it's useful for those who need it.
- PufPufPuf 2y agoIgnoring the task runner stuff, Mise is great just as a "better asdf". It allows many more package sources (including pipx, go and cargo), and it puts the actual executables on PATH -- not shims like asdf, which has a tendency to break stuff.
- mootoday 2y agoI read the project's Readme and all I'm left with is "why?". I use Devbox[1] and get access to the entire Nix ecosystem, done. [1] https://github.com/jetify-com/devbox https://github.com/jetify-com/devbox
- Zizizizz 2y agoMise just works and takes maybe 1-2 minutes to explain and have a tool running on a team members machine in my experience. I couldn't get into nix, too complicated for me and I've yet to find a resource that makes it click for me. After that I would feel comfortable encouraging the rest of the team to use it but as mise is so easy and even more popular, I will probably just stay using this. I will look into devbox though, thank you for the recommendation!
- mootoday 2y agoI hear you, Nix has been nothing but a waste of time for me every time I tried to do anything with it. Devbox abstracts it and the only time I had to do a nix-specific thing was when I needed a flake to install a CLI from a GitHub release.
- goku12 2y agoThere are multiple tools in this space - even devbox has a direct competitor. With mise, I'm not expecting an isolated environment, but rather a meta package manager. I can install many tools directly into my user shell. If I wanted that with nix, I would be using a nix user install rather than devbox. You just choose what you like most. And mise seems to have a large fanbase.
- banseljaj 2y agoI started using mise back when it was still called rtx. I was a little annoyed by asdf's quirks and having it replicate that behavior while being faster and less intrusive in my shell configuration was great. Since then, mise has folded in two capabilities that I needed the most: Task Running and Env Vars. Overall, it has been a fantastic experience for me. I love how the developer has spent a lot of time ensuring compatibility with existing tools while still building future capabilities. I will add one thing that I knew I needed but couldn't find anywhere was added through the recent backends feature. I do a lot of trust and R development and there are dev tools that I need installed that I don't use as libraries, just the binaries. It was a problem making sure that those dependencies were installed in a new environment. Now, it's just so easy: I list those in my `mise.toml` file, and that ensures they are installed and installable.
- tecoholic 2y agoThe biggest visible boost has been in my shell startup times. Buying a computer after 5 years with 4 times as many cores and it feeling just as sluggish because nvm and pyenv are parsing the same set of bash files reading from disk was not pleasant. Mise actually made me feel, I didn’t just throw the money into a void
- jdxcode 2y agoI don't understand how people don't notice the massive tax they're paying by using nvm: $ hyperfine "~/.nvm/nvm.sh" "mise env" Benchmark 1: ~/.nvm/nvm.sh Time (mean ± σ): 1.722 s ± 0.032 s [User: 0.064 s, System: 0.112 s] Range (min … max): 1.684 s … 1.805 s 10 runs Benchmark 2: mise env Time (mean ± σ): 13.4 ms ± 5.7 ms [User: 10.0 ms, System: 21.3 ms] Range (min … max): 9.4 ms … 42.2 ms 29 runs Summary mise env ran 128.14 ± 53.94 times faster than ~/.nvm/nvm.sh 100x is definitely something you'll notice EDIT: for some reason in discord we're getting very conflicting results with this test. idk why, but maybe try this yourself and just see what happens.
- paulddraper 2y ago
- ducdetronquito 2y agoIt's a simple tool that makes my life easier for more than a year: thanks to the creator and contributors :)
- davidnet 2y agoThis allowed me to change from pyenv, node and everything into a something really neat and simple, the only thing it caught my surprise was `mise trust` but then the CLI help me to understand, Thanks jdxcode!
- jdxcode 2y agoI try not to be annoying best I can, but in the `mise trust` case I had to opt for tightening security even if it meant a bit of friction.
- timfsu 2y agoBig fan of mise, moved over from asdf and never looked back! kudos jdx
- serbrech 2y agoAs a feedback, having all the examples in that gif on the readme centered around node almost made me look away without a second thought.
- zaptheimpaler 2y agoI’ve been using mise at work to manage go versions, it’s been good although a little confusing and undocumented at times. I’ve never used asdf or similar before so there’s probably just a bit of learning curve but this thread is encouraging me to try it more.
- langsoul-com 2y agoI think if you only use node, then just nvm is fine. This is more for multi language ppl?
- jauntywundrkind 2y agoI've rejected most of my pain into a black hole, but as the person who wrote the Ansible scripts to bring up dev machines, I had nothing but loathing for nvm. It someone always managed to find bold new ways to misbehave & crud up. It was incredibly unpleasant to work with. Someone else suggested we switch to asdf & what a rapid & happy migration that was. Good riddance nvm.
- zanellato19 2y agonvm is unbearably slow, this is really fast. 200 to 300ms latency whenever you open a terminal is noticible and I was getting far more than that sometimes, up to 1sec. Its really really bad.
- RobT7k 2y agoI'd really like a better idea on Windows support for mise. Especially for development using WSL. It seems like it probably works there, but the docs are pretty slim. > Note that Windows support is very minimal for now. https://mise.jdx.dev/installing-mise.html#windows https://mise.jdx.dev/installing-mise.html#windows
- Alifatisk 2y agoI'm glad people doing frontend are working towards creating a whole toolchain that does everything, like biomejs.dev.