tighten / lambo

Quick new application creation with Laravel and Valet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Herd support

nexxai opened this issue Β· comments

Now that Herd has been released, I'm wondering if there's any appetite to remove the tight coupling with Valet and support Herd as well? I still love using Lambo as it simplifies getting so much of the initial set up out of the way, but requiring Valet is a problem now that there's an arguably better option out there.

No demands here, just curious if this is being considered.

I'd be more than happy do to that! I assume it would just mean replacing any calls to "valet" with "herd" if someone sets a specific config?

Ideally, yeah.

I haven't dug through the Lambo code to know how difficult a request like this might be, but conceptually, it would just be Lambo saying "cool, this person has Herd, let's go!"

@mattstauffer I'm going have a look at this.

In my work on #183 I attempted to run lambo and:

image

TL;DR

I have completely removed valet from my system since the herd cli command provides all the valet functionality. Of course, I had forgotten that lambo was looking for the valet tld to generate the correct application url πŸ€¦β€β™‚οΈ.

My thinking is that we need progressive fallback logic as follows:

  1. honor user configured HERD=true in ~/.config/lambo/config
  2. if the herd cli command is available use Herd.
  3. None of the above so use valet.

Thoughts πŸ€”?

I would sort of assume that if Herd is viable, we use Herd, and if not, we use Valet; does that make you think of any problems? I'd love to avoid even needing a user config if possible.

@mattstauffer,

I would sort of assume that if Herd is viable, we use Herd, and if not, we use Valet; does that make you think of any problems? I'd love to avoid even needing a user config if possible.

Agreed. I will do that.

Maybe I mis-understood what you meant in:

#188 (comment):

I'd be more than happy do to that! I assume it would just mean replacing any calls to "valet" with "herd" if someone sets a specific config?

Oooo yah, nope, you understood correctly, I just prefer your solution (automatic) over my original one :)

Just stumbled across this. Had a quick look at whether adding Herd support was straight forward but it looks like there is a bit of work to get it running.

Short term, I just made use of symlinks, to trick Lambo into thinking Valet is installed and it worked great 😁

I ran the following commands (use at your own risk):

# Symlink the Herd Valet config to the default Valet config location
mkdir ~/.config/valet
ln -s ~/Library/Application\ Support/Herd/config/valet/config.json ~/.config/valet/config.json

# Add a symlink in the Herd bin directory for Valet to link to the Herd binary
# WARNING: I don't know if this will break if Herd does an update
cd ~/Library/Application\ Support/Herd/bin/
ln -s herd valet

You can confirm everything worked correctly by running:

# This should output the Herd Valet config
cat ~/.config/valet/config.json

# This should show the path to the Valet symlink in the Herd bin directory
which valet

Now run lambo and it should all work (at least it did for me) 😁

@joshhanley Thanks for your note here!

@jonsugar I'd be happy to pick this task up, unless you're planning to work on it?

@mattstauffer no worries! πŸ™‚

@jonsugar I'd be happy to pick this task up, unless you're planning to work on it?

Hi @mattstauffer, sorry for the late reply.

No plans to work on this. I just use laravel new ... or the Herd UI to create projects now. They are more compatible with the newest features of Breeze and they use laravel prompts.

The only thing lambo does that the laravel command doesn't is run the after script and allow for a default configuration.

Personally, I would deprecate Lambo at this point since the laravel command/Herd UI does 95% of the Lambo feature set with a better DX πŸ™ˆ. They are also 1st party.

P.S. Congrats on the πŸ’ and becoming Tighten CEO. (somehow my telegram got corrupted 🀷🏻 so messaging here)

@jonsugar Thanks!

Yah, i've strongly considered deprecating it, or just turning it into an after-script-only kinda thing.

@mattstauffer I still use it for any new application I create, as it just sets everything up the way I have already configured.

But yeah 95% of my config is the after script. But I love it for installing Livewire, Tailwind, copying custom Tailwind configs, etc. 😁