Upgrade to Pro — share decks privately, control downloads, hide ads and more …

コマンドラインツールについて語るときに僕の語ること #yapcasia

コマンドラインツールについて語るときに僕の語ること #yapcasia

taichi nakashima

August 29, 2014
Tweet

More Decks by taichi nakashima

Other Decks in Technology

Transcript

  1. What I Talk about When I Talk about CLI Tool

    ίϚϯυϥΠϯπʔϧʹ͍ͭͯޠΔͱ͖ʹ๻ͷޠΔ͜ͱ https://www.flickr.com/photos/36247316@N00/3108399560
  2. What I Talk about When I Talk about CLI Tool

    ίϚϯυϥΠϯπʔϧʹ͍ͭͯޠΔͱ͖ʹ๻ͷޠΔ͜ͱ https://www.flickr.com/photos/36247316@N00/3108399560
  3. lྑ͍z$-*πʔϧͱ͸ʁ ͍͔ʹlྑ͍z$-*πʔϧΛ࡞Γ࢝ΊΔ͔ʁ What is “Good” CLI tool ? How to

    start to create “Good” CLI tool ? https://www.flickr.com/photos/36247316@N00/3108399560
  4. lྑ͍z$-*πʔϧͱ͸ʁ ͍͔ʹlྑ͍z$-* What is “Good” CLI tool ? How to

    start to create “Good” CLI tool ? https://www.flickr.com/photos/36247316@N00/3108399560
  5. Good CLI Tool #1 Keep It Simple, Stupid ! ͭͷ͜ͱʹूத͍ͯ͠Δ

    https://www.flickr.com/photos/110382334@N05/11302995614
  6. > grep —i -C 4 "some string" /tmp &YFDVUBCMF 0QUJPOT

    https://www.flickr.com/photos/hindrik/5568789280
  7. > grep —i -C 4 "some string" /tmp &YFDVUBCMF 0QUJPOT

    "SHVNFOUT https://www.flickr.com/photos/hindrik/5568789280
  8. > git --no-pager push -v origin master &YFDVUBCMF (MPCBM 0QUJPOT

    $PNNBOE https://www.flickr.com/photos/hindrik/5568789280
  9. > git --no-pager push -v origin master &YFDVUBCMF (MPCBM 0QUJPOT

    $PNNBOE $PNNBOE 0QUJPOT https://www.flickr.com/photos/hindrik/5568789280
  10. > git --no-pager push -v origin master &YFDVUBCMF (MPCBM 0QUJPOT

    $PNNBOE $PNNBOE 0QUJPOT "SHVNFOUT https://www.flickr.com/photos/hindrik/5568789280
  11. > grep —i -C 4 "some string" /tmp 4XJUDI Ҿ਺Λ൐Θͳ͍

    https://www.flickr.com/photos/hindrik/5568789280
  12. > grep —i -C 4 "some string" /tmp 4XJUDI Ҿ਺Λ൐Θͳ͍

    'MBH Ҿ਺Λ൐͏ https://www.flickr.com/photos/hindrik/5568789280
  13. > brew install > apt-get install > yum install >

    cpan > gem install > pip install https://www.flickr.com/photos/midorisyu/752223850
  14. > tool --debug > export DEBUG=1 > tool Φϓγϣϯ ؀ڥม਺

    ։ൃऀ޲͚ https://www.flickr.com/photos/damski/7045068945
  15. lྑ͍z$-* ͍͔ʹlྑ͍z$-*πʔϧΛ࡞Γ࢝ΊΔ͔ʁ What How to start to create “Good” CLI

    tool ? https://www.flickr.com/photos/36247316@N00/3108399560
  16. NAME ==== ! ## Description ! ## Usage ! ##

    VS. https://www.flickr.com/photos/alessiorr/14144160337
  17. ස౓͕ߴ͍ͳΒͰ͖Δ͚ͩ ୹໊͍લΛ෇͚Δ ස౓͕௿͍ͳΒ આ໌తͳ໊લΛ෇͚Δ = ίϚϯυ໊ NAME ==== ! ##

    Description ! ## Usage ! ## VS. ໊લ https://www.flickr.com/photos/alessiorr/14144160337
  18. ͜Ε͸ͲΜͳπʔϧͳͷ͔ʁ ͭͷ͜ͱʹूத͍ͯ͠Δ Good CLI Tool #1 = ୹͘؆ܿͳઆ໌͕ॻ͚Δ NAME ====

    ! ## Description ! ## Usage ! ## VS. આ໌ https://www.flickr.com/photos/alessiorr/14144160337
  19. ΠϯλʔϑΣʔεͷఆٛ ௚ײతʹ࢖͑Δ Good CLI Tool #2 Ϣʔβͷࢹ఺Ͱ ࠷΋΍Β͍ͤͨ͜ͱΛ ࠷΋؆୯ʹͰ͖ΔΑ͏ʹ NAME

    ==== ! ## Description ! ## Usage ! ## VS. ࢖͍ํ https://www.flickr.com/photos/alessiorr/14144160337
  20. ൺֱ ଞͷπʔϧͱͷൺֱ NAME ==== ! ## Description ! ## Usage

    ! ## VS. ࣅͨΑ͏ͳπʔϧ͸ଘࡏ͢Δ શ͘ಉ͡΋ͷΛ࡞ͬͯ΋ ҙຯͳ͍ ࣅͨπʔϧͱൺ΂ͯ! Կ͕༏Ε͍ͯΔͷ͔Λߟ͑Δ! → πʔϧͷಛ௃ʹͳΔ https://www.flickr.com/photos/alessiorr/14144160337
  21. όοδ όοδͷ४උ = CI as a Service ͷઃఆ = ͸͡Ί͔Βςετ؀ڥΛ!

    ४උ͢Δ ςετ݁ՌΛϢʔβʹ ݟͤଓ͚Δ͜ͱͰ ςετΛॻ͘Ϟνϕʔγϣϯ Λอͪଓ͚Δ NAME ==== ! ## Description ! ## Usage ! ## VS. https://www.flickr.com/photos/alessiorr/14144160337