quick start

Get up and running with twig in a few minutes. This guide walks through opening a project and making your first request to the AI agent.

launch twig

Open twig from your Applications folder. If this is your first time, you'll need to sign in with your PostHog account.

open a project

Twig works with existing Git repositories on your machine.

  1. Click "open project" or use the file menu
  2. Navigate to a Git repository on your computer
  3. Select the folder and click "open"

Twig will analyze the project structure and prepare the workspace.

connect to posthog (optional)

If your project uses PostHog, you can connect it to access analytics within twig:

  1. Go to settings
  2. Select your PostHog project
  3. Authorize access if prompted

This enables the agent to reference your analytics data when helping with development tasks.

talk to the agent

The agent interface is your primary way of interacting with twig. Type a message describing what you want to accomplish.

start by exploring

Before making changes, understand the codebase. Ask the agent to explain:

explain the structure of this project

The agent will read through your codebase and provide an overview.

Follow up with specific questions:

how does authentication work in this app?

Or:

where is the user data stored?

This exploration helps you and the agent understand the project before modifying it.

then make a change

Once you understand the structure, ask for a specific modification:

add a comment to the main function explaining what it does

The agent will:

  1. Find the relevant file
  2. Propose a change
  3. Wait for your approval before applying it

Review the proposed change and approve or modify it.

best first requests

Start with requests that help you learn:

  • "explain what this file does"
  • "show me where [feature] is implemented"
  • "how do errors get handled?"

Then move to changes:

  • "add input validation to [specific field]"
  • "refactor [function] to use [pattern]"
  • "fix the bug where [specific issue]"

use the terminal

Twig includes a built-in terminal. Use it to run commands without leaving the editor:

  • Run tests
  • Start development servers
  • Execute build commands

The agent can also run commands on your behalf when needed to complete tasks.

next steps

Now that you're familiar with the basics: