Skip to content
Esc
↑↓navigate↵open⌘Jpreview
Start
On this page

Your First Autohand Session

Install Autohand Code, set up OpenRouter as your AI provider, and complete your first coding task in under five minutes.

Beginner · 5 min

autohand "Help me understand this project and suggest improvements"

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 22 or newer, if you install with npm. The install script does not need Node.js. Run node --version to 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.

cd path/to/your-project

Step 1: Install Autohand Code

Install the CLI globally so you can run it from any directory.

curl -fsSL https://autohand.ai/install.sh | sh

npm install -g autohand-cli

Verify the installation succeeded.

autohand --version
# autohand 1.x.x

Step 2: Run the onboarding wizard

Navigate to the root of your project and run autohand for the first time.

cd path/to/your-project
autohand

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.

Welcome to Autohand Code!

? Choose your AI provider:
  > OpenRouter (recommended)
    OpenAI
    xAI Grok
    Cerebras
    Azure AI Foundry
    GCP Vertex AI
    Ollama (local)
    MLX (local, Apple Silicon)
    llama.cpp (local)

For this tutorial, select OpenRouter. It 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.

? Enter your OpenRouter API key: sk-or-v1-xxxxxxxxxxxx

  Validating key... done

Autohand validates the key with a quick API call. If it fails, double-check the key on your OpenRouter dashboard.

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.

? Choose your default model:
  > anthropic/claude-sonnet-5 (default)
    openrouter/auto
    openai/gpt-4o
    google/gemini-pro-1.5
    meta-llama/llama-3.1-70b

Select anthropic/claude-sonnet-5, the default OpenRouter model, for coding. OpenRouter bills the use to your OpenRouter account. The configuration is saved to ~/.autohand/config.json and applies to all future sessions.

  Provider: OpenRouter
  Model:    anthropic/claude-sonnet-5
  Config:   ~/.autohand/config.json

  Setup complete. Starting session...

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.

Help me understand this project and suggest improvements

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.ts show 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.

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:

Now implement the first suggestion

To go deeper on a specific part of your code:

Explain the auth module in more detail

To ask about a specific file:

What does src/services/payment.ts do and are there any risks I should know about?

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.

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

Try next

autohand "Refactor the largest file in this project into smaller, focused modules"

Last updated on

Was this helpful?

Send Feedback

Help us improve this documentation page. Your feedback is valuable.

We'll only contact you if we need clarification