ct smith

docs goblin

how I learned to stop worrying and love the terminal

November 28, 2025

It's been a busy few weeks for me professionally and personally, and I'm finally getting a little time to sit down and write another post.

Today I want to talk about how and why I use the terminal and various CLIs for tech writing tasks. A few writers I've talked to are a bit intimidated by the command line, and I think my biggest hope for this post is that the more CLI-reluctant among us might come away with a newfound confidence. Maybe you're trying to make a leap to docs-as-code. Maybe you want to be able to contribute to some open source projects to build your portfolio. Whatever you're trying to do, getting comfortable with the command line can unlock some cool tools for you.

Before I start, just a few notes:

Okay, let's get on with it.

what I do with the command line

If you've looked at any of the tooling I've built for technical writers, you might have noticed I tend toward building CLIs. This tendency is likely borne from the fact that I'm easily frustrated by UIs (Linear is the only UI that hasn't invoked an impotent rage in me). I strongly prefer working with text-based commands over GUIs for many of my tasks. I use CLIs for things like:

Notably, I DO prefer GitHub's visual diffs when I'm reviewing something, but I'm not even sure how to use most of the GitHub UI otherwise.

I want you to think about what you might use the command line for to make your job easier.

don't be scared of the command line, you can always CTRL + C your way out of something

I don't actually remember the first time I used the terminal, so I can't relate whether I was scared or filled with anxiety or anything. Maybe it's cause my earliest intros to computers were more text-command based?

Anyway just trust me -- there are very few ways to mess up, as long as you're not wildly copy-pasting random commands off the internet.

If you're still too nervous to try, copy a folder on your computer and use it as a test.

If I were learning the terminal for the first time again, I think these commands would come in most handy:

Navigation

Navigating in terminal is the first thing you should learn. I struggle so much with relative linking that I have a really hard time navigating back up, and sometimes just go back to my home directory and navigate back down. Now you all know my secret shame.

  • pwd - print working directory (shows where you are)
  • ls - list files in current directory
  • ls -la - list all files including hidden ones, with details
  • cd folder-name - navigate into a folder
  • cd .. - go up one level
  • cd ~ - go to your home directory
Viewing files

I don't use these commands a lot unless I'm debugging scripts I'm building that manipulate files. I know they're useful, they're just not part of my workflow most days.

  • cat filename.md - display entire file contents
  • head filename.md - show first 10 lines
  • tail filename.md - show last 10 lines
  • less filename.md - view file page by page (press q to quit)
Finding things

My docs repo is so large that VS Code's built in search struggles to find things sometimes. Grep is this girl's best friend. find finds things in file names, grep finds things in files.

  • grep "search term" filename.md - find text in a file
  • grep -r "search term" . - search recursively through all files (recursively means that it searches through all files in your current directory PLUS all files in all its subdirectories)
  • grep -i "search term" filename.md - case-insensitive search
  • find . -name "*.md" - find all markdown files
  • find . -name "*config*" - find files with "config" in the name
Counting things

Counting things can be useful, especially when you need a quick answer for how many files of some kind you might have (like when they change the UI on you again and you need to scope out the work to update ALL THE SCREENSHOTS AGAIN). Here are some of my favorite commands:

  • wc -l filename.md - count lines in a file
  • wc -w filename.md - count words in a file
  • wc -c filename.md - count characters in a file
  • ls *.md | wc -l - count how many markdown files you have
  • grep -r "term" . | wc -l - count how many times "term" appears across all files
  • git log --oneline | wc -l - count total number of commits
  • find . -name "*.png" | wc -l - count how many PNG files you have
File operations
  • cp file.md newfile.md - copy a file
  • mv oldname.md newname.md - rename/move a file
  • mkdir foldername - create a new directory
Git basics

I use many of these multiple times a day, simple git commands are good to know!

  • git status - see what's changed. I use this one like 10 times a day
  • git add . - stage all changes
  • git add filename.md - stage specific file
  • git commit -m "Your message" - commit with message
  • git pull - get latest changes from remote
  • git push - send your changes to remote
  • git log - see commit history
  • git log --oneline -5 - see last 5 commits, condensed
  • git diff - see what changed in unstaged files
  • git branch - list all branches (current branch marked with *)
  • git branch branch-name - create a new branch
  • git checkout branch-name - switch to a different branch
  • git checkout -b branch-name - create and switch to a new branch in one command
  • git branch -d branch-name - delete a branch (after merging)
Helpful shortcuts

I use most of these daily, sometimes multiple times.

  • Tab - autocomplete file/folder names
  • (up arrow) - cycle through previous commands. This is probably my #1 used trick, because I'm constantly needing to fix typos in my commands
  • Ctrl+C - cancel current command
  • Ctrl+L - clear the screen
  • command --help - see options for most commands
  • man command - full manual page (hit q to quit)
Piping and combining

Piping is fun, because it lets you send the output of one command to be used in the input of another command.

  • | - pipe output from one command to another
  • grep -r "term" . | wc -l - count how many times "term" appears
  • ls *.md | wc -l - count markdown files
Wildcards
  • * - matches anything (e.g., *.md = all markdown files)
  • ? - matches single character

I left out destructive commands, so it's safe for you to try these out. Just navigating around your files is a great way to get comfortable with using the terminal.

you try

Okay, for real -- you try. This is a simple task that will help you figure out where you are, and some basic navigation.

  1. Just open up whatever terminal you have on your machine, and type pwd. That will print your working directory, which is the folder you're currently in.
  2. Then, type ls -- this lists the files and directories in your current working directory. If you see something listed that doesn't have a file extension, there's a pretty good chance it's a folder.
  3. Try typing cd folder, where folder is one of the values, to change directory and go into the folder.
  4. Now type pwd again. You should see a different value print than the first time.
  5. Okay, now type cd .. to go back up one directory.
  6. Type pwd. It should be the same as when you started.

Congrats! You just used the terminal to navigate around.

Here's an example from my computer:

Screenshot of a simple terminal session showing navigation through a directory

I really encourage you to try the navigation commands and search a little with grep. I promise that you're not going to hurt anything.

the end

If you're afraid of the command line, and this post has helped at all, let me know. I love it when other tech writers try a new thing cause I was loudly and unabashedly enthusiastic about it. You're smart enough!

After you get comfortable with using the command line, you can start scripting the boring parts of your job, and eventually you might build yourself a nice little CLI bundle with all your timesaving scripts. I'll talk a little bit about my approach to scripting in my next post.