Commands
Commands are custom shell commands attached to a project. They appear as buttons in the chat header for any active branch, giving you one-click access to frequently used scripts.
Creating a Command
Section titled “Creating a Command”- Open the Commands dialog via ⋯ More options → Commands in the chat header.
- Click Add Command.
- Fill in the fields:
- Name — the label shown on the toolbar button (e.g. “Run Tests”)
- Icon — choose a Lucide icon from the picker
- Command Line — the shell command to execute (e.g.
bun test,npm run lint)
- Click Save.
The command button appears immediately in the chat header for all branches of this project.
Running a Command
Section titled “Running a Command”Click the command button in the chat header. Tarsk runs the command in the active branch’s directory. Output streams in the output panel below the chat or in the Terminal dock panel.
Commands run against the branch’s own copy of the repository:
- Running tests in branch A and branch B simultaneously produces independent results
- Changes made by the agent in a branch are visible when the command runs in that branch
Package.json Scripts
Section titled “Package.json Scripts”The chat header also includes a Scripts button that lists scripts from the project’s package.json. Click a script to run it in the current branch’s directory.
Editing and Deleting
Section titled “Editing and Deleting”Reopen the Commands dialog to edit (pencil icon) or delete (trash icon) existing commands. Changes take effect immediately across all branches.
Command Use Cases
Section titled “Command Use Cases”| Use Case | Example Command |
|---|---|
| Run tests | bun test |
| Lint code | bun run lint |
| Type-check | tsc --noEmit |
| Format code | prettier --write . |
| Build for production | bun run build |
| Run a custom script | ./scripts/seed-db.sh |
Relationship to the Dev Server
Section titled “Relationship to the Dev Server”Commands are distinct from the Run Command used by the Run/Stop button. The Run Command is a long-running dev server process (e.g. bun dev). Commands are one-shot scripts. See Dev Server.