An intelligent Windows desktop application that translates natural language into PowerShell commands, with risk analysis, visual output, and command history.
Command-line interfaces are powerful but often difficult for beginners because they require memorizing commands and syntax.
OpticCli simplifies this experience by allowing users to describe tasks in plain English and receive AI-generated PowerShell commands that can be reviewed, customized, and executed safely.
- C#
- WPF
- .NET Framework 4.8
- PowerShell 7.4
- Groq API (LLaMA 3.3 70B)
- Newtonsoft.Json
- XAML
- System.Speech
If you just want to run the app immediately:
- Extract
mysetup.zip - Double-click
mysetup.exe - App launches instantly — no setup needed
- Requires Windows 10/11 and internet connection for AI features
Before running OpticCli, ensure you have:
- Windows 10 or Windows 11 (64-bit)
- .NET Framework 4.8 (pre-installed on Windows 10/11)
- PowerShell 7.4+
- Visual Studio 2022 (Community or higher)
- A valid Groq API key — get one free at https://console.groq.com
-
Clone or extract the project folder
-
Open
OpticCli.slnin Visual Studio 2022 -
Restore NuGet packages:
Tools → NuGet Package Manager → Restore Packages -
Set your API key — open
Services/AIService.csand replace:private const string ApiKey = "your_groq_api_key_here"; -
Build the solution:
Ctrl + Shift + B -
Run the application:
Ctrl + F5
| Package | Version | Purpose |
|---|---|---|
| Newtonsoft.Json | 13.x | JSON parsing for AI responses and history |
| System.Speech | 8.x | Windows Speech Recognition (voice input) |
OpticCli/
├── Models/
│ ├── CommandSuggestion.cs # AI suggestion model + RiskLevel enum
│ └── HistoryEntry.cs # History and file result models
├── Services/
│ └── AIService.cs # Groq API integration (llama-3.3-70b-versatile)
├── Views/
│ ├── HomeView.xaml/.cs # Natural language search screen
│ ├── SuggestionsView.xaml/.cs # AI command suggestions + risk badges
│ ├── CustomizeView.xaml/.cs # Parameter customization GUI
│ ├── OutputView.xaml/.cs # Execution results + table visualization
│ ├── HistoryView.xaml/.cs # Command history log
│ └── TitleBarControl.xaml/.cs # Custom title bar
├── Converters/
│ └── Converters.cs # Risk-to-color WPF value converters
├── ShellWrapper.cs # PowerShell/CMD execution engine
├── HistoryStore.cs # JSON-based persistent history (100-entry FIFO)
├── App.xaml/.cs # Application entry point + global styles
└── IsExternalInit.cs
└── README.md
| # | Feature | Description |
|---|---|---|
| 1 | Natural Language Search | Type plain English, get PowerShell commands |
| 2 | Risk Analysis | Every command rated Safe / Medium / High |
| 3 | Output Visualization | Results parsed into interactive tables or in raw form |
| 4 | Parameter GUI | Customize flags and paths before execution |
| 5 | Command History | Searchable log with re-run capability |
| 6 | Error Explanation | AI explains failed commands in plain language |
| 7 | Data Export | Export results to CSV or JSON if valid |
- Type a natural language request in the search box
e.g.
"Find all PDF files on this drive" - Click Discover Commands or press
Enter - Review the AI-suggested commands with their risk badges
- Click Customize Selected to adjust parameters, or Run As-Is
- Review the structured output table if valid or in raw form
- Export results or view command history as needed
- High Risk commands require explicit confirmation before execution
- Commands are never auto-executed — user approval is always required
- The AI service enforces a 3-attempt lockout (15 minutes) on API failures
- History is stored locally at
%AppData%\OpticCli\history.json
| Name | ID | Role |
|---|---|---|
| Kanwal Fatima | Frontend, AI Integration, Command Parsing | |
| Nishan Muhammad Nusky | Architecture, Database, Documentation |
Department of Computer Science National University of Computer and Emerging Sciences, Islamabad
- Frontend development using WPF and XAML
- Groq API integration
- AI response parsing
- Command suggestion workflow
- User interface design and implementation





