โ† Back to list

๐Ÿ” This CLI Tool Solved My AWS SSO Credentials Nightmare (DEPRECATED)

Update (June 2026): This tool has evolved a lot and is now awssesh โ€” simpler, faster, npm-installable. ๐Ÿ‘‰ Read the current version here.

Walid Karray ยท 2026-03-26 20:59 ยท 2 claps ยท 3.4 min read
#aws #aws-iam #aws-sso #devtools #cli
Open on Medium โ†—
Wiki topics: โ˜๏ธ ยท DevOps & Cloud

๐Ÿ” This CLI Tool Solved My AWS SSO Credentials Nightmare (DEPRECATED)

Update (June 2026): This tool has evolved a lot and is now awssesh โ€” simpler, faster, npm-installable. ๐Ÿ‘‰ Read the current version here.

Every day, same story. ๐Ÿ˜ค Tokens expire. Deploys break at the worst possible time. Iโ€™m running aws sso login five times a day across 10+ AWS accounts, juggling browser tabs and verification codes โ€” all while trying to actually get work done.

I couldnโ€™t find a tool that handled this properly. So I built one. ๐Ÿ› ๏ธ

๐Ÿ˜ฉ The Daily Pain

If you manage multiple AWS accounts through SSO, you already know this pain intimately:

๐Ÿ” Open terminal. Run a command. Open browser. Enter code. Wait. Repeat. โ“ No idea which profiles are still valid and which expired an hour ago. ๐Ÿ’ฅ A deploy breaks silently because a token expired mid-way. ๐Ÿšซ No dashboard. No bulk operations. Just one profile at a time, manually.

The AWS CLI gives you aws sso login โ€” profile my-profile. One profile. One at a time. Every. Single. Time. โณ

After months of this frustration, I decided to build the tool I always wished existed โ€” and thatโ€™s how SSOmatic was born. ๐Ÿš€

โšก What SSOmatic Does

SSOmatic is a single CLI tool that auto-discovers every SSO profile in your ~/.aws/config and gives you a live status dashboard โ€” instantly. No configuration files. No setup steps. Just run it and see everything at a glance.

On first launch, it scans your config, finds all your profiles โ€” including sso-session blocks โ€” and shows you exactly whatโ€™s valid, whatโ€™s expired, and what needs attention. ๐ŸŸข Green dot means youโ€™re good. ๐Ÿ”ด Red dot means itโ€™s time to refresh. Simple as that.

๐Ÿ”„ Bulk Refresh Changed Everything

This is the feature that genuinely saved my sanity. Select the profiles you want, hit Enter, and SSOmatic handles the entire SSO device auth flow for each one โ€” token polling, caching, credential writing. You just approve in the browser. Thatโ€™s it. โœ…

I also added a favorites system โ€” so your most-used profiles are always pre-selected. One keystroke to refresh everything you need for the day. โญ

๐Ÿ‘ป The Daemon That Runs in the Background

This is the real game-changer. Set a refresh interval โ€” 15 minutes, 30 minutes, whatever fits your workflow โ€” pick your profiles, and SSOmatic silently keeps them alive in the background. It refreshes tokens before they expire and sends desktop notifications when something needs your manual attention. ๐Ÿ””

No more mid-deploy surprises. No more โ€œwhich profile expired?โ€ guessing games. Just peace of mind. ๐Ÿ˜Œ

๐ŸŒ Press W, Get a Web Dashboard

This is the feature Iโ€™m most proud of. While building the CLI, I realized that sometimes I just want a browser tab I can glance at without switching context. So I embedded a web server directly into the CLI โ€” no extra process, no separate install.

Press w in the terminal. A sleek dark-mode web dashboard spins up on localhost instantly. Same data, same profiles, same live status โ€” just beautifully rendered in React with Tailwind. Press w again and the server stops. ๐ŸŽจ

One binary. Two interfaces. Your preference is remembered too โ€” next time you launch SSOmatic, the web server starts automatically if you had it on before. ๐Ÿ’ก

๐Ÿ› ๏ธ The Technical Side

For those who want to peek under the hood โ€” hereโ€™s the stack:

โšก Bun as the runtime โ€” blazing-fast startup and single binary compilation. ๐Ÿ–ฅ๏ธ React + Ink for the terminal UI โ€” yes, actual React, in the terminal. ๐ŸŒ React + Vite + Tailwind for the web dashboard. ๐Ÿ’ช TypeScript everywhere. ๐Ÿ”— The web server is a Bun HTTP server with a simple RPC bridge to the same credential logic the CLI uses.

The whole project is a flat, single-package structure. No monorepo madness. No workspace complexity. One entry point, one build command. Clean and simple. ๐Ÿงน

๐ŸŒ Itโ€™s Open Source

I built SSOmatic to scratch my own itch โ€” but if youโ€™re dealing with the same AWS SSO pain, Iโ€™d love for you to give it a try. Itโ€™s free, open source, and actively maintained.

๐Ÿ’ป Install via Homebrew (macOS / Linux):

brew install tux86/tap/ssomatic

GitHub: https://github.com/tux86/ssomatic

Install it, fire up bun run start, and let me know what you think. Issues, feedback, and PRs are all very welcome โ€” I read everything. ๐Ÿ™Œ

If you work with AWS SSO across multiple accounts and this resonates with you, share it with your team. Chances are theyโ€™re suffering through the exact same manual refresh cycle โ€” and theyโ€™ll thank you for it. ๐Ÿ’ฌ

#AWS #DevTools #OpenSource #CLI #TypeScript #Bun #CloudEngineering #DevOps


๋ฉ”ํƒ€๋ฐ์ดํ„ฐ
post_id
b89b03bed097
slug
this-cli-tool-solved-my-aws-sso-credentials-nightmare-b89b03bed097
url
https://medium.com/@walid.karray/this-cli-tool-solved-my-aws-sso-credentials-nightmare-b89b03bed097
canonical_url
https://medium.com/@walid.karray/this-cli-tool-solved-my-aws-sso-credentials-nightmare-b89b03bed097
author_url
https://medium.com/@walid.karray
status
ok
fetched_at
2026-06-28 04:42:08