Getting Started with Autohand Code
Complete guide to installing and using Autohand Code. Learn how to set up your first AI-assisted coding workflow in minutes.
What is Autohand Code?
Autohand Code is an AI-powered coding assistant that helps developers write better code faster. It combines advanced AI models with deep understanding of your codebase to provide intelligent suggestions, complete code, and help you solve complex problems.
Key features
- Intelligent code completion - Context-aware suggestions that understand your project
- Multi-language support - Works with 50+ programming languages and frameworks
- IDE integration - VS Code and Zed, plus JetBrains and other ACP clients through
autohand --acp - CLI tools - Powerful command-line interface for automation and scripting
- Team collaboration - Share knowledge and patterns across your development team
Installation
Choose the installation method that works best for your workflow:
Option 1: Install with npm (Recommended)
# Install Autohand Code globally
npm install -g autohand-cli
# Verify installation
autohand --version
Option 2: Install with curl
# Download and install
curl -fsSL https://autohand.ai/install.sh | bash
# Add to PATH (if not automatically added)
export PATH="$HOME/.autohand/bin:$PATH"
Option 3: Download directly
Visit autohand.ai/downloads to download the latest version for your platform:
- Windows (x64)
- macOS (Intel & Apple Silicon)
- Linux (x64, ARM64)
System requirements
- Node.js 22+ (for npm installation)
- 4GB RAM minimum (8GB recommended)
- 2GB disk space
- Internet connection for AI model access
First Configuration
After installation, run the initial setup to configure Autohand Code:
# Run the setup wizard (it also starts on first launch if no provider is configured)
autohand --setup
# The wizard walks you through:
# - AI provider, API key and model
# - Permission mode
# - Preferences
# - Creating an AGENTS.md for the project (optional)
Authentication
To use Autohand Code’s AI features, you’ll need to authenticate:
# Sign in with your Autohand account
autohand login
# Or set an API key for your provider (for example OpenRouter)
autohand config set openrouter.apiKey YOUR_API_KEY
IDE Setup
Connect Autohand Code to your editor:
VS Code
# Install from VS Code marketplace
code --install-extension autohandai.vscode-autohand
# Or install from command palette
# Ctrl+Shift+P -> "Extensions: Install Extensions" -> Search "Autohand Code"
Zed
Add Autohand as a custom external agent in Zed. See the Zed integration guide.
JetBrains IDEs and other ACP clients
There is no JetBrains plugin. JetBrains IDEs and other ACP clients run Autohand through autohand --acp. Add Autohand as a custom ACP agent in AI Assistant by following JetBrains IDEs through ACP.
Your First Project
Let’s create your first AI-assisted project with Autohand Code:
Step 1: Create a new project
# Create a new project directory
mkdir my-first-ai-project
cd my-first-ai-project
# Create an AGENTS.md with project instructions for Autohand Code
autohand init
Step 2: Generate your first code
Open your IDE and create a new file. Type a comment or description and let Autohand Code generate the code:
// Create a simple REST API with Express.js
// Include endpoints for GET, POST, PUT, DELETE users
// Add basic error handling and validation
Autohand Code will generate the complete implementation:
const express = require('express');
const app = express();
const port = 3000;
// Middleware
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// In-memory user storage (for demo)
let users = [
{ id: 1, name: 'John Doe', email: 'john@example.com' },
{ id: 2, name: 'Jane Smith', email: 'jane@example.com' }
];
let nextId = 3;
// GET all users
app.get('/api/users', (req, res) => {
res.json(users);
});
// GET user by ID
app.get('/api/users/:id', (req, res) => {
const user = users.find(u => u.id === parseInt(req.params.id));
if (!user) {
return res.status(404).json({ error: 'User not found' });
}
res.json(user);
});
// POST new user
app.post('/api/users', (req, res) => {
const { name, email } = req.body;
// Basic validation
if (!name || !email) {
return res.status(400).json({ error: 'Name and email are required' });
}
const newUser = {
id: nextId++,
name,
email
};
users.push(newUser);
res.status(201).json(newUser);
});
// PUT update user
app.put('/api/users/:id', (req, res) => {
const userIndex = users.findIndex(u => u.id === parseInt(req.params.id));
if (userIndex === -1) {
return res.status(404).json({ error: 'User not found' });
}
const { name, email } = req.body;
if (name) users[userIndex].name = name;
if (email) users[userIndex].email = email;
res.json(users[userIndex]);
});
// DELETE user
app.delete('/api/users/:id', (req, res) => {
const userIndex = users.findIndex(u => u.id === parseInt(req.params.id));
if (userIndex === -1) {
return res.status(404).json({ error: 'User not found' });
}
users.splice(userIndex, 1);
res.status(204).send();
});
// Error handling middleware
app.use((err, req, res, next) => {
console.error(err.stack);
res.status(500).json({ error: 'Something went wrong!' });
});
// 404 handler
app.use((req, res) => {
res.status(404).json({ error: 'Route not found' });
});
app.listen(port, () => {
console.log(`Server running at http://localhost:${port}`);
});
Step 3: Test your code
# Install dependencies
npm init -y
npm install express
# Run your application
node app.js
# Test the API
curl http://localhost:3000/api/users
Essential Commands
Master these core Autohand Code commands to boost your productivity:
Code Generation
# Generate code from description
autohand -p "Create a REST API with Express.js in app.js"
# Generate tests for existing code
autohand -p "Write Jest tests for app.js"
# Refactor existing code (preview as a patch first)
autohand -p "Refactor legacy.js to modern ES6+" --patch --output refactor.patch
Project Management
# Create a new project and an AGENTS.md for it
mkdir my-project && cd my-project
autohand init
# Add a new feature in an isolated git worktree
autohand --worktree auth -p "Add user authentication"
# Or work interactively
autohand
Code Analysis
# Analyze code quality (read-only plan mode)
autohand -p "Review the code quality of src/" --plan
# Find security issues
autohand -p "Scan src/ for security issues and list them by severity" --plan
# Generate documentation
autohand -p "Write developer documentation for src/ in docs/"
Best Practices for Success
Start Small
- Begin with simple code generation tasks
- Use Autohand Code for repetitive boilerplate code
- Gradually move to more complex features
Provide Clear Context
- Write descriptive comments and requirements
- Include examples of expected output
- Specify coding standards and patterns
Review and Iterate
- Always review generated code before committing
- Use Autohand Code’s suggestions as a starting point
- Iterate on prompts to improve results
Team Integration
- Share successful prompts with your team
- Establish coding standards for AI-generated code
- Use Autohand Code to maintain consistency across projects
Next Steps
Now that you’re set up with Autohand Code, explore these resources to maximize your productivity:
Interactive First Session
Step-by-step guided tutorial with hands-on exercises.
15 min
CLI Reference
Complete command-line interface documentation.
20 min
VS Code Integration
Master the VS Code extension features.
10 min
Writing Effective Prompts
Learn how to communicate effectively with Autohand Code.
12 min
Common Issues & Solutions
Installation Problems
Issue: "command not found: autohand"
Solution: Make sure the Autohand Code binary is in your PATH. Add it to your shell configuration:
# For bash/zsh
echo 'export PATH="$HOME/.autohand/bin:$PATH"' >> ~/.zshrc
source ~/.zshrcAuthentication Issues
Issue: "Authentication failed"
Solution: Check your API key or login credentials. Ensure you have an active subscription:
# Check the installation, config and account
autohand doctor
# Sign in again
autohand logout
autohand loginInside a session, /status shows the current provider, model, API connectivity and account.
Performance Issues
Issue: Slow code generation
Solution: Try these optimizations:
- Use a more specific prompt
- Limit the scope of generation
- Check your internet connection
- Consider upgrading to a higher tier for faster models