Skip to main content

Commands

CommandDescription
profselSelect an AWS profile and export it to your shell
consoleOpen the AWS console for the current profile
ec2Unified EC2 command — pick instance, choose action
ec2lsList EC2 instances as table or JSON
ec2connectConnect via SSH or SSM Session Manager
ec2findFind instances across all profiles in a group
ec2stopstartStop or start an instance
ec2schedulerToggle the InstanceScheduler tag
ecsconnectInteractive shell into an ECS container

Other commands #

bmc version                    # Show version
bmc doctor                     # Check dependencies and setup
bmc install-shell-integration  # Install profsel shell wrapper
bmc completion bash|zsh|fish   # Generate shell completions

profsel

bmc profsel interactively selects an AWS profile and exports it as AWS_PROFILE in your current shell.

Usage #

bmc profsel              # Interactive profile selection
bmc profsel -p myprofile # Pre-select a profile by name
bmc profsel -l           # List all profiles in tabular format
bmc profsel --json       # Output selected profile as JSON

Shell integration required #

bmc profsel must be invoked through the shell wrapper for AWS_PROFILE to be set in your current shell. Install it once with:

console

bmc console opens the AWS Management Console in your browser for the current or selected AWS profile.

Usage #

bmc console              # Open console for current profile (AWS_PROFILE)
bmc console -p myprofile # Open console for a specific profile
bmc console -p           # Force interactive profile selection
bmc console -s ec2       # Open console at a specific service URL

Browser options #

The Granted Firefox extension enables container tabs — each AWS profile opens in its own isolated container with separate cookies and sessions.

ec2

bmc ec2 is the unified entry point for EC2 operations. Pick an instance once and choose an action from a menu — no need to repeat instance selection across separate commands.

Usage #

bmc ec2              # Interactive instance picker → action menu
bmc ec2 nginx        # Filter instances by name/ID/IP first
bmc ec2 i-0abc123    # Single match skips the picker

The optional search argument filters instances by a case-insensitive substring match on instance name, ID, private IP, or public IP.

ec2ls

bmc ec2ls lists all EC2 instances in the current AWS profile.

Usage #

bmc ec2ls            # Display as interactive table
bmc ec2ls --json     # Output as JSON array

Table output #

The table columns are configurable via ec2.columns in ~/.config/bmc/config.json. See Configuration.

JSON output #

--json outputs all instances as a JSON array with AWS PascalCase keys, ignoring the columns config:

ec2connect

bmc ec2connect connects to a running EC2 instance via SSH or AWS SSM Session Manager.

Usage #

bmc ec2connect               # Interactive instance picker
bmc ec2connect nginx         # Filter instances by name/ID/IP first
bmc ec2connect -i i-0abc123  # Connect to a specific instance ID
bmc ec2connect -u ubuntu     # SSH as a specific user (skips method picker)

Connection methods #

SSH #

Requires ssh on your PATH. BMC prompts for the SSH user (root, ubuntu, ec2-user, or custom) unless -u is specified.

ec2find

bmc ec2find searches for EC2 instances across all AWS profiles in an account group simultaneously.

Usage #

bmc ec2find nginx            # Search across profiles (select group interactively)
bmc ec2find nginx --json     # Same search, output as JSON array

How it works #

  1. You select an AWS account group from an interactive picker
  2. BMC queries all profiles in that group in parallel
  3. Results matching your search string are shown

The search is a case-insensitive substring match on: instance ID, name, private IP, public IP, and profile name.

ec2stopstart

bmc ec2stopstart stops or starts an EC2 instance interactively.

Usage #

bmc ec2stopstart     # Pick instance → stop or start

BMC shows the current state of the selected instance and offers the appropriate action (Stop or Start). For hibernate-enabled instances, Stop also offers a hibernate option.

Stopping with hibernate #

If an instance has hibernation configured (Hibernate: yes in ec2ls), BMC will ask whether to hibernate instead of a cold stop. Hibernation saves RAM to disk and resumes faster.

ec2scheduler

bmc ec2scheduler enables or disables the AWS Instance Scheduler tag on an EC2 instance.

Usage #

bmc ec2scheduler     # Pick instance → enable or disable scheduler

What it does #

The command adds or removes the InstanceScheduler tag on the selected instance. AWS Instance Scheduler uses this tag to automatically start and stop instances on a configured schedule — useful for saving costs on non-production environments.

ecsconnect

bmc ecsconnect opens an interactive shell into a running ECS container.

Usage #

bmc ecsconnect     # Interactive: pick cluster → service → task → container

The command walks you through selecting:

  1. ECS cluster
  2. Service
  3. Task
  4. Container

Then launches an interactive shell via AWS SSM.

Prerequisites #

  • aws CLI v2
  • session-manager-plugin

Check with: