AWS Commander
A terminal-based user interface (TUI) for interacting with AWS services. AWS Commander provides an intuitive, keyboard-driven interface for browsing and managing AWS resources without leaving your terminal.
Features
- Interactive TUI: Navigate AWS resources using keyboard shortcuts
- Multiple AWS Service Support:
- DynamoDB (tables, scan, query with support for GSI/LSI)
- S3API (buckets, objects)
- SQS (queues, messages)
- And more...
- DynamoDB Query Builder: Interactive form-based query builder with automatic key detection
- Smart JSON Viewer:
- Tree-based JSON visualization
- Toggle between DynamoDB format and regular JSON (press 'n')
- Support for nested JSON parsing
- Base64 gzip decompression
- Reserved Word Handling: Automatic handling of DynamoDB reserved words in queries
- Pagination Support: Navigate through large result sets with next/previous page
- Profile Management: Switch between AWS profiles
- Search: Quick search across results (press ':')
- Copy to Clipboard: Copy data with 'y' key
Table of contents
- Installation
- What the Project Does
- Key Bindings
- Development
- Prerequisites
- Getting Started
- Running the Application
- Project Structure
- Build and Test
- Versioning
Installation
Homebrew
brew tap cmd-tools/homebrew-tap
brew install aws-commander
From source
go install github.com/cmd-tools/aws-commander@latest
Manual download
Download the latest binary for your platform from the Releases page.
What the Project Does
AWS Commander is a terminal UI that wraps the AWS CLI, providing:
- Easy AWS Resource Navigation: Browse services → resources → details without remembering CLI commands
- DynamoDB Query Interface:
- Automatically detects table keys (PK/SK) from table schema
- Builds proper query expressions with expression attribute names/values
- Handles DynamoDB reserved words (like STATUS, DATA, NAME, etc.)
- Supports querying Global and Local Secondary Indexes
- Smart JSON Inspection:
- View DynamoDB items in both DynamoDB JSON format (
{"S": "value"}) and regular JSON format
- Toggle between formats with the 'n' key
- Expand stringified JSON fields
- Decompress base64-gzipped data
- S3API Navigation: Browse buckets and objects
- Result Caching: Fast navigation with intelligent result caching
Key Bindings
| Key |
Context |
Description |
ESC |
Global |
Go back / Navigate up |
: |
Global |
Open search bar |
n |
Table view |
Next page (pagination) |
p |
Table view |
Previous page (pagination) |
v |
JSON viewer |
Toggle DynamoDB/Normal JSON format |
y |
Any view |
Copy (yank) current selection to clipboard |
Ctrl+C |
Any view |
Copy current selection to clipboard |
Enter |
Table view |
View item details or navigate into selection |
Enter |
JSON viewer |
Expand stringified JSON or decompress gzip |
? |
Global |
Show help |
Development
Prerequisites
This project requires:
- Go 1.24.0 or later
- AWS CLI
- Docker (optional, for LocalStack)
make (optional, for LocalStack)
Windows: MinGW or Cygwin
Linux: apt install make
Mac: brew install make
Getting Started
-
Clone the repository:
git clone https://github.com/cmd-tools/aws-commander.git
cd aws-commander
-
Install dependencies:
go mod tidy
-
Build the application:
go build -o aws-commander .
-
Run the application:
./aws-commander
Or run directly with Go:
go run .
-
Enable logging (optional):
- Add
--logview flag to show logs in the application
- Or tail the log file:
tail -f $TMPDIR/aws-commander.log (macOS/Linux)
Running the Application
With LocalStack (Development)
When using LocalStack, AWS Commander automatically uses the localstack profile configured in the project.
# Start LocalStack
make up
# Run AWS Commander
./aws-commander
# Stop LocalStack
make down
With Real AWS Account
Ensure you have AWS CLI configured with valid credentials:
# Configure AWS CLI (if not already done)
aws configure
# Run AWS Commander
./aws-commander
The application will prompt you to select an AWS profile from your ~/.aws/credentials file.
Navigation Flow Example
- Start the application
- Select a profile (e.g.,
localstack, default, or your custom profile)
- Select a service (e.g.,
dynamodb, s3api, sqs)
- Select a resource (e.g., table name, bucket name)
- Select an action (e.g.,
scan, query, list-objects)
- View results in table format
- Press
Enter on a row to view JSON details
- Press
v in JSON view to toggle between DynamoDB and regular JSON format
- Press
ESC to go back
- Press
: to search within results
Project Structure
| Package |
Purpose |
main (root) |
Entry point, handlers, views, navigation, search |
cmd/ |
Domain types, config loading, UI state |
cmd/profile/ |
AWS profile discovery and SSO handling |
parser/ |
Command output parsing and content view creation |
ui/ |
Reusable TUI components (table, list, tree, modal, toast) |
executor/ |
Shell command execution wrapper |
logger/ |
Logging singleton |
constants/ |
Shared string constants |
helpers/ |
String utilities, AWS version detection |
configurations/ |
YAML service definitions for AWS commands |
Build and Test
# Build
go build ./...
# Run all tests
go test ./...
# Run tests with race detector
go test -race ./...
# Run a specific test
go test ./parser/ -run Test_ParseCommand_Object
# Static analysis
go vet ./...
# Format check
gofmt -l .
Versioning
We use SemVer for versioning.