Amjith Ramanujam - Awesome Command Line Tools

Amjith Ramanujam - Awesome Command Line Tools

Designing a good command line tool is challenging. Command line tools look archaic compared to modern graphical interfaces, discoverability is a big issue for command line tools, proactive help is hard to implement. This talk will cover a set of specific techniques to help alleviate those challenges.

How did [pgcli](http://pgcli.com) and [mycli](http://mycli.net) overcome these problems? We will cover specific examples where command line apps shine. The examples will be drawn from pgcli, mycli and [bpython](http://bpython-interpreter.org/). This talk will suggest libraries and show how they can help you implement a wonderful command line interface.

The libraries covered in this talk include [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit), [pygments](http://pygments.org/), [click](http://click.pocoo.org/), [fuzzyfind](https://github.com/amjith/fuzzyfinder).

The goal of the talk is to distil the ideas that exist in successful command line applications as guidelines for building powerful command line applications.

https://us.pycon.org/2017/schedule/presentation/518/

Bde70c0ba031a765ff25c19e6b7d6d23?s=128

PyCon 2017

May 21, 2017
Tweet

Transcript

  1. Awesome Command Line Tools Amjith Ramanujam

  2. Amjith Ramanujam @amjithr

  3. Netflix Traffic Engineering

  4. PGCLI & MYCLI https://pgcli.com http://mycli.net

  5. MS-DOS 6.22 https://upload.wikimedia.org/wikipedia/commons/b/b3/MS-DOS_install_welcome.gif

  6. Linux • Up/Down arrow • Tab-completion

  7. DISCOVERABILITY

  8. GUI • ICONS • MENUS

  9. PGCLI https://www.pgcli.com

  10. Fish Shell https://fishshell.com

  11. DEMO

  12. Discoverability • Be forthcoming • Eschew special keys

  13. USER FOCUS

  14. MyCLI http://mycli.net

  15. DEMO

  16. User Focus • Users come first • Implementation later

  17. bpython https://bpython-interpreter.org

  18. DEMO

  19. CONFIGURABILITY

  20. Configurability • Subjective options only

  21. DISCOVERABILITY USER FOCUS CONFIGURABILITY

  22. FISHSHELL BPYTHON PGCLI MYCLI

  23. None
  24. CHECKLIST ❏ Persistent History ❏ History search ❏ Emacs Keybindings

    ❏ Paged Output ❏ Auto-Completion ❏ Minimal Config ❏ Syntax Coloring
  25. prompt-toolkit https://github.com/jonathanslenders/python-prompt-toolkit

  26. REPL Read/Eval/Print/Loop

  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. None
  35. None
  36. None
  37. CHECKLIST ✓ Persistent History ✓ History search ✓ Emacs Keybindings

    ❏ Paged Output ✓ Auto-Completion ✓ Minimal Config ✓ Syntax Coloring
  38. Resources • pgcli.com • mycli.net • fishshell.com (design) • bpython-interpreter.org

    • prompt-toolkit
  39. Contact @amjithr • @jonathan_s - Jonathan • @ballingt - Thomas

    • @icherniavska - Irina
  40. Thank you! @amjithr