whoiam

command module
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

README

Sketch fonts

whoiam is a lightweight CLI that keeps you oriented across multiple AWS accounts.

Made with VHS

Modern AWS setups involve a lot of accounts. Development, staging, production, sandboxes, client environments — and engineers switching between them constantly. Most credential tools are great at getting you into an account. whoiam answers the question you need answered before you act: am I in the right one?

Before any command runs, whoiam calls sts:GetCallerIdentity and compares the result against the account you declared you expected to be in. If they match, the command runs. If they don't, it exits immediately — before a single byte of infrastructure changes.

Features

  • Verify before you act — asserts the right account before any command runs, so context switches don't turn into incidents
  • Multi-account aware — map all your environments (dev, staging, production, sandbox) in one config and switch between them with a single command
  • Works with any credential source — aws-vault, SSO, instance profiles, environment variables; if the AWS SDK can see it, whoiam can verify it
  • AWS_PROFILE support — if your profile name matches an account in your config, whoiam uses it automatically; no extra flags needed
  • Shareable account map — commit .whoiam/whoiam.yaml so the whole team uses the same account IDs; personal session state stays out of git
  • CI and pipeline friendlywhoiam validate exits non-zero on mismatch, making it a drop-in pre-flight check for any pipeline

Installation

Homebrew

brew tap cliwright/cliwright
brew install whoiam

Download Binary

Download pre-compiled binaries from the releases page.

Build from Source

git clone https://github.com/cliwright/whoiam.git
cd whoiam
go build -o whoiam

Quick Start

Initialize a project-local config:

whoiam init

Edit .whoiam/whoiam.yaml to add your account mappings:

accounts:
  production:  "123456789012"
  staging:     "210987654321"
  development: "345678901234"

Pin the expected environment for this session:

whoiam set production

Run commands safely — whoiam verifies the account first:

whoiam exec -- terraform apply

Documentation

Full documentation at https://whoiam.cliwright.dev/.

License

Apache License 2.0. See LICENSE for details.

Documentation

Overview

Copyright © 2024 Jesse Maitland jesse@cliwright.com

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL