Skip to content

About

Type "aws ecs" in Raycast, hit Enter, land on the ECS console. 60 AWS services, one command each.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

AWS Console for Raycast

Type aws ecs, hit Enter, land on the ECS console. 60 AWS services, no clicking through the console nav.

┌─────────────────────────────────────────────────┐
│  🔍  aws ecs                                    │
├─────────────────────────────────────────────────┤
│  ▪  AWS ECS                       AWS Console   │
│  ▪  AWS ECS Clusters              AWS Console   │
└─────────────────────────────────────────────────┘
        ↩  →  eu-west-1.console.aws.amazon.com/ecs/v2/home?region=eu-west-1

Alfred had AWS Shortcuts. I switched to Raycast and missed it, so here it is — a weekend rebuild of the one Alfred workflow I actually used every day.

Install

git clone https://github.com/harryherbig/raycast-aws-console
cd raycast-aws-console
npm install
npm run dev     # registers the extension in Raycast — Ctrl-C once it says "built successfully"

The extension stays installed after you stop the dev process. Set your default region under Raycast → Extensions → AWS Console → Default Region (ships with eu-west-1).

Why one command per service

The obvious design is a single command with a searchable list, or a command argument. Both cost an extra step: Raycast's root search matches command titles, so aws ecs as one uninterrupted string can only work if a command is literally called AWS ECS.

So there are 60 of them. Each one is a single line:

// src/ecs.ts
export { default } from "./open";

They all share one handler, which figures out what to open from the name Raycast launched it under:

export default async function openConsole() {
  const service = services.find((s) => s.id === environment.commandName);
  const { region } = getPreferenceValues<{ region: string }>();
  await open(url(service, region));
}

That makes src/services.ts the only file with real content — a flat table of id, title, console path, keywords. node gen.mjs derives the 60 stubs and the commands array in package.json from it.

Icons

Every command carries its real AWS service icon, so the root search looks like the console's own nav. Getting them in took no image tooling at all:

// the official SVGs ship in the aws-icons package; macOS' own thumbnailer rasterises them
execFileSync("qlmanage", ["-t", "-s", "512", "-o", tmp, ...svgs]);

qlmanage is Quick Look — the thing that draws a preview when you hit Space in Finder. Pointed at an SVG it writes a 512px PNG, which is exactly the format Raycast wants for command icons. Staging each SVG as <service-id>.svg first means the output filename already matches the command name.

The icons are the official AWS Architecture Icons, pulled from the aws-icons package and browsable at aws-icons.com. They are wholly owned by Amazon Web Services, Inc., which permits their use in diagrams and materials of this kind — they are not covered by this repo's MIT license, and node gen.mjs regenerates them from scratch if you would rather not vendor them.

Adding a service

{ id: "transcribe", title: "Transcribe", path: "transcribe/home#welcome",
  icon: "AmazonTranscribe", keywords: ["speech"] },
node gen.mjs && npm run check && npm run build

icon is a basename from node_modules/aws-icons/icons/architecture-service; sub-pages just reuse their parent service's icon. A typo fails loudly in gen.mjs rather than shipping a blank command.

Layout

File Purpose
src/services.ts the service table + url() — the whole domain model
src/open.ts the one shared command handler
src/<id>.ts 60 generated one-line stubs
gen.mjs services table → package.json commands, stubs and assets/<id>.png
icon.mjs draws the extension icon from signed distance fields, so there is no binary to hand-edit
check.mjs node:assert checks for URL building and generator drift — no test framework

Details worth knowing

Region goes in the query string, before the fragment. The AWS console reads ?region= but half its pages keep their state in the hash, so naive concatenation silently drops you into us-east-1:

// lambda/home#/functions  →  https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1#/functions
const [path, hash] = s.path.split("#");
return `https://${region}.console.aws.amazon.com/${path}?region=${region}${hash ? `#${hash}` : ""}`;

Global services get no region at all. IAM, S3, Route 53, CloudFront, Organizations, Billing and friends are flagged global: true and resolve to plain console.aws.amazon.com.

Non-goals

No account or profile switching, no SSO handling, no resource-level search — this opens pages, and whichever account your browser is signed into is the one you get. If you need ecs → my-cluster → my-service, the official AWS extension talks to the API and does that properly.

All 60 commands
Command Service Scope
ec2 EC2 regional
ecs ECS regional
ecs-clusters ECS Clusters regional
eks EKS regional
ecr ECR regional
lambda Lambda regional
s3 S3 global
rds RDS regional
dynamodb DynamoDB regional
cloudwatch CloudWatch regional
logs CloudWatch Logs regional
insights CloudWatch Logs Insights regional
alarms CloudWatch Alarms regional
iam IAM global
identitycenter IAM Identity Center regional
vpc VPC regional
sg Security Groups regional
elb Load Balancers regional
targetgroups Target Groups regional
asg Auto Scaling Groups regional
route53 Route 53 global
cloudfront CloudFront global
acm Certificate Manager regional
cloudformation CloudFormation regional
codepipeline CodePipeline regional
codebuild CodeBuild regional
codedeploy CodeDeploy regional
sqs SQS regional
sns SNS regional
eventbridge EventBridge regional
stepfunctions Step Functions regional
apigateway API Gateway regional
ssm Systems Manager regional
params Parameter Store regional
secrets Secrets Manager regional
kms KMS regional
cloudtrail CloudTrail regional
athena Athena regional
glue Glue regional
kinesis Kinesis regional
firehose Data Firehose regional
msk MSK regional
elasticache ElastiCache regional
opensearch OpenSearch regional
efs EFS regional
amplify Amplify regional
appsync AppSync regional
cognito Cognito regional
sagemaker SageMaker regional
bedrock Bedrock regional
batch Batch regional
beanstalk Elastic Beanstalk regional
config Config regional
guardduty GuardDuty regional
waf WAF global
organizations Organizations global
billing Billing global
costexplorer Cost Explorer global
support Support Center global
healthdashboard Health Dashboard global

Every command also carries keywords, so aws kuber finds EKS, aws redis finds ElastiCache and aws log groups finds CloudWatch Logs.

License

MIT

About

Type "aws ecs" in Raycast, hit Enter, land on the ECS console. 60 AWS services, one command each.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages