Coder Social home page Coder Social logo

george's Introduction

george

A command-line toolkit for Laravel Forge.

Getting started

Installing a binary for Windows or Linux

Choose a binary from releases, download it and move it to a directory that's in your PATH environment variable.

If you're on Windows, you should use george with Git Bash or another bash-like shell with the ssh command and the ~/.ssh directory available.

Installing with Go

First, make sure you have Go installed. Then, install george with:

go get -u github.com/zippoxer/george

If you get george: command not found, then add $GOPATH/bin (default for linux is $HOME/go, for Windows %USERPROFILE%\go) to your PATH and try again.

Logging in to Forge

Finally, login with API key provided at https://forge.laravel.com/user/profile#/api

george login "<Forge API Key>"

Commands

SSH

Quickly SSH into a server or site. No need to register your SSH key, george automatically registers your ~/.ssh/id_rsa.pub into Forge.

$ george ssh www.example.com

If you've typed in a site domain, george will drop you right into it's laravel directory!

forge@example-server:~/www.example.com.il$ php artisan fix-website

You can also SSH into a server by it's name or IP address:

george ssh server-name
george ssh 128.64.32.16

MySQLDump

Tired of using ssh, mysqldump & rsync only to dump your site's database? Don't worry, george has got you covered!

A single command to dump a site's database:

george mysqldump www.example.com > example.sql

Behind the scenes, george compresses the stream with gzip to transfer the dump even faster.

Log

Print a site's laravel.log:

george log www.example.com

For better viewing experience, you might want to open laravel.log with Visual Studio Code:

george log www.example.com | code -

Behind the scenes, george compresses the transfer of the log file with gzip, so even large log files should open within seconds.

Sequel Pro (Mac only)

Opens a site database in Sequel Pro.

george sequelpro www.example.com

WinSCP (Windows only)

Opens an SFTP connection to a site or server in WinSCP.

george winscp www.example.com

About automatic SSH key registration

Before george connects to a server for the first time, it registers your default public SSH key (~/.ssh/id_rsa.pub) using Forge's API. Unless you switch your SSH key, george only registers you once per server.

How it works

Since the registered key is named after a SHA-2 hash of your public SSH key (GEORGE_<hash of your public key>), the next time you connect to the same server, george will notice you're already registered and continue without registering you again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.