Twig includes a built-in terminal so you can run commands without switching applications. This page covers how to use it effectively.
The terminal panel appears at the bottom of the window:
cmd + j to toggleThe terminal works like any other terminal application:
ctrl + c to cancel a running commandIt uses your default shell (usually zsh on macOS).
The terminal opens in your project's root directory. Navigate as needed:
cd src/components
The working directory persists within your session.
npm test
Or for specific test files:
npm test -- src/utils/validation.test.ts
npm run dev
The terminal shows output, and you can ctrl + c to stop.
npm install lodash
Or:
pnpm add lodash
git status
git add .
git commit -m "your message"
npm run build
Open additional terminal tabs when you need to run multiple things:
+ icon in the terminal panelClose tabs by clicking the X or typing exit.
The agent can run terminal commands as part of completing tasks:
This is useful for:
The terminal inherits your shell environment:
.zshrc / .bashrcIf something works in your regular terminal but not in twig, check that environment variables are set correctly.
When running long-running processes (dev servers, watchers), keep the terminal visible to see output.
Instead of remembering complex command syntax:
run the tests for just the authentication module
The agent knows your project structure and can construct the right command.
cmd + k clears the terminal output while keeping the session active.
Double-click the terminal header to maximize it when you need to focus on command output.