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.
Open twig from your Applications folder. If this is your first time, you'll need to sign in with your PostHog account.
Twig works with existing Git repositories on your machine.
Twig will analyze the project structure and prepare the workspace.
If your project uses PostHog, you can connect it to access analytics within twig:
This enables the agent to reference your analytics data when helping with development tasks.
The agent interface is your primary way of interacting with twig. Type a message describing what you want to accomplish.
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.
Once you understand the structure, ask for a specific modification:
add a comment to the main function explaining what it does
The agent will:
Review the proposed change and approve or modify it.
Start with requests that help you learn:
Then move to changes:
Twig includes a built-in terminal. Use it to run commands without leaving the editor:
The agent can also run commands on your behalf when needed to complete tasks.
Now that you're familiar with the basics: