8/19/2016 - 2:40 PM

replify - Create a REPL for any command

replify - Create a REPL for any command

See mchav/With for a similar tool that has more features.


git clone ./replify && cd ./replify && mv ./"  replify" ./replify && sudo chmod +x ./replify && sudo ln -s `pwd`/replify /usr/bin/replify

HN Discussion

$ replify echo
Initialized REPL for [echo]
echo> "Hello, World!" 
Hello, World!

echo> "It works!"
It works!

$ replify git
Initialized REPL for [git]
git> init
Initialized empty Git repository in /your/directory/here/.git/

git> remote add origin https://your-url/repo.git                

git> checkout -b new-branch
Switched to a new branch 'new-branch'

git> push   

printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
    eval "$command $input"
    printf "%s> " "$command"
    read -r input