Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Cyber Copilot ExtensionNew to Visual Studio Code? Get it now.
Cyber Copilot Extension

Cyber Copilot Extension

Solomon Nwachukwu

|
5 installs
| (0) | Free
A local-first, autonomous AI assistant for VS Code/Cursor.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cyber Copilot Extension

A local-first, autonomous AI assistant for VS Code and Cursor, powered by Ollama. Enhance your coding workflow with context-aware AI suggestions and automated code edits, all while keeping your data private.

Features

  • Sidebar Chat Interface: Interact with your AI assistant in a familiar chat panel, similar to GitHub Copilot.
  • Local AI Integration: Utilizes your local Ollama instance for AI model inference, ensuring privacy and offline capability.
  • Context-Aware: Automatically provides the content of your active editor to the AI for highly relevant suggestions.
  • Autonomous Code Editing: The AI can suggest granular code changes (insertions, deletions, replacements) directly to your active file.
  • Safety Guardrails: All AI-suggested code edits require explicit user confirmation before being applied, giving you full control.
  • Configurable Ollama: Easily set your Ollama API endpoint and preferred model (e.g., llama2, codellama) via VS Code settings.

Getting Started

Prerequisites

  1. VS Code or Cursor: Ensure you have Visual Studio Code or Cursor installed.
  2. Ollama: Download and install Ollama.
  3. Download an AI Model: Use Ollama to pull a model. For example, to get Llama 2:
    ollama pull llama2
    
    Or a coding-specific model like Code Llama:
    ollama pull codellama
    
    Ensure the model name you use here matches the cyberCopilot.ollamaModel setting in your VS Code settings.

Installation

  1. Clone this repository:
    git clone https://github.com/YourUsername/cyber-copilot-extension.git
    cd cyber-copilot-extension
    
  2. Install dependencies:
    npm install
    
  3. Compile the extension:
    npm run compile
    
  4. Open in VS Code:
    • Open VS Code.
    • Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X).
    • Click on the ... (More Actions) menu at the top right of the Extensions sidebar.
    • Select Install from VSIX... and navigate to the cyber-copilot-extension.vsix file which will be generated in the next step.

Building the VSIX for publishing

To create the .vsix file for distribution or manual installation:

npx vsce package

This will generate cyber-copilot-extension-0.0.1.vsix in your project root.

Usage

  1. Activate the Extension: After installation, a new "Cyber Copilot" icon will appear in your Activity Bar (usually on the left side of VS Code). Click it to open the chat panel.
  2. Configure Ollama (Optional but Recommended):
    • Go to VS Code Settings (Ctrl+, or Cmd+,).
    • Search for "Cyber Copilot".
    • Adjust Cyber Copilot: Ollama Url if your Ollama instance is not running on the default http://localhost:11434/api/generate.
    • Adjust Cyber Copilot: Ollama Model to specify the model you want to use (e.g., codellama, llama2).
  3. Start Chatting: Type your questions or coding requests into the input box in the sidebar panel. The AI will receive the content of your currently active editor as context.
  4. Review and Apply Edits: If the AI suggests a code change, it will appear in a special block with "Apply All" and "Discard" buttons. Click "Apply All" to preview the changes and confirm.

Troubleshooting

  • "Could not connect to Ollama":
    • Ensure Ollama is running on your machine. You can usually check its status or start it from your system tray or command line.
    • Verify that the Cyber Copilot: Ollama Url setting in VS Code matches your Ollama instance's actual URL and port.
  • No AI response:
    • Check if you have pulled a model using ollama pull <model_name>.
    • Ensure the Cyber Copilot: Ollama Model setting in VS Code exactly matches the name of the model you pulled.

Development

To set up the development environment:

  1. Clone the repository.
  2. Install dependencies and compile.
  3. Run in Debug Mode: Open the project in VS Code, go to the Run and Debug view (Ctrl+Shift+D or Cmd+Shift+D), and click the green play button to launch a new VS Code Extension Development Host window. This window will have the Cyber Copilot extension loaded.

Contributing

We welcome contributions! Please see the issue tracker for open issues or feature requests.

License

This project is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft