Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

core.io-cli-local-env

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core.io-cli-local-env

CLI utility to create local development environments

  • 0.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

core.io-cli-local-env

core.io cli tool to manage local environments for development.

Install

It can be installed globally and it will be available as shuttle. To install run npm i -g core.io-cli-local-env.

Local Development Environment

CLI

   shuttle 0.0.1 - CLI utility to create local development environments

   USAGE

     shuttle <command> [options]

   COMMANDS

     install                     Install all dependencies. Needs sudo          
     list                        List all local domains                        
     open <domain>               Open domain in default browser                
     share <project>             Generate a shareable URL for a project        
     restart                     Restart Caddy and Dnsmasq services            
     stop                        Stop Caddy and Dnsmasq services               
     start                       Start Caddy and Dnsmasq services              
     serve <domain> <proxy>      Proxy a local domain and save it 
     remove <domain>             Remove a previously added domain              
     update                      Update toolchain                              
     uninstall                   Uninstall all files and binaries              
     help <command>              Display help for a specific command   

   GLOBAL OPTIONS

     -h, --help         Display help
     -V, --version      Display version
     --no-color         Disable colors
     --quiet            Quiet mode - only displays warn and error messages
     -v, --verbose      Verbose mode - will also output debug messages

   MORE INFO

     This program uses Caddy server and Dnsmasq. It generates various files and uses brew to install dnsmasq.

MacOS

Local domains

Since browsers started forcing .dev domains to HTTPS via preloaded HSTS it became apparent that using .dev for local development might not be a good idea.

Another popular option are .local domains, but those might have name resolution issues with multicast DNS software- e.g. Bonjour.

We are going to use .test domains.

For each development domain you want to support you need to create a entry in your mac's resolvers directory- you might need to create the directory if not present:

$ sudo mkdir /etc/resolver

Create a file with the name of the domain, test in our case, and add the following line nameserver 127.0.0.1. A quick way of doing this:

$ sudo echo "nameserver 127.0.0.1" > /etc/resolver/test

After you add the file if you scutil --dns you should see an entry:

resolver #11
  domain   : test
  nameserver[0] : 127.0.0.1
  flags    : Request A records, Request AAAA records
  reach    : Reachable, Local Address, Directly Reachable Address
Reverse Proxy

We use Caddy server as a reverse proxy.

Caddy is distributed as a single binary file and has a simple configuration similar to nginx's.

DNS

Dnsmasq is a lightweight DNS forwarder and DHCP server. We use dnsmasq for DNS resolution.

Ngrok

Ngrok is used to share local URLs.

Credits

This is a rework of marina-cli with small modifications to suit a different setup.

License

® License MIT by goliatone

FAQs

Package last updated on 17 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc