• Stars
    star
    613
  • Rank 70,291 (Top 2 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Quick new application creation with Laravel and Valet

Lambo logo

Run tests

Super-powered laravel new for Laravel and Valet

Lambo is a command-line tool that replaces the Laravel installer and wraps up the most common tasks you might take when creating a Laravel app: opening it in your editor and your browser, initialize a git repository, tweak your .env and .env.example, and more.

Requirements

Installation

composer global require tightenco/lambo:^3.0

Upgrading

composer global update tightenco/lambo

Usage

Make sure ~/.composer/vendor/bin is in your terminal's path.

cd ~/Sites
lambo new myNextProject

What exactly does it do?

  • laravel new $PROJECTNAME
  • Initialize a git repo, add all the files, and, after some changes below, make a commit with the text "Initial commit."
  • Replace the .env (and .env.example) database credentials with the default macOS MySQL credentials: database of $PROJECTNAME, user root, and empty password
  • Replace the .env (and .env.example) APP_URL with $PROJECTNAME.$YOURVALETTLD
  • Generate an app key
  • Open the project in your favorite editor
  • Open $PROJECTNAME.$YOURVALETTLD in your browser

Note: If your $PROJECTNAME has dashes (-) in it, they will be replaced with underscores (_) in the database name.

There are also a few optional behaviors based on the parameters you pass (or define in your config file), including creating a database, migrating, installing Jetstream, running Valet Link and/or Secure, and running a custom bash script of your definition after the fact.

Customizing Lambo

While the default actions Lambo provides are great, most users will want to customize at least a few of the steps. Thankfully, Lambo is built to be customized!

There are three ways to customize your usage of Lambo: command-line arguments, a config file, and an "after" file.

Most users will want to set their preferred configuration options once and then never think about it again. That's best solved by creating a config file.

But if you find yourself needing to change the way you interact with Lambo on a project-by-project basis, you may also want to use the command-line parameters to customize Lambo when you're using it.

Creating a config file

You can create a config file at ~/.lambo/config rather than pass the same arguments each time you create a new project.

The following command creates the file, if it doesn't exist, and edits it:

lambo edit-config

The config file contains the configuration parameters you can customize, and will be read on every usage of Lambo.

Creating an "after" file

You can also create an after file at ~/.lambo/after to run additional commands after you create a new project.

The following command creates the file, if it doesn't exist, and edits it:

lambo edit-after

The after file is interpreted as a bash script, so you can include any commands here, such as installing additional composer dependencies...

# Install additional composer dependencies as you would from the command line.
echo "Installing Composer Dependencies"
composer require tightenco/mailthief tightenco/quicksand

...or copying additional files to your new project.

# To copy standard files to new lambo project place them in ~/.lambo/includes directory.
echo "Copying Include Files"
cp -R ~/.lambo/includes/ $PROJECTPATH

You also have access to variables from your config file such as $PROJECTPATH and $CODEEDITOR.

Using command-line parameters

Any command-line parameters passed in will override Lambo's defaults and your config settings. See a full list of the parameters you can pass in.

Lambo Commands

  • help or help-screen show the help screen

  • edit-config edits your config file (and creates one if it doesn't exist)

    lambo edit-config
  • edit-after edits your "after" file (and creates one if it doesn't exist)

    lambo edit-after

Configurable parameters

You can optionally pass one or more of these parameters every time you use Lambo. If you find yourself wanting to configure any of these settings every time you run Lambo, that's a perfect use for the config files.

  • -e or --editor to define your editor command. Whatever is passed here will be run as $EDITOR . after creating the project.

    # runs "subl ." in the project directory after creating the project
    lambo new superApplication --editor=subl
  • -p or --path to specify where to install the application.

    lambo new superApplication --path=~/Sites
  • -m or --message to set the first Git commit message.

    lambo new superApplication --message="This lambo runs fast!"
  • -f or --force to force install even if the directory already exists

    # Creates a new Laravel application after deleting ~/Sites/superApplication  
    lambo new superApplication --force
  • -d or --dev to choose the develop branch instead of master, getting the beta install.

    lambo new superApplication --dev
  • -b or --browser to define which browser you want to open the project in.

    lambo new superApplication --browser="/Applications/Google Chrome Canary.app"
  • -l or --link to create a Valet link to the project directory.

    lambo new superApplication --link
  • -s or --secure to secure the Valet site using https.

    lambo new superApplication --secure
  • --create-db to create a new MySQL database which has the same name as your project. This requires mysql command to be available on your system.

    lambo new superApplication --create-db
  • --migrate-db to migrate your database.

    lambo new superApplication --migrate-db
  • --dbuser to specify the database username.

    lambo new superApplication --dbuser=USER
  • --dbpassword specify the database password.

    lambo new superApplication --dbpassword=SECRET
  • --dbhost specify the database host.

    lambo new superApplication --dbhost=127.0.0.1
  • --breeze=STACK to use the Laravel Breeze starter kit. STACK may be either blade, vue or react.

    lambo new superApplication --breeze=blade
    lambo new superApplication --breeze=vue
    lambo new superApplication --breeze=react
  • --jetstream=STACK[,teams] to use the Laravel Jetstream starter kit. STACK may be either inertia or livewire.

    lambo new superApplication --jetstream=inertia
    lambo new superApplication --jetstream=inertia,teams
    lambo new superApplication --jetstream=livewire
    lambo new superApplication --jetstream=livewire,teams
  • --full to use --create-db, --migrate-db, --link, and -secure.

    lambo new superApplication --full
    

GitHub Repository Creation

Important: To create new repositories Lambo requires one of the following tools to be installed:

Lambo will give you the option to continue without GitHub repository creation if neither tool is installed.

  • -g or --github to Initialize a new private GitHub repository and push your new project to it.
# Repository created at https://github.com/<your_github_username>/superApplication
lambo new superApplication --github
  • Use --gh-public with --github to make the new GitHub repository public.
lambo new superApplication --github --gh-public
  • Use --gh-description with --github to initialize the new GitHub repository with a description.
lambo new superApplication --github --gh-description='My super application'
  • Use --gh-homepage with --github to initialize the new GitHub repository with a homepage url.
lambo new superApplication --github --gh-homepage=https://example.com
  • Use --gh-org with --github to initialize the new GitHub repository with a specified organization.
# Repository created at https://github.com/acme/superApplication
lambo new superApplication --github --gh-org=acme

For contributors:

Process for release

If you're working with us and are assigned to push a release, here's the easiest process:

  1. Visit the Lambo Releases page; figure out what your next tag will be (increase the third number if it's a patch or fix; increase the second number if it's adding features)

  2. On your local machine, pull down the latest version of main (git checkout main && git pull)

  3. Build for the version you're targeting (./lambo app:build)

  4. Run the build once to make sure it works (./builds/lambo)

  5. Commit your build and push it up

  6. Draft a new release with both the tag version and release title of your tag (e.g. v1.5.1)

  7. Set the body to be a bullet-point list with simple descriptions for each of the PRs merged, as well as the PR link in parentheses at the end. For example:

    - Add a superpower (#92)

  8. Hit Publish release

  9. Profit

Notes for future development

  • All new configuration keys must be added to the $newConfiguration property in UpgradeSavedConfiguration
  • All removed or deprecated configuration keys must be added to the $removedConfigurationKeys property in UpgradeSavedConfiguration
  • Any time configuration keys are changed, the $configurationVersion property in UpgradeSavedConfiguration needs to be incremented

More Repositories

1

ziggy

Use your Laravel routes in JavaScript.
JavaScript
3,668
star
2

jigsaw

Simple static sites with Laravel’s Blade.
PHP
2,083
star
3

takeout

Docker-based development-only dependency manager. macOS, Linux, and WSL2-only and installs via PHP's Composer... for now.
PHP
1,569
star
4

collect

A Collections-only split from Laravel's Illuminate Support
PHP
1,505
star
5

parental

Use single table inheritance in your Laravel app
PHP
1,249
star
6

mailthief

A fake mailer for Laravel Applications for testing mail.
PHP
686
star
7

tlint

Tighten linter for Laravel conventions.
PHP
494
star
8

duster

Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards.
PHP
343
star
9

novapackages

PHP
331
star
10

quicksand

Easily schedule regular cleanup of old soft-deleted Eloquent data.
PHP
294
star
11

gistlog

GistLog - simple, easy blogging based on GitHub gists
CSS
273
star
12

symposium

Management of proposals, bios, photos, etc. for conference speakers.
PHP
171
star
13

nova-google-analytics

Google Analytics integration with Laravel Nova
PHP
161
star
14

onramp

Easing the onramp for new or non-PHP developers to become Laravel devs.
PHP
152
star
15

overload

Method overloading in PHP
PHP
113
star
16

nova-stripe

Easily show information about Stripe charges and balances in your Nova dashboard
JavaScript
105
star
17

giscus

Notifications for Gist Comments
PHP
104
star
18

laravelversions

PHP
94
star
19

jigsaw-blog-template

Starter template for a blog, using Jigsaw by Tighten
Blade
92
star
20

confomo

ConFOMO is a simple tool that makes it easy to track your friends at conferences.
JavaScript
74
star
21

ozzie

Open source project monitor for Tighten
PHP
55
star
22

nova-package-development

A forum for talking about the process of Nova Package Development
52
star
23

jigsaw-docs-template

Starter template for a documentation site, using Jigsaw by Tighten
Blade
44
star
24

liftoff

A quick start for Laravel development in a new environment
Shell
39
star
25

craft-build-query

A plugin for Craft CMS, demonstrating how to build complex or optimized queries by modifying an ElementCriteriaModel.
PHP
39
star
26

builtwithjigsaw

A list of sites built with Jigsaw
Blade
35
star
27

react-gif-search-engine

React GIF Search Engine
JavaScript
33
star
28

react-gif-search-engine-old

JavaScript
32
star
29

jigsaw-site

Jigsaw Documentation Site
Blade
29
star
30

blink-my-lights

Quick proof-of-concept for flashing/blinking lights with Laravel and IFTTT
PHP
26
star
31

laravelm1

Tracking what works and doesn't in the Laravel ecosystem on M1
Blade
25
star
32

configs

Standard config files for Tighten projects
PHP
24
star
33

nova-releases

A package to provide a card and a tool giving information about Nova releases, including whether you're current
Vue
20
star
34

consoles

Quick shortcut list to API developer consoles
PHP
19
star
35

json-api-examples

Implementing JSON:API in laravel
18
star
36

laravel-react-demo

Demo of how to include React components in a Laravel project with Elixir
PHP
17
star
37

laravel-mix-jigsaw

Laravel Mix plugin for Jigsaw.
JavaScript
16
star
38

nova-package-discovery

Nova card for showing stats from novapackages.com
PHP
16
star
39

simplecast-php

Simplecast PHP SDK
PHP
15
star
40

checkmate

Check the version of all your Laravel apps and notify if they're out of date
PHP
14
star
41

tighten-coding-standard

A PHP Code_Sniffer configuration for Tighten's coding standard.
PHP
14
star
42

php-package-skeleton

Tighten's PHP Package skeleton -- inspired by & some source from spatie/skeleton-php
Shell
14
star
43

saasaas

SaaSaaS - create your next "AirBnB for ___" idea
PHP
14
star
44

laravel-elixir-webpack-react

A package to provide support for compiling React JSX files in Laravel Elixir 6
JavaScript
13
star
45

podcast-subscriber

Easy podcast subscriber app
PHP
10
star
46

laravel-mix-react

Easy alternative Laravel Mix configuration for projects using React
JavaScript
10
star
47

laravel-preset-jest

Front-end presets that include Jest for React and Vue
PHP
9
star
48

laraveldrivers

List all third-party Laravel drivers
PHP
9
star
49

easy-embeddable-polls

easy-static-polls
Vue
8
star
50

valet-fallback

Fallback web site for Valet
PHP
8
star
51

blade-style-guide

"PSR-Blade"--style guide for Laravel Blade
8
star
52

dev-battle-1-react

Tighten Co. Senior Dev Battle - React app
PHP
7
star
53

phpreleases-action

GitHub action that integrates with the PHP Releases API.
6
star
54

dev-battle-1-vue

Tighten Co. Senior Dev Battle - Vue app[
JavaScript
6
star
55

react-native-time-input

A simple time input component with autoformatting.
TypeScript
6
star
56

duster-action

Dockerfile
6
star
57

jigsaw-collections-demo

CSS
5
star
58

tlint-plugin

TLint PHPStorm Plugin
Kotlin
4
star
59

gif-gif-vue

Samantha Geitz Jest testing in Vue Laracon talk
PHP
4
star
60

hyperspoon

Lua
4
star
61

gif-gif-react

React version of Samantha Geitz's Jest Testing Laracon talk
PHP
4
star
62

postit

PHP
3
star
63

laravel-elixir-elm

JavaScript
3
star
64

pickr-api

PHP
3
star
65

jazz

JavaScript-inspired development utilities
PHP
2
star
66

tallstack

The new web site for tallstack.dev
PHP
2
star
67

nova-tighten-themes

Tighten's Nova Themes
CSS
2
star
68

learnwebdevelopment

LearnWebDevelopment.org
CSS
2
star
69

intro-to-react

Intro to React workshop given by Samantha Geitz at PeersConf 2018
JavaScript
2
star
70

tlint-sublime-plugin

tlint-sublime-plugin
Python
2
star
71

omgphp

OMGPHP.com
CSS
1
star
72

borsh-php

1
star
73

phpreleases

API endpoints with support information for PHP major/minor versions and releases 5.6 and later
PHP
1
star
74

pickr-nativescript

NativeScript version of Pickr for Tighten Dev Battle 2
CSS
1
star
75

dev-battle-landing

Landing page for the Tighten Dev Battle
PHP
1
star
76

automation-scripts

Lua
1
star
77

pickr-reactnative

JavaScript
1
star
78

mon-petit

PHP
1
star
79

whyphp

CSS
1
star
80

laravelstar

Vue
1
star