Getting Started
Your First Autohand Session
Install Autohand Code, set up OpenRouter as your AI provider, and complete your first coding task in under five minutes.
What you'll learn
- How to install Autohand Code on your machine
- How to connect to OpenRouter and pick a model
- How to run your first prompt against a real project
- How to read agent output and continue the conversation
Before you start
Make sure you have the following tools ready, then prepare a project to work with.
Requirements
- Node.js 18 or newer. Run
node --versionto check. If you need to install or upgrade, visit nodejs.org. - An OpenRouter API key. Sign up at openrouter.ai and create an API key from your dashboard. OpenRouter is the recommended provider and gives you access to 200+ models with a single key.
Project setup
Open a terminal and navigate to any existing project you want to explore. A small-to-medium sized codebase is ideal for a first session.
Tip: If you do not have a project handy, clone any public GitHub repository you are curious about. Autohand works equally well on unfamiliar codebases.
Step 1: Install Autohand Code
Install the CLI globally so you can run it from any directory.
Verify the installation succeeded.
Step 2: Run the onboarding wizard
Navigate to the root of your project and run autohand for the first time.
The CLI detects that this is a fresh install and launches the onboarding wizard. It walks you through three steps: choosing a provider, entering your API key, and picking a default model.
Step 1: Choose a provider
The wizard shows a list of supported AI model providers. You can pick a cloud provider like OpenRouter, OpenAI, or xAI, or a local provider like Ollama or MLX.
For this tutorial, select OpenRouter. It is the default provider and gives you access to Claude, GPT-4, Gemini, Llama, and 200+ other models through a single API key. See the full OpenRouter integration guide for details.
Step 2: Enter your API key
The wizard asks for your OpenRouter API key. Paste the key you created during the before you start step.
Autohand validates the key with a quick API call. If it fails, double-check the key on your OpenRouter dashboard.
Tip: You can also set the key as an environment variable instead. Add export OPENROUTER_API_KEY="sk-or-v1-..." to your shell profile and the wizard will detect it automatically.
Step 3: Pick a default model
The wizard shows a short list of recommended models for coding. You can change this later at any time.
Select anthropic/claude-3.5-sonnet for a great coding experience. The configuration is saved to ~/.autohand/config.json and applies to all future sessions.
Tip: To change your provider or model later, run autohand config set provider openai or autohand config set model openai/gpt-4o. You can also switch models during a session with /model openai/gpt-4o.
Step 3: Start coding
After the wizard finishes, Autohand drops you straight into an interactive session. The agent has access to your project files and is ready to receive instructions.
If you close this session and come back later, just run autohand again from your project directory. The wizard only runs once. Every session after that starts immediately.
Step 4: Run your first prompt
Type the following prompt and press Enter.
Watch as the agent starts working. You will see it read files, explore the directory structure, and build up context before responding. This is normal. The agent is doing the same thing a new developer would do when joining a project.
After a minute or two, the agent outputs a summary. It typically covers what the project does, how it is structured, and a short list of concrete improvement suggestions.
Step 5: Read the output
The agent output shows you what happened and what it found. Here is what each part means.
- File reads. Lines that say
Reading: src/index.tsshow which files the agent examined. The agent uses these to understand your codebase before drawing any conclusions. - Analysis. A plain-language summary of what the project does, what tech stack it uses, and how the pieces fit together.
- Suggestions. A numbered list of improvements. These range from small things like missing error handling to larger structural observations. Each suggestion is specific to your code, not generic advice.
Tip: You do not need to act on every suggestion. The agent is giving you a starting point. Pick the one that looks most useful and continue from there.
Step 6: Follow up
The real power of Autohand comes from continuing the conversation. You can refine, drill down, or ask the agent to act on its own suggestions.
To implement a suggestion directly, try:
To go deeper on a specific part of your code:
To ask about a specific file:
Each follow-up builds on the context already established. You do not need to re-explain the project. The agent remembers everything from earlier in the session.
Tip: Shorter, more specific prompts usually get better results than long ones. If a response misses the mark, rephrase and try again.
What you learned
- Installed Autohand Code and connected it to OpenRouter
- Ran the onboarding wizard to choose a provider and model
- Ran your first prompt and read the agent's analysis of a project
- Used follow-up prompts to drill deeper into a codebase