■ Documentation

Get Started
with Glue

Everything you need to install, configure, and start using Glue in your projects.

01 · Quick Start

Install & Run

Prerequisites

  • Dart SDK 3.0 or later
  • Git (for worktree support)
  • An API key for at least one LLM provider

Set Your API Key

Glue reads your provider keys from environment variables. Set the one for your preferred provider:

▸ Installation
# Install globally dart pub global activate glue # Navigate to your project cd my-project # Launch glue
▸ Environment
# Anthropic (default) export ANTHROPIC_API_KEY=sk-... # OpenAI export OPENAI_API_KEY=sk-... # Google export GOOGLE_API_KEY=...
02 · CLI Reference

Commands & Flags

Command / FlagDescriptionExample
glueStart an interactive session in the current directoryglue
glue "prompt"Start with an initial promptglue "add auth endpoint"
--model, -mSelect LLM provider and modelglue -m gpt-5
--worktree, -wRun in a specific git worktreeglue -w feat/auth
--new-worktreeCreate a new worktree and start a sessionglue --new-worktree feat/api
--approve-allAuto-approve all tool calls (use with caution)glue --approve-all
--resume, -rResume the last session in this directoryglue -r
--listList all active sessionsglue --list
03 · Configuration

Configure Glue

Glue works out of the box, but you can customize behavior with a .glue/ directory in your project root.

// .glue/config.json { "model": "claude-4-sonnet", "approval": { "auto_approve": ["read_file", "list_dir"], "always_ask": ["bash", "write_file"] }, "context": { "include": ["README.md", "AGENTS.md"], "ignore": ["node_modules", ".git"] } }

Config Files

  • .glue/config.json — Main configuration
  • .glue/mcp.json — MCP server definitions
  • .glue/rules.md — Custom instructions for the agent

Scoping

Config is hierarchical. Global settings live in ~/.glue/, project-level in .glue/. Project config overrides global.

04 · Built-in Tools

What Glue Can Do

read_file
Read file contents with optional line ranges. Supports binary detection and large file handling.
write_file
Create or overwrite files. Always requires approval. Shows diff preview before writing.
edit_file
Surgical edits with search-and-replace. Minimal diffs, preserves formatting.
bash
Run shell commands. Streams output in real-time. Timeout and approval configurable.
list_dir
List directory contents with metadata. Respects .gitignore patterns.
search
Fast regex search across files. Powered by ripgrep when available.