Time for #DevDiscuss
Tonight's topic is: CLI tools and tricks
- Are you a consistent user of CLI tools or do you tend to opt for GUIs?
- What CLI tip for productivity or fun do you have for the community?
- What are your go-to CLI tools?
Let's chat!
CLI tools/tricks are my favorite topics because I always learn something new from others! I am definitely a consistent CLI user because I find it faster to jump around. That said, I definitely started with GUI tools so I don't have anything against them. #DevDiscuss
Use a good terminal, such as Guake or Tilix, that can be summoned by a keystroke. I put it on the top-left key of my keyboard (the one which was used to summon the console in Quake, circa 1996) #DevDiscuss
If you're a WordPress developer, I gotta say that WP CLI is the best thing since sliced bread. I'm a dedicated command line fanatic. If I can do it with a CLI I always will. #devdiscusshttps://t.co/aaUJuDCpXM
My favorite tip - keep your .bash_profile (or whatever environment config file) source controlled so you can share with your team, track updates, and keep the setup consistent between computers #DevDiscuss
Time for #DevDiscuss
Tonight's topic is: CLI tools and tricks
- Are you a consistent user of CLI tools or do you tend to opt for GUIs?
- What CLI tip for productivity or fun do you have for the community?
- What are your go-to CLI tools?
Let's chat!
So CLI vs. GUI for me depends on what I am doing. A standard git pull/push? CLI. Starting an application from scratch? CLI? Resolving merge conflicts? Please give me that GUI! #DevDiscuss
Also, I tend to avoid downloading someone else's aliases (.bashrc for example). I prefer to learn the commands the hard way, THEN create my own aliases. I understand and remember them easier this way. #DevDiscuss
Tools like create-react-app and angular-cli makes my life easier. Now, I have never had to eject an app, but I imagine it is great if I want to have custom things within an app #DevDiscuss
~/.ssh/config is often overlooked. It allows you to define configurations for each and every host you often connect to (username, port, which ssh key to use, etc) #DevDiscuss - same for ~/.my.cnf
Go-to CLI tools: The usual culprits honestly, screen, htop, docker, aws-cli, python, jq, grep, bat, tor, chrome, brew, apt-get. The list goes on. Probably a good 50-60% of my time on the command line is aws, ssh, git, and terraform. #DevDiscuss
No matter how much you love the CLI, don't GUI-shame. Lots of perfectly amazing programmers like working with GUIs, and it's perfectly fine.
There's some weird gatekeeping tendencies centered around the command line. #DevDiscuss
Time for #DevDiscuss
Tonight's topic is: CLI tools and tricks
- Are you a consistent user of CLI tools or do you tend to opt for GUIs?
- What CLI tip for productivity or fun do you have for the community?
- What are your go-to CLI tools?
Let's chat!
It's because in emergy situations (when your app crashed in prod), you have to stick to ssh and cli tools. As long as you can manage your way like this, it's *totally* fine for me that you use GUIs all day long. =) #DevDiscuss
No matter how much you love the CLI, don't GUI-shame. Lots of perfectly amazing programmers like working with GUIs, and it's perfectly fine.
There's some weird gatekeeping tendencies centered around the command line. #DevDiscuss
I view my CLI as my best friend. I use it every day and I find it easier for navigating my computer and running commands than clicking around with my mouse. #devdiscuss
I was taught the cli first, and couldn't really figure out a GUI. The one thing I do like about the command line (with git mostly) is it's the same all around. Some GUI's have bad UX and it confuses me more :(.
#DevDiscuss
As someone who has restarted their linux desktop/laptop multiple times for one reason or another, please back up your bash profile. (I never did, and I regretted it EACH and EVERY time.) #DevDiscuss
Things I still often use GUIs for: debugging production incidents, running database queries (especially ones that modify things). Nothing will ruin your night more than screwing up a CLI call that drops a production database table. #DevDiscuss
Wanna see something frikin' cool? Here's a CLI world map. I love stuff like this. Type this into your terminal if you have telnet installed: telnet https://t.co/6fzt07tT6w#devdiscuss
CLI tools as much as I can. You can alias most of the basic tasks down to 2 or 3 characters, it really speeds up the development cycle.
The Silver Searcher & FZF are my go-to tools #DevDiscuss
Time for #DevDiscuss
Tonight's topic is: CLI tools and tricks
- Are you a consistent user of CLI tools or do you tend to opt for GUIs?
- What CLI tip for productivity or fun do you have for the community?
- What are your go-to CLI tools?
Let's chat!
When it comes to any tooling:
Use whatever does what you want with the least trouble and time spent. That's it. That's all that matters.
Don't worry about what "everyone else" does. "Everyone" doesn't do anything. People are different. Do you.
#DevDiscuss
Time for #DevDiscuss
Tonight's topic is: CLI tools and tricks
- Are you a consistent user of CLI tools or do you tend to opt for GUIs?
- What CLI tip for productivity or fun do you have for the community?
- What are your go-to CLI tools?
Let's chat!
Yeah color coding is amazing for that too! I don't have to SSH a ton into environments, but if I did I would love that as it would help my anxiety!
#DevDiscuss
Learning to use aliases was one of the best things that I've discovered with my CLI. A tip that I used to often give others is chaining commands together using '&&'. I've now learned that ';' does the same thing with fewer keystrokes. #devdiscuss
In an ideal world, you're never logged directly into a production box.
Since most of us don't live in an ideal world, for the love of everything you hold dear, have a way to visually differentiate between test and prod. #DevDiscuss
Learning to use aliases was one of the best things that I've discovered with my CLI. A tip that I used to often give others is chaining commands together using '&&'. I've now learned that ';' does the same thing with fewer keystrokes. #devdiscuss
I have been doing Drupal FE Development for years, and drush has been pretty solid for me. I find a lot of the Drupal UI a bit hard to navigate, and drush has been a lifesaver!
#DevDiscuss
It's small and specific, but my favorite little git CLI command is: git log --graph --oneline
git log by itself can be overwhelming, but those two extra flags are game changers for readability and understanding branching. Especially when color is enabled! #DevDiscuss
Besides that downloading any software via my CLI is always satisfying to watch, especially if it's a large file. I also think @vuejs CLI is the best CLI I've ever used in my short dev career. #devdiscuss
Which is interesting. I type out every CLI command. I think my (weak) reasoning for this is, when I go to another computer, the aliases won't neccesarilly be there so I'd rather know the full command
I need to rethink how I use CLI, honestly. #DevDiscuss
It's small and specific, but my favorite little git CLI command is: git log --graph --oneline
git log by itself can be overwhelming, but those two extra flags are game changers for readability and understanding branching. Especially when color is enabled! #DevDiscuss
If I'm working on multiple projects, I like to set a short alias for each in my .bashrc so I can switch back and forth with ease without having to manually traverse the directory tree. #DevDiscuss
Honestly my one tip is there's no shame in keeping some cheat sheets around for commands that you're not 100% familiar on until they're second nature. I still have a git cheat sheet hanging around and one I made myself just in case I have a brain fart.
#DevDiscuss
My biggest pain point is going between work laptop and personal. Configuration vary just enough that running CLIs almost always ends poorly. #Devdiscuss
Time for #DevDiscuss
Tonight's topic is: CLI tools and tricks
- Are you a consistent user of CLI tools or do you tend to opt for GUIs?
- What CLI tip for productivity or fun do you have for the community?
- What are your go-to CLI tools?
Let's chat!
zsh with prezto in MacOS Terminal (NOT iTerm)
git cli is arcane but itβs just so much better for actually manipulating git than any GUI Iβve encounteredβ*except* JetBrainsβs conflict resolution tool
vim as neededβ¦but hjkl keybinding is for olds & hipsters #DevDiscuss
Time for #DevDiscuss
Tonight's topic is: CLI tools and tricks
- Are you a consistent user of CLI tools or do you tend to opt for GUIs?
- What CLI tip for productivity or fun do you have for the community?
- What are your go-to CLI tools?
Let's chat!
Can't resist the URGE to talk to you all about Gource. https://t.co/9jjC8nxZlH It's a way to visualize your project's commits. It's 100% useless, but highly addictive. You can even export to mp4. #DevDiscuss
Honestly, I'm not the biggest alias person. I'm probably being stubborn, but I switch computers a lot and I get so in the habit of doing things one way and it messes me up.
#DevDiscuss
I acutally love using the CLI. There's so many neat tricks you can do to make you efficient on the command line! I actually have a post that goes over a bunch like using !! to run the last ran command
https://t.co/HzQb7N3h3D#devdiscuss
if you're looking to hypercharge moving through the CLI, fasd works wonders for hotkeying between different files and directories #devdiscusshttps://t.co/DxGRJPVyAO
Time for #DevDiscuss
Tonight's topic is: CLI tools and tricks
- Are you a consistent user of CLI tools or do you tend to opt for GUIs?
- What CLI tip for productivity or fun do you have for the community?
- What are your go-to CLI tools?
Let's chat!
almost the same thing. They differ if the first command fails. Compare
$ false ; echo yep
yep
$ false && echo yep # has no output
The "&&" only executes the 2nd bit if the first succeeded; the ";" executes the 2nd bit unconditionally.
#devdiscuss
I have definitely seen quite a few people put dot files and aliases into Git repos so they can quickly get up to speed on a new machine. Just don't put secret things there. #DevDiscuss
In reply to
@Maxwell_Dev, @dsampaolo, @littlekope0903
As someone who has to delete and re-download node_modules/ because JavaScript, the fastest way to do it without my machine freezing up is with the command line lol. #DevDiscuss
If we're being honest, I don't quite understand why so many folks use zsh. I think I have just been stuck in various ways I have learned that I haven't taken the time to look into this. #DevDiscuss
Actually, my accessibility brain is thinking there should probably be a word (DEV), (TEST), or (PROD)....Command line color coding isn't always the more colorblind friendly.
#DevDiscuss
I almost always use CLI for Git, but still mostly prefer a GUI when staging hunks. Usually a lot faster than going through all the steps of git add -i #DevDiscuss
I am experimenting with zsh. Will report back once I have had more time with the experimentation. However, I am able to get cool plugins with zsh, but probably because I haven't experimented much w/ bash. #DevDiscuss
You have "||" as well, so you can do things like
$ grep -q 'some regex' file.txt && echo yep || echo nope
which is the same as
$ if grep -q 'some regex' file.txt ; then echo yep ; else echo nope ; done
or
$ long_process || play fail.wav
to notify of failure.
#DevDiscuss
Plus the meanings behind colors can be a lot more relative. That's only an issue if other people are using your setup though, but could still be a factor. #DevDiscuss
I'll say that my coworker brought me into zsh when I first started with the command line, and I have no plans to go back. Nothing against regular bash, but zsh's customizability is great. #DevDiscuss
"&&", "||" and ";" (and "&") all have their purposes, so it's helpful to know what each does so that you can pick the right tool for the job. Beginner-me didn't and it bit me a couple times before I did the digging to figure out what they actually meant.
#DevDiscuss
I β₯ that ease/precision too. I'm a sloppy mouser (and even worse with a track-pad or trackball or whatever) but I can touch-type. So a couple precise keystrokes or fumble imprecisely with the mouse? A no-brainer for me.
#DevDiscuss
One tip that I have is to not try TOO hard to optimize your dotfiles and bash configuration. At a certain point, there are diminishing returns for shortcutting/aliasing/speeding up your workflow.
I always try to refer to this classic xkcd!
https://t.co/ww1Z1nRmJo#devdiscuss
I β₯ that ease/precision too. I'm a sloppy mouser (and even worse with a track-pad or trackball or whatever) but I can touch-type. So a couple precise keystrokes or fumble imprecisely with the mouse? A no-brainer for me.
#DevDiscuss
Silver searcher for finding things. Fzf for all fuzzy finder needs. Ohmyzsh has really cool features such as tab completion for got and docker which comes very handy #DevDiscuss
The other big CLI win I find is composability. I can pipe together CLI commands that know nothing about each other; but try to get GUI program X to talk to GUI program Y without their explicit cooperation? Painsville. I'm too lazy for that. π
#DevDiscuss
If you know the [sometimes] obscure parameters for CLI(s), by all means, enjoy and extend to your needs; there is no need to shame the GUI users who perhaps have equally powerful and complex workflows. Having both available is what makes this profession so enjoyable!
#DevDiscuss
So much time- and sanity-savings there! A couple SSH hosts use alternate ports and remembering which tool uses "-p 2345" or "-P 2345" or "-o Port=2345"? If I had hair, I'd be pulling it out. Put "Port 2345" in .ssh/config and never think about it again.
#DevDiscuss
Make your configurations as simple as possible. If you have too much shortcuts, it's hard to use other people's computer (pair programming). SSHing to servers becomes tricky if you're used to your souped up terminal #DevDiscuss
I haven't seen any shaming of GUI users thus far... This is a thread about CLI and why we love it. That doesn't mean CLI-prone folk look down on GUIs... Am I missing something? #devdiscuss
If you want to dispose of any changes you've made since your last 'git pull', you can use 'git checkout .' #DevDiscuss Sometimes you just want to NOPE right out of whatever you were thinking.
I really love cli tools, but CLI authors still need to think about the usability of their cli apps. Without a --help or a man page, I get lost quick. Also, some forget that stdout, stderr are different. Stop printing errors to stdout #devdiscuss
There is still time to grab my Learn AWS By Using It course at 60% off the list price. If you are wanting to start learning all about the cloud, take advantage of this deal because it ends tonight. Use the coupon code learnaws18. https://t.co/10z3dHi2Hp#DevDiscuss
Create a directory that has one-of scripts and add it to your $PATH. It's cheap to store it, you never know when it's going to be useful again. As a rule of thumb, keep it if it took you more than 30min to write #DevDiscuss
I've seen two main drivers
β’ it's painful to watch people manually click their way through a GUI app when a little CLI automation would slice through the task (a good opportunity to teach!)
β’ learning CLI can be hard, potentially leading to a superiority complex βΉ
#DevDiscuss