Skip to content

ryanckulp/hatchbox_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

HatchBox CLI

Unofficial bash script that makes SSH-ing into your server a bit easier. no user data is saved, this lives on your machine.

hatchbox-cli

Usage

the CLI accepts 2 arguments, app (HatchBox project slug) and command (common server task).

hb [app] [command]

# examples
hb [app] console # run rails console for [app]
hb [app] logs # tail live logs for [app]

hb help # list available commands

Installation

add the script to your environment and provide a HatchBox server IP.

Mac

# step 1 - append script to your bash profile
echo "$(curl https://raw.githubusercontent.com/ryanckulp/hatchbox_cli/master/script.sh)" >> ~/.bash_profile

# step 2 - modify script to point to your HatchBox server
vim ~/.bash_profile
# replace "xxx.xxx.xxx.xxx" inside hb() function with your HatchBox server IP (begin insert via 'i')
# save the file (press escape key, then hold down the shift key and press "zz")

# step 3 - refresh your PATH
source ~/.bash_profile

# you're done!

fish shell

# step 1 - add custom fish shell script
curl -o ~/.config/fish/functions/hatchbox.fish https://raw.githubusercontent.com/ryanckulp/hatchbox_cli/master/hatchbox.fish

# step 2 - modify script to point to your HatchBox server
nano ~/.config/fish/functions/hatchbox.fish
# replace "xxx.xxx.xxx.xxx" inside the set address function with your HatchBox server IP, then save the file and exit (ctrl+x -> Y -> enter )

#step 3 - done :) fish auto refreshes its functions so you shuold now be able to just run `hb <appname> <logs|console>`

Windows If using WSL, just use the above install script from terminal. If not, what are you even doing?, tell me how? :)

About

Unofficial CLI for HatchBox.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages