A legendary command-line tool whose kung fu skills were the stuff of legend.
The best way to get fs-tool is via Homebrew.
brew tap fs/fstool
brew install fs-toolOr install via URL:
brew install https://raw.github.com/fs/homebrew-fstool/master/fs-tool.rb
And then follow the instructions in caveats section.
git clone git@github.com:fs/fs-tool.git ~/.fs-toolBash users:
echo 'eval "$($HOME/.fs-tool/bin/fs init -)"' >> ~/.bash_profile
exec bashZsh users:
echo 'eval "$($HOME/.fs-tool/bin/fs init -)"' >> ~/.zshenv
source ~/.zshenvRun fs without any arguments or run fs help to explore available commands.
fs help <command_name> prints usage and other command documentation.
Shares the best wisdom quotes and our core values with you.
$ fs wisdom
Great Work is a Matter of PridePRO tip: You can add this command to your .zlogin file via echo "fs wisdom" > ~/.zlogin and get all the awesome quotes on your shell's startup.
Open current github repo in browser
$ fs gh # opens current repo on github
$ fs gh p # opens current Pull Request (or "Create Pull Request" page)
$ fs gh pulls # opens current repo's pull requests on github
$ fs gh issues (fs gh i) # opens current repo's issues on github
$ fs gh issues new (fs gh i n) # opens new issue in current repo on github
$ fs gh pulls closed (fs gh pulls c) # opens current repo's closed pull requests on github
$ fs gh issues closed (fs gh i c) # opens current repo's closed issues on github
$ fs gh search (fs gh s) <query> # searches in current repo
$ fs gh show <commit_id> # opens commit <commit_id> on githubPRO tip: You can add an alias for the rockstar fs gh p command:
alias pr='fs gh p'Open branch's CI page in browser
$ fs ci # opens current branch on CI service
$ fs ci master # opens "master" branch on CI servicePRO tip: Another killer feature here:
alias ci='fs ci'Bootstrap new project from fs/xxx-base templates
$ fs new rails <project name> # setup new project using rails-base template
$ fs new api <project name> # setup new project using rails-base-api template
$ fs new static <project name> # setup new project using static-base templateOpen corresponding guides' section in browser. If section is not found then search through the guides.
$ fs h style # opens "Style Guide"
$ fs h code review # opens "Code Review"
$ fs h heroku # opens "Deploy to Heroku"
$ fs h new project # opens "Create new project from scratch"
$ fs h I am no longer young # searches "I am no longer young" in the guidesSee available sections in command autocompletion:
$ fs h <TAB><TAB>
aws dns logentries openspace_rules semaphore
basecamp github maintain pagerduty style
bug_report google_apps maintain_project passpack style_guide
bug_reports heroku network pingdom workflow
code_review hipchat new_project printer
communicate infrastructure open_space_rules printers
communication learn openspace rollbarRemote commands use per-user or per-project server configuration
stored in .fs.yml, for example:
# .fs.yml
servers:
defaults: &defaults
address: me@startup-s1.com
environment: staging
root: /data/application
staging:
<<: *defaults
production:
<<: *defaults
address: me@startup.comGlobal configuration:
# ~/.fs.yml
servers:
home:
address: foo@stark.geocities.com
environment: staging
root: /var/www/starkCreates an example .fs.yml config file in a current project directory or in home directory.
fs init-config # create .fs.yml in a current directory
fs init-config --global # create .fs.yml in home directoryRun remote Rails console attached to a given application (environment).
$ fs c staging # opens SSH session to me@startup-s1.com and runs `rails c` in app root
$ fs c production # opens SSH session to me@startup.com and runs `rails c` in app root
$ fs c home # opens SSH session foo@stark.geocities.com and runs `rails c` in app root
$ fs c # runs `bundle exec rails c` in the current directoryDisplay the recent application logs in realtime.
$ fs tail staging # opens SSH session to me@startup-s1.com and tails application log
$ fs tail staging dj.log # opens SSH session to me@startup-s1.com and tails dj.log
$ fs tail production # opens SSH session to me@startup.com and tails application log
$ fs tail home # opens SSH session foo@stark.geocities.com and tails application log
$ fs tail # runs `tail -f log/*.log` in the current directorySearch in the application logs.
$ fs grep staging foo # opens SSH session to me@startup-s1.com and greps 'foo' in application log
$ fs grep production bar # opens SSH session to me@startup.com and greps 'bar' in application log
$ fs grep home baz # opens SSH session foo@stark.geocities.com and greps 'baz' in application log
$ fs grep happiness # greps 'happiness' in log/development.logOpen SSH session to a given application (environment).
$ fs ssh staging # opens SSH session to me@startup-s1.com
$ fs ssh production # opens SSH session to me@startup.com
$ fs ssh home # opens SSH session foo@stark.geocities.comFS Tools is maintained by Vasily Polovnyov. It was written by Flatstack with the help of our contributors.