---
title: "VS Code Setup"
description: "Complete guide to installing and configuring Autohand Code in Visual Studio Code. Master AI-assisted coding with powerful IDE integration."
seo:
  title: "VS Code Setup - Autohand Code Docs"
  description: "Complete guide to setting up Autohand Code in VS Code. Learn installation, configuration, features, and productivity tips for AI-assisted coding."
---

:::tip
**Quick Install:** Install the Autohand Code extension from the VS Code marketplace in seconds. [Jump to installation](#installation) or check our [feature overview](/working-with-autohand-code/code/vscode/features).
:::

## Installation

### Method 1: VS Code Marketplace (Recommended)

1. Open VS Code
2. Press <kbd>Ctrl+Shift+X</kbd> (Windows/Linux) or <kbd>Cmd+Shift+X</kbd> (Mac) to open the Extensions panel
3. Search for "Autohand Code"
4. Click "Install" on the Autohand Code extension
5. Wait for installation to complete
6. Click "Reload" when prompted

### Method 2: Command Line

```bash
# Install via command line
npm install -g autohand-cli

# Verify installation
autohand --version

# Install VS Code extension
code --install-extension autohandai.vscode-autohand
```

### Method 3: Manual Download

1. Visit the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=autohandai.vscode-autohand)
2. Click "Download Extension"
3. Open VS Code
4. Go to File \> Extensions
5. Click the "..." menu and select "Install from VSIX"
6. Select the downloaded .vsix file

### System Requirements

- VS Code 1.74.0 or higher
- Node.js 22+ (only if you install the CLI with npm)
- 2GB RAM minimum (4GB recommended)
- Internet connection for AI features

## First Setup

After installation, configure Autohand Code for optimal performance:

### Authentication

1. Open VS Code
2. Press <kbd>Ctrl+Shift+P</kbd> (Windows/Linux) or <kbd>Cmd+Shift+P</kbd> (Mac) to open the Command Palette
3. Type "Autohand Code: Login" and press Enter
4. Follow the authentication prompts
5. Or use the command: `Autohand Code: Authenticate`

### Configuration

```json
// Open VS Code settings (Ctrl+,)
{
  "autohand-code.enabled": true,
  "autohand-code.model": "gpt-4",
  "autohand-code.maxTokens": 2048,
  "autohand-code.temperature": 0.7,
  "autohand-code.autoComplete": true,
  "autohand-code.inlineSuggestions": true,
  "autohand-code.chat.enabled": true
}
```

### Workspace Configuration

Create a `.vscode/settings.json` file in your project:

```json
{
  "autohand-code.projectType": "web-app",
  "autohand-code.framework": "react",
  "autohand-code.styleGuide": "airbnb",
  "autohand-code.testFramework": "jest",
  "autohand-code.excludePatterns": [
    "node_modules/**",
    "dist/**",
    "build/**"
  ]
}
```

## Core Features

### 1\. Intelligent Code Completion

Autohand Code provides context-aware code suggestions as you type:

- Start typing and press <kbd>Ctrl+Space</kbd> to see suggestions
- Suggestions consider your entire project context
- Supports 50+ programming languages
- Learn from your coding patterns

### 2\. Inline Code Generation

Generate code directly in your editor:

- Write a comment describing what you want
- Press <kbd>Ctrl+Enter</kbd> to generate code
- Accept suggestions with <kbd>Tab</kbd>
- Reject suggestions with <kbd>Esc</kbd>

### 3\. Chat Interface

Open the Autohand Code chat panel for complex tasks:

- Press <kbd>Ctrl+Shift+A</kbd> to open chat
- Ask questions about your code
- Request refactoring or optimization
- Generate entire functions or classes

### 4\. Code Refactoring

Intelligent refactoring suggestions:

- Right-click on code and select "Autohand Code: Refactor"
- Choose from suggested improvements
- Apply changes with preview
- Supports modernization patterns

## Productivity Workflows

### Workflow 1: Rapid Prototyping

```js
// 1. Create a new file
// 2. Add a comment describing your component
// Create a React component for user profile with avatar, name, email, and edit button

// 3. Press Ctrl+Enter to generate
// Autohand Code will generate the complete component

// 4. Review and adjust as needed
```

### Workflow 2: Test Generation

```js
// 1. Write your function
const calculateTotal = (items, tax = 0.1) => {
  return items.reduce((sum, item) => sum + item.price * item.quantity, 0) * (1 + tax);
};

// 2. Right-click and select "Autohand Code: Generate Tests"
// 3. Tests are automatically generated
```

### Workflow 3. Code Documentation

```js
// 1. Write your function
const processPayment = async (paymentDetails) => {
  // Implementation details...
};

// 2. Add comment: // Generate JSDoc documentation
// 3. Press Ctrl+Enter to generate documentation
```

## Advanced Features

### Multi-file Context

Autohand Code understands your entire project:

- Analyzes imports and dependencies
- Considers project structure
- Learns from your coding patterns
- Maintains consistency across files

### Custom Templates

```json
// Create custom templates in .vscode/autohand-templates.json
{
  "react-component": {
    "template": "import React from 'react';

const {{componentName}} = ({{props}}) => {
  return (
    <div className="{{className}}">
      {{content}}
    </div>
  );
};

export default {{componentName}};",
    "variables": ["componentName", "props", "className", "content"]
  }
}
```

### Team Collaboration

- Share code snippets with team
- Sync coding standards
- Collaborative code reviews
- Knowledge base integration

### Performance Optimization

```json
// Performance settings in VS Code settings
{
  "autohand-code.cache.enabled": true,
  "autohand-code.cache.size": "100MB",
  "autohand-code.parallelRequests": 3,
  "autohand-code.maxTokens": 4096,
  "autohand-code.timeout": 30000
}
```

## Keyboard Shortcuts

| Shortcut | Action | Platform |
| --- | --- | --- |
| <kbd>Ctrl+Shift+A</kbd> | Open Autohand Code Chat | Windows/Linux |
| <kbd>Cmd+Shift+A</kbd> | Open Autohand Code Chat | Mac |
| <kbd>Ctrl+Enter</kbd> | Generate Code | Windows/Linux |
| <kbd>Cmd+Enter</kbd> | Generate Code | Mac |
| <kbd>Ctrl+Space</kbd> | Show Suggestions | All |
| <kbd>Tab</kbd> | Accept Suggestion | All |
| <kbd>Esc</kbd> | Dismiss Suggestion | All |
| <kbd>Ctrl+Shift+P</kbd> | Command Palette | Windows/Linux |
| <kbd>Cmd+Shift+P</kbd> | Command Palette | Mac |

## Troubleshooting

### Extension Not Working

```bash
# 1. Check if extension is enabled\n# Open Extensions panel (Ctrl+Shift+X)\n# Look for Autohand Code and ensure it's enabled\n\n# 2. Check for conflicts\n# Disable other AI coding extensions temporarily\n\n# 3. Reload VS Code\n# Ctrl+Shift+P -> "Developer: Reload Window"\n\n# 4. Check logs\n# Help -> Toggle Developer Tools -> Console
```

### Authentication Issues

```bash
# 1. Clear authentication cache\n# Ctrl+Shift+P -> "Autohand Code: Clear Cache"\n\n# 2. Re-authenticate\n# Ctrl+Shift+P -> "Autohand Code: Login"\n\n# 3. Check API key\n# Ctrl+Shift+P -> "Autohand Code: Check Status"
```

### Performance Issues

- Reduce maxTokens in settings
- Enable caching
- Exclude large directories
- Disable unused features

<AcademyCta course="autohand-code-on-every-surface" title="Autohand Code on every surface" blurb="Set up Autohand Code in VS Code, JetBrains and Zed, pair your phone, and sync settings across machines." />

## Next Steps

Master VS Code integration with these advanced guides:

**[Complete Feature Guide](/working-with-autohand-code/code/vscode/features)**

Deep dive into all VS Code features and capabilities.

_20 min_

**[Writing Effective Prompts](/guides/beginners/instructing-autohand)**

Learn how to communicate effectively with Autohand Code.

_15 min_

**[Configuration Guide](/working-with-autohand-code/configuration)**

Comprehensive configuration options and best practices.

_12 min_

**[CI/CD Integration](/guides/ci-cd-automation)**

Integrate Autohand Code into your development pipeline.

_18 min_
