DEV Community

Cover image for COSMIC SAFECLI
Anuj Sharma
Anuj Sharma

Posted on

COSMIC SAFECLI

GitHub Copilot CLI Challenge Submission

This is a submission for the GitHub Copilot CLI Challenge

What I Built

I built Cosmic SafeCLI, a command-line safety assistant that helps users understand terminal commands before running them.

It explains each part of a command in simple English, detects risky operations (like rm -rf or git reset --hard), and uses GitHub Copilot CLI to suggest a safer alternative.
Instead of blocking execution, it lets the user learn and decide whether to run or cancel the command.

The goal is to prevent accidental damage and turn the terminal into something that teaches, not just executes.

Demo

GitHub Repo link :https://github.com/ANUJ-codes07/Cosmic-SafeCli

My Experience with GitHub Copilot CLI

While building Cosmic SafeCLI, I didn’t use GitHub Copilot CLI just to generate code — I used it as a real-time decision engine inside the application.

Whenever a risky command is detected, the tool sends the command to Copilot CLI with a safety-focused prompt and shows the safer alternative it suggests. This made Copilot act like a terminal mentor, helping users understand consequences instead of blindly executing commands.

What I liked most is that Copilot adapts suggestions to context rather than giving fixed rules. Instead of hard-coding every possible dangerous case, the app can intelligently guide the user at runtime.

It changed my perspective: AI in development shouldn’t only help write commands — it should help humans make safer decisions.

Top comments (0)