Init failed: ERROR: `--template` is not expected in this context

Hi, I’m really like the concept of flox, and I wonder why flox doesn’t gain more traction, in my opinion he very much deserves to be known to more people. Thank you so much for all this work!

Today is my first day of flox… Unfortunately, when I was following the tutorial: flox environments for developers | flox:docs , an error occurred. I suspect that the tutorial was not updated in time?

I am using the Mac version of flox.

git init example-project && cd example-project
Initialized empty Git repository in /Users/green/inbox/example-project/.git/
green@OwendeMacBook-Pro ~/inbox/example-project (main) $ flox init --template project
ERROR: `--template` is not expected in this context
green@OwendeMacBook-Pro ~/inbox/example-project (main) $
1 Like

then, I tried to use flox init to init a project, then it wrote this files:

green@OwendeMacBook-Pro ~/project/next-translator (main) $ flox init
wrote: /Users/green/project/next-translator/flake.nix
wrote: /Users/green/project/next-translator/shells/__PACKAGE_NAME__/default.nix
wrote: /Users/green/project/next-translator/shells/__PACKAGE_NAME__
wrote: /Users/green/project/next-translator/shells

I wonder if __PACKAGE_NAME__ is the right folder name here? should it be next-translator or something?

I have already install nix before installing flox, I use macos PKG to install flox, so I wonder if that lead to this issue.

hey thanks for checking flox out! we’re in the middle of a few major shifts in the CLI. the current flox init only functions with a project set up to a git remote named origin (something we’ll be changing soon) and the __PACKAGE_NAME__ should be substituted with the interactive prompt when you init but doesn’t appear to be currently. we’ll be fixing this shortly as we stables the CLI on the road to 1.0. thanks for giving it a try! for what it’s worth, I don’t think this is caused by your separate nix install - i’m getting the same behavior on my end too.

Thank you for your reply.

I’m really looking forward to the development of this project.

I am also willing to be an early user. I am wondering if I can use it first in some way under the current situation? should I join to Discord or some else community?

For proactive communication, join the waitlist on our website and you’ll receive our announcements and notice once we release more broad early access. Also would be happy to hear what you’re interested in ahead of time. If you’re willing, drop me a note at graham@floxdev.com and we can connect.