Question: Is there a way to get the name of the user, given only their username?

Something like this output `git show <username>` (I know this doesn't work)

```
username: username
name: First Last
email: email@address

```

I know I can do this with a GitHub api call, but would prefer to keep it within the CLI.

Answer: 
*Git itself* (the command line client, i.e. the ["stupid content tracker"](https://git-scm.com/docs/git)) has no notion of user names, only GitHub does. In other words: there is no mapping of GitHub usernames to author/committer names and e-mails stored in a Git repository.

When creating a commit with Git it uses the configuration values of `user.name` (the real name) and `user.email` (email address). Those config values can be overridden on the console by setting and exporting the environment variables `GIT_{COMMITTER,AUTHOR}_{NAME,EMAIL}`.

Git doesn't know anything about GitHub's users, because GitHub is not part of Git. So you're only left with an API call to GitHub (I guess you could do that from the command line with a little scripting and make that a [Git alias](https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases).)
While its true that git commits don't have a specific field called "username", a git repo does have users, and the users do have names. ;) If what you want is the github username, then knittl's answer is right. But since your question asked about git cli and not github, here's how you get a git user's email address using the command line:

To see a list of all users in a git repo using the git cli:

```
git log --format="%an %ae" | sort | uniq

```

To search for a specific user by name, e.g., "John":

```
git log --format="%an %ae" | sort | uniq | grep -i john

```