Frankie supports configuration through multiple sources with the following precedence (lowest to highest):
- Defaults — Built-in application defaults
- Configuration file —
.frankie.tomlin current directory, home directory, or XDG config directory - Environment variables —
FRANKIE_*variables or legacyGITHUB_TOKEN - Command-line arguments — command-line interface (CLI) flags take the highest precedence
Higher precedence sources override lower ones. For example, a CLI flag always takes precedence over an environment variable or configuration file value.
Configuration file
Create a .frankie.toml file in the current directory, home directory, or XDG
config directory (typically ~/.config/frankie/frankie.toml):
# For single PR mode
pr_url = "https://github.com/owner/repo/pull/123"
# For repository listing mode
owner = "octocat"
repo = "hello-world"
# Authentication
token = "ghp_example"
# Local persistence (optional)
database_url = "frankie.sqlite"
# Pull request metadata cache time-to-live (TTL) (optional, seconds)
pr_metadata_cache_ttl_seconds = 86400
# Time-travel commit history depth (optional, default 50)
commit_history_limit = 50
# Reply drafting options (optional)
reply_max_length = 500
reply_templates = [
"Thanks {{ reviewer }}. I will update {{ file }}:{{ line }}.",
"Good catch, {{ reviewer }}. I'll address this now."
]
# Database migrations (set to true to run migrations and exit)
migrate_db = true
When reply_templates is not configured, Frankie uses its built-in starter
reply templates. Library consumers can read the same defaults with
frankie::DEFAULT_REPLY_TEMPLATES or take an owned copy with
frankie::default_reply_templates().
Frankie searches for configuration files in this order:
.frankie.tomlin the current working directory.frankie.tomlin the home directoryfrankie.tomlin$XDG_CONFIG_HOME/frankie/(typically~/.config/frankie/)
Environment variables
Table: Supported environment variables.
| Variable | Description |
|---|---|
FRANKIE_PR_URL |
Pull request URL (for single PR mode) |
FRANKIE_OWNER |
Repository owner (for listing mode) |
FRANKIE_REPO |
Repository name (for listing mode) |
FRANKIE_TOKEN |
GitHub personal access token |
FRANKIE_DATABASE_URL |
Local SQLite database path for persistence |
FRANKIE_PR_METADATA_CACHE_TTL_SECONDS |
PR metadata cache TTL (seconds) |
FRANKIE_TEMPLATE |
Template file path for custom export format |
FRANKIE_REPLY_MAX_LENGTH |
Maximum character count for inline reply drafts |
FRANKIE_REPLY_TEMPLATES |
JSON array of reply template strings for TUI insert |
FRANKIE_AI_REWRITE_MODE |
AI rewrite mode (expand or reword) |
FRANKIE_AI_REWRITE_TEXT |
Source text for non-interactive AI rewrite |
FRANKIE_AI_BASE_URL |
OpenAI-compatible API base URL |
FRANKIE_AI_MODEL |
Model name for AI rewrite and summary requests |
FRANKIE_AI_API_KEY |
API key for AI rewrite and summary requests |
OPENAI_API_KEY |
Fallback API key for AI rewrite and summary requests |
FRANKIE_COMMIT_HISTORY_LIMIT |
Maximum commits to load in time-travel history |
FRANKIE_AI_TIMEOUT_SECONDS |
Timeout for AI rewrite and summary requests (seconds) |
GITHUB_TOKEN |
Legacy token variable (lower precedence than above) |
The GITHUB_TOKEN environment variable is supported for backward
compatibility. If both FRANKIE_TOKEN and GITHUB_TOKEN are set,
FRANKIE_TOKEN takes precedence.
Command-line flags
| Flag | Short | Description |
|---|---|---|
--pr-url <URL> |
-u |
GitHub pull request URL |
--owner <OWNER> |
-o |
Repository owner (user or organization) |
--repo <REPO> |
-r |
Repository name |
--token <TOKEN> |
-t |
Personal access token |
--database-url <PATH> |
— | Local SQLite database path |
--migrate-db |
— | Run database migrations and exit |
--pr-metadata-cache-ttl-seconds <SECONDS> |
— | PR metadata cache TTL (seconds) |
--no-local-discovery |
-n |
Disable automatic local Git discovery |
--tui |
-T |
Launch interactive TUI for review comments |
--export <FORMAT> |
-e |
Export comments (markdown, jsonl, template) |
--verify-resolutions |
— | Verify comment resolutions and exit |
--summarize-discussions |
— | Generate grouped PR discussion summaries and exit |
--output <PATH> |
— | Output file for export (default: stdout) |
--template <PATH> |
— | Template file for custom export format |
--reply-max-length <COUNT> |
— | Maximum characters allowed in TUI reply drafts |
--reply-templates <JSON_ARRAY> |
— | Reply template list for keyboard insertion in TUI |
--ai-rewrite-mode <MODE> |
— | AI rewrite mode (expand, reword) |
--ai-rewrite-text <TEXT> |
— | Source text for non-interactive AI rewrite |
--ai-base-url <URL> |
— | OpenAI-compatible API base URL |
--ai-model <MODEL> |
— | Model name for AI rewrite and summary requests |
--ai-api-key <KEY> |
— | API key for AI rewrite and summary requests |
--commit-history-limit <COUNT> |
— | Maximum commits to load in time-travel history |
--ai-timeout-seconds <SECONDS> |
— | Timeout for AI rewrite and summary requests |
--help |
-h |
Show help information |
Run frankie --help to see all available options and their descriptions.