Skip to content

Commit

Permalink
Rearrange
Browse files Browse the repository at this point in the history
  • Loading branch information
yen223 committed Nov 6, 2024
1 parent f08d3cb commit 16ba918
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions articles/useful-macos-cmd-line-utilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,22 @@ tags:
description: "macOS comes with a lot of built-in utilities. Here's a list of some that I find interesting."
---

Sometimes when I'm bored, I like to look at the list of [macOS Bash commands](https://ss64.com/mac/). Here's some commands that I found interesting.
Sometimes when I'm bored, I like to look at the list of [macOS Bash commands](https://ss64.com/mac/). Here's some commands that I found interesting:


## Access your Keychain programmatically

If you store your secrets in the Keychain (and you should!), you can access them programmatically using `security`.

```bash
security find-internet-password -s "https://example.com"
```

I found this useful for writing automated scripts that used locally-stored credentials.

Link: [https://ss64.com/mac/security.html](https://ss64.com/mac/security.html)

Bonus tip: If you are using 1Password, there is a [1Password CLI](https://developer.1password.com/docs/ssh/get-started#install-the-1password-cli) that you can use to access your 1Password items from the command line.

## Open files from the terminal

Expand Down Expand Up @@ -90,21 +105,6 @@ I use this mostly to prevent my Mac from sleeping when I am running a server.

Link: [https://ss64.com/mac/caffeinate.html](https://ss64.com/mac/caffeinate.html)

## Access your Keychain programmatically

If you store your secrets in the Keychain (and you should!), you can access them programmatically using `security`.

```bash
security find-internet-password -s "https://example.com"
```

I found this useful for writing automated scripts that used locally-stored credentials.

Link: [https://ss64.com/mac/security.html](https://ss64.com/mac/security.html)

Bonus tip: If you are using 1Password, there is a [1Password CLI](https://developer.1password.com/docs/ssh/get-started#install-the-1password-cli) that you can use to access your 1Password items from the command line.


## Generate UUIDs

If you need to generate a UUID, you can use the `uuidgen` command.
Expand Down

0 comments on commit 16ba918

Please sign in to comment.