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

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

Ecb3acc2d246962361a4f8b3f7a6dd12?s=128

taichi nakashima

August 29, 2014
Tweet

Transcript

  1. 1.

    What I Talk about When I Talk about CLI Tool

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

    What I Talk about When I Talk about CLI Tool

    ίϚϯυϥΠϯπʔϧʹ͍ͭͯޠΔͱ͖ʹ๻ͷޠΔ͜ͱ https://www.flickr.com/photos/36247316@N00/3108399560
  3. 14.

    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. 15.

    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. 17.

    Good CLI Tool #1 Keep It Simple, Stupid ! ͭͷ͜ͱʹूத͍ͯ͠Δ

    https://www.flickr.com/photos/110382334@N05/11302995614
  6. 26.

    > grep —i -C 4 "some string" /tmp &YFDVUBCMF 0QUJPOT

    https://www.flickr.com/photos/hindrik/5568789280
  7. 27.

    > grep —i -C 4 "some string" /tmp &YFDVUBCMF 0QUJPOT

    "SHVNFOUT https://www.flickr.com/photos/hindrik/5568789280
  8. 31.

    > git --no-pager push -v origin master &YFDVUBCMF (MPCBM 0QUJPOT

    $PNNBOE https://www.flickr.com/photos/hindrik/5568789280
  9. 32.

    > git --no-pager push -v origin master &YFDVUBCMF (MPCBM 0QUJPOT

    $PNNBOE $PNNBOE 0QUJPOT https://www.flickr.com/photos/hindrik/5568789280
  10. 33.

    > git --no-pager push -v origin master &YFDVUBCMF (MPCBM 0QUJPOT

    $PNNBOE $PNNBOE 0QUJPOT "SHVNFOUT https://www.flickr.com/photos/hindrik/5568789280
  11. 36.

    > grep —i -C 4 "some string" /tmp 4XJUDI Ҿ਺Λ൐Θͳ͍

    https://www.flickr.com/photos/hindrik/5568789280
  12. 37.

    > grep —i -C 4 "some string" /tmp 4XJUDI Ҿ਺Λ൐Θͳ͍

    'MBH Ҿ਺Λ൐͏ https://www.flickr.com/photos/hindrik/5568789280
  13. 40.
  14. 69.

    > brew install > apt-get install > yum install >

    cpan > gem install > pip install https://www.flickr.com/photos/midorisyu/752223850
  15. 74.

    > tool --debug > export DEBUG=1 > tool Φϓγϣϯ ؀ڥม਺

    ։ൃऀ޲͚ https://www.flickr.com/photos/damski/7045068945
  16. 76.

    lྑ͍z$-* ͍͔ʹlྑ͍z$-*πʔϧΛ࡞Γ࢝ΊΔ͔ʁ What How to start to create “Good” CLI

    tool ? https://www.flickr.com/photos/36247316@N00/3108399560
  17. 89.
  18. 92.

    NAME ==== ! ## Description ! ## Usage ! ##

    VS. https://www.flickr.com/photos/alessiorr/14144160337
  19. 93.

    ස౓͕ߴ͍ͳΒͰ͖Δ͚ͩ ୹໊͍લΛ෇͚Δ ස౓͕௿͍ͳΒ આ໌తͳ໊લΛ෇͚Δ = ίϚϯυ໊ NAME ==== ! ##

    Description ! ## Usage ! ## VS. ໊લ https://www.flickr.com/photos/alessiorr/14144160337
  20. 94.

    ͜Ε͸ͲΜͳπʔϧͳͷ͔ʁ ͭͷ͜ͱʹूத͍ͯ͠Δ Good CLI Tool #1 = ୹͘؆ܿͳઆ໌͕ॻ͚Δ NAME ====

    ! ## Description ! ## Usage ! ## VS. આ໌ https://www.flickr.com/photos/alessiorr/14144160337
  21. 95.

    ΠϯλʔϑΣʔεͷఆٛ ௚ײతʹ࢖͑Δ Good CLI Tool #2 Ϣʔβͷࢹ఺Ͱ ࠷΋΍Β͍ͤͨ͜ͱΛ ࠷΋؆୯ʹͰ͖ΔΑ͏ʹ NAME

    ==== ! ## Description ! ## Usage ! ## VS. ࢖͍ํ https://www.flickr.com/photos/alessiorr/14144160337
  22. 96.

    ൺֱ ଞͷπʔϧͱͷൺֱ NAME ==== ! ## Description ! ## Usage

    ! ## VS. ࣅͨΑ͏ͳπʔϧ͸ଘࡏ͢Δ શ͘ಉ͡΋ͷΛ࡞ͬͯ΋ ҙຯͳ͍ ࣅͨπʔϧͱൺ΂ͯ! Կ͕༏Ε͍ͯΔͷ͔Λߟ͑Δ! → πʔϧͷಛ௃ʹͳΔ https://www.flickr.com/photos/alessiorr/14144160337
  23. 97.

    όοδ όοδͷ४උ = CI as a Service ͷઃఆ = ͸͡Ί͔Βςετ؀ڥΛ!

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