Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CodeWizNew to Visual Studio Code? Get it now.
CodeWiz

CodeWiz

Preview

Felvin

|
559 installs
| (0) | Free
Make ChatGPT your partner to improve your programming experience.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeWiz


CodeWiz

Use the power of OpenAI's ChatGPT LLM model to write, refactor, generate, and more!

CodeWiz Demo

With just one click, you can create files/projects, fix your code, or utilize OpenAI's official ChatGPT APIs without any configuration! Simply put your API key in the settings, and begin!

How to use?

  • Select the code you want to modify
  • Open the command pallelt with "CMD+shift+P"
  • Search for CodeWiz, select 'send arbitrary command'
  • Enter what change you want to make to the selected code, press enter

Features

The extension includes a context menu of commands that enables you to send the chosen text or code to the ChatGPT service and display the output in the ChatGPT panel. This panel allows you to copy or move the code to the current file or create a new file and then move the result there.

API Key

Upon installation, you will be prompted to enter your OpenAI API key. as an alternative you can also enter it into your Visual Studio Code settings.json file:

{
  "codewiz.apiKey": "YOUR API KEY"
}

Available Commands

  • CodeWiz: Ask Anything
  • CodeWiz: Refactor Code
  • CodeWiz: Generate Comment
  • CodeWiz: Generate Code
  • CodeWiz: Generate Tests
  • CodeWiz: Find Bugs
  • CodeWiz: Optimize Code
  • CodeWiz: Explain Code
  • CodeWiz: Clear Conversation
  • CodeWiz: Export Conversation
  • CodeWiz: Rewrite Selection
  • CodeWiz: Send Selection

Refactor Code

Refactor Code

Generate Comment

Generate Comment

Generate Code

Generate Code

Generate Tests

Generate Tests

Find Bugs

Find Bugs

Optimize Code

Optimize Code

Explain Code

Explain Code

Rewrite Selection

Rewrite Selection

Customize your code prompts or use defaults

        "codewiz.promptPrefix.addTest": {
          "default": {
            "default": "Generate tests:"
          },
          "description": "The prompt prefix used for adding tests for the selected code",
          "type": "object"
        },
        "codewiz.promptPrefix.summarize": {
          "description": "The prompt prefix used for summarizing text.",
          "default": "Summarize text: ",
          "type": "string"
        },
        "codewiz.promptPrefix.comment": {
          "default": {
            "default": "Generate short comment: "
          },
          "description": "The prompt prefix used to generate comment for selected code.",
          "type": "object"
        },
        "codewiz.promptPrefix.explain": {
          "default": {
            "default": "Explain code: "
          },
          "description": "The prompt prefix used for explaining the selected code",
          "type": "object"
        },
        "codewiz.promptPrefix.findProblem": {
          "default": {
            "default": "Find problems: "
          },
          "description": "The prompt prefix used for finding problems for the selected code",
          "type": "object"
        },
        "codewiz.promptPrefix.generate": {
          "default": {
            "default": "Generate code: "
          },
          "description": "The prompt prefix used generate code base on text",
          "type": "object"
        },
        "codewiz.promptPrefix.optimize": {
          "default": {
            "default": "Optimize code: "
          },
          "description": "The prompt prefix used for optimizing the selected code",
          "type": "object"
        },
        "codewiz.promptPrefix.refactor": {
          "default": {
            "default": "Refactor code and explain what's changed: "
          },
          "description": "The prompt prefix used for refactoring the selected code",
           "type": "object"
        },
        "codewiz.promptPrefix.rewrite": {
          "default": "Rewrite following sentence: ",
          "description": "Will try to rewrite sentences.",
          "type": "string"
        },
        "codewiz.promptPrefix.arbitrary": {
          "default": "Execute the following command on the given code:",
          "description": "The prompt prefix used for sending arbitrary command to ChatGPT",
          "type": "string"
        }

If you wish to set prompts based on file type, simply include the file name and the prompt value you desire:

        "codewiz.promptPrefix.addTest": {
          "typescript": "Generate tests typescript:"
        }

Set Prompts Base on File type

Extension Options

        "codewiz.apiKey": {
          "description": "Openai api key to communicate with chatgpt api",
        },
        "codewiz.maxTokens": {
          "default": 1000,
          "description": "The maximum number of [tokens](https://github.com/felvin-search/codewiz/blob/HEAD/tokenizer) to generate in the completion.  The token count of your prompt plus `max_tokens` cannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).",
        },
        "codewiz.model": {
          "default": "text-davinci-003",
          "description": "ID of the model to use. You can use the [List models](https://github.com/felvin-search/codewiz/blob/HEAD/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](https://github.com/felvin-search/codewiz/blob/HEAD/docs/models/overview) for descriptions of them.",
        }

Disclaimer

  • There are no assurances that this extension will operate seamlessly and without any adverse effects. Therefore, it is recommended that you exercise caution while using it, as it may undergo modifications that are beyond our control. For instance, OpenAI may introduce unanticipated changes to some or all of its functionalities, which could potentially affect the performance of this extension.

  • The extension will employ an API Key that is saved in the settings.json file. It is important to note that VS Code has the ability to synchronize this key across its various instances, and this is not within the purview of this extension. If this is a concern for you, it is recommended that you refrain from utilizing the extension.

  • The extension will solely gather metadata to enhance its functionalities, and it will not gather any personally identifiable information. You have the option of enabling or disabling telemetry by setting either 'telemetry.telemetryLevel' or 'codewiz.telemetry.disable' to their corresponding values. The extension will only collect metadata if both of these settings have permitted telemetry.

  • We cannot be held responsible for any problems that may occur as a result of using this extension. It should also be noted that your use of OpenAI services is subject to OpenAI's own terms and conditions.

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