← 返回命令列表

Linux command

awsesh 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Launch the interactive TUI

sesh

Authenticate directly

sesh [MyOrg] [MyAccount] [AdminRole]

Open the AWS console in the browser

sesh [MyOrg] [MyAccount] [AdminRole] -b

Set credentials with a specific region

sesh [MyOrg] [MyAccount] [AdminRole] -r [eu-west-1]

Use a custom AWS profile name

sesh [MyOrg] [MyAccount] [AdminRole] --profile [production]

Show the current session identity

sesh -w

Output environment variables

sesh --eval [MyOrg] [MyAccount]

说明

awsesh (invoked as sesh) is a lightweight command-line tool for managing AWS SSO sessions and credentials. It provides an interactive terminal user interface built with Charm libraries (Bubble Tea, Bubbles, Lip Gloss) that allows users to browse SSO profiles, filter accounts by name with fuzzy search, select roles, and establish authenticated sessions. The tool operates in two primary modes. In interactive TUI mode, running sesh without positional arguments launches a full-screen terminal interface where users can add, edit, and delete SSO profiles, browse accounts with filtering, set per-account regions, assign custom profile names, and open accounts directly in the AWS console. In CLI mode, providing an SSO name, account name, and optionally a role name on the command line performs direct session authentication without the TUI. When a session is established, awsesh writes temporary credentials to the AWS shared credentials file (typically ~/.aws/credentials) and can set the following environment variables via shell integration: AWS_PROFILE, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, and AWS_SESSION_EXPIRATION. For organizations with over 100 SSO accounts, roles are lazy-loaded to avoid AWS API rate limiting.

参数

-v, --version
Display version information and exit
-b, --browser
Open the AWS console in the default browser instead of setting credentials
-w, --whoami
Print the current AWS account name and ID for the active session
-r _region_, --region _region_
Specify the AWS region to use for the session
-e, --eval
Output shell export commands to stdout for setting AWS environment variables; used for shell integration
-p _name_, --profile _name_
Use a custom AWS profile name for the credentials entry; the tool remembers profile names per account and role combination

FAQ

What is the awsesh command used for?

awsesh (invoked as sesh) is a lightweight command-line tool for managing AWS SSO sessions and credentials. It provides an interactive terminal user interface built with Charm libraries (Bubble Tea, Bubbles, Lip Gloss) that allows users to browse SSO profiles, filter accounts by name with fuzzy search, select roles, and establish authenticated sessions. The tool operates in two primary modes. In interactive TUI mode, running sesh without positional arguments launches a full-screen terminal interface where users can add, edit, and delete SSO profiles, browse accounts with filtering, set per-account regions, assign custom profile names, and open accounts directly in the AWS console. In CLI mode, providing an SSO name, account name, and optionally a role name on the command line performs direct session authentication without the TUI. When a session is established, awsesh writes temporary credentials to the AWS shared credentials file (typically ~/.aws/credentials) and can set the following environment variables via shell integration: AWS_PROFILE, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, and AWS_SESSION_EXPIRATION. For organizations with over 100 SSO accounts, roles are lazy-loaded to avoid AWS API rate limiting.

How do I run a basic awsesh example?

Run `sesh` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -v, --version do in awsesh?

Display version information and exit