trylle-cli

Trylle CLI is the daily command line for repository work, pull requests, issues, CI, and AI-assisted developer tasks within our platform.

The AI commands use local configuration, environment variables, or local CLI providers.

Join the Trylle community Discord: discord.gg/trylle

Getting Started πŸ”…

Installation

To install globally and having automatic updates:

npm i -g @trylle/trylle-cli

One-time runs:

npx trylle-cli version
# or # 
uvx trylle-cli version

Homebrew

brew tap trylle-labs/tap https://trylle.com/trylle/homebrew-tap
brew install trylle-labs/tap/trylle-cli

Bottles are pre-built for macOS 26 or later on Apple silicon and for Linux on x86_64 and arm64; other platforms build from source automatically.

uv / PyPI

uv tool install trylle-cli

Cargo / source builds

IMPORTANT

cargo is a package manager for rust, and is installed automatically when you install rust. See installation guide

cargo install trylle-cli

Cargo and other self-built binaries are treated as local installations by Trylle's updater. If you update one with try version update, Trylle installs the canonical @trylle/trylle-cli package through npm.

Updates

Easily update your installed Trylle CLI to the latest version:

try version check
try version update

Trylle detects whether the running CLI came from Homebrew, npm, or uv, preserves the installed npm package name (@trylle/trylle-cli or trylle-cli), and always updates to the latest available release.

Usage πŸ”…

Visual Diff Viewer

Launch an interactive side-by-side diff viewer in your terminal:

# View uncommitted changes
try diff

# View changes for a specific commit
try diff HEAD~1

# View changes between branches
try diff main..feature/A

# View changes in a Trylle Pull Request
try diff --pr 123 # (--pr is optional)
try diff https://trylle.com/owner/repo/pulls/123

Stacked Diff Mode

Review a range of commits one at a time with --stacked:

try diff main..feature --stacked
try diff HEAD~5..HEAD --stacked

This displays each commit individually, letting you navigate through them:

  • ctrl+h / ctrl+l: Previous / next commit
  • Click the β€Ή / β€Ί arrows in the header

The header shows the current commit position, SHA, and message. Viewed files are tracked per commit, so your progress is preserved when navigating.

When viewing a PR, you can mark files as viewed (syncs with GitHub) using the space keybinding.

Theme Configuration

Customize the diff viewer colors with preset themes:

# Using CLI flag
try diff --theme dracula

# Using environment variable
TRYLLE_CLI_THEME=catppuccin-mocha try diff

# Or set permanently in config file (~/.config/trylle-cli/ai.config.json)
{
  "theme": "dracula"
}

Available themes:

ThemeValue
Default (auto-detect)dark, light
Catppuccincatppuccin-mocha, catppuccin-latte
Draculadracula
Nordnord
One Darkone-dark
Gruvboxgruvbox-dark, gruvbox-light
Solarizedsolarized-dark, solarized-light

Priority: CLI flag > config file > TRYLLE_CLI_THEME env var > OS auto-detect.

Selection & Annotations

Selection: Click-drag in the content area for character-level selection, or on line numbers for line-level selection. Selected text can be copied or annotated.

Annotations: Add review comments at three levels of granularity:

  • Selection β€” select lines with mouse, press i to annotate the selected range
  • Hunk β€” focus a hunk with {/}, press i to annotate the hunk
  • File β€” press i with no selection or hunk focus to annotate the whole file

Annotated lines display a ▍ gutter indicator. Use I to view, edit, delete, copy, or export all annotations.

Keybindings

  • j/k or arrow keys: Navigate
  • {/}: Jump between hunks
  • m: Mark hunk viewed and advance
  • shift+m: Unmark hunk viewed and go back
  • w: Toggle watch mode
  • tab: Toggle sidebar
  • space: Mark file as viewed
  • e: Open file in editor
  • y: Copy selection (or filename)
  • i: Annotate selection / hunk / file
  • I: View all annotations
  • ctrl+h/l: Previous/next commit (stacked mode)
  • ?: Show all keybindings

Projects πŸ”…

try project works with Trylle projects: a brief, the repositories it spans, a tracker of items backed by real issues, an activity feed, and a library of shared files and links. A project's orchestrator agent uses the same commands to file items, start workers, and report progress. Projects are addressed by id or exact name; items by id or by the issue they track (#N or OWNER/NAME#N).

# Projects
try project list
try project create --name "Ship the CLI" --brief-file brief.md -R trylle/trylle-cli
try project view project_08ca81cf1b769397
try project edit "Ship the CLI" --status paused --check-in 2h
try project delete project_08ca81cf1b769397 --yes

# Repositories and people
try project repo list P
try project repo add P trylle/trylle-cli
try project people candidates P --search al
try project people lead P <userId>

# Tracker
try project item list P --status todo
try project item create P -R trylle/trylle-cli --title "Fix clone" --body-file issue.md
try project item adopt P 30 -R trylle/trylle-cli
try project item move P '#30' in-progress
try project item start P '#30' --provider codex --model gpt-6-sol
try project item attach-pr P '#30' trylle/trylle-cli#32

# Activity feed
try project feed P --limit 20
try project feed P --all --json
try project feed P --follow
try project feed P --wait --timeout 30m
try project post P -m "Opened #32 for review" --item '#30'

# Library
try project resource list P
try project resource view P <resourceId> -o brief.md
try project resource put P design.pdf
try project resource put P --link https://example.com/spec --name "API spec"
try project resource put P - --id <resourceId> --replace --name notes.md < notes.md

# Which providers and models workers may use
try project capabilities P
try session capabilities

feed prints newest first, one line per event with its id and type, and sends the --before cursor for older events to stderr. --follow streams new events oldest first until interrupted; --wait returns as soon as new events arrive, so an agent can wait on people without polling. With --json both print one event per line.

item start launches a worker agent in the project's session. A provider other than the project default needs --model; try project capabilities lists what the cloud policy admits. resource put --id is safe to retry; different content under an existing id needs --replace. try project local ... holds the commands the desktop app uses to run a local project's agents.

CI caches πŸ”…

try cache manages a repository's CI caches (what actions/cache, the setup-* actions, and BuildKit type=gha save between runs). Listing needs read access to the repository, deleting needs write access. A deleted cache is invalidated at once: later runs no longer restore it and can save its key again.

try cache list -R OWNER/NAME --key-prefix nub-Linux-X64-
try cache usage -R OWNER/NAME
try cache view CACHE_ID -R OWNER/NAME
try cache delete CACHE_ID -R OWNER/NAME          # one entry
try cache delete --key KEY -R OWNER/NAME         # every version of one key
try cache delete --key-prefix PREFIX --yes       # bulk; --all deletes everything

AI Features πŸ”…

Trylle CLI also bundles optional AI helpers for commit messages, explanations, and natural-language git commands. These require configuring an AI provider.

Configuration

Run try ai --reconfigure for interactive setup (provider, API key, model). Settings are saved to ~/.config/trylle-cli/config.json.

Generate Commit Messages

Create meaningful commit messages for your changes. Staged changes are preferred; when nothing is staged, try draft falls back to the unstaged diff:

# Basic usage - uses staged changes first, then falls back to unstaged changes
try draft
# Output: "feat(button.tsx): Update button color to blue"

# Add context for more meaningful messages
try draft --context "match brand guidelines"

# Draft a <type>/<kebab-style-slug> branch name from the current diff
try draft branch

Generate Git Commands

Ask Trylle CLI to generate Git commands based on a natural language query:

try ask "squash the last 3 commits into 1 with the message 'squashed commit'"
# Output: git reset --soft HEAD~3 && git commit -m "squashed commit" [y/N]

The command will display an explanation of what the generated command does, show any warnings for potentially dangerous operations, and prompt for confirmation before execution.

Explain Changes

Understand what changed and why:

# Working directory or staged changes
try explain
try explain --staged

# Specific commits or ranges
try explain HEAD
try explain HEAD~3..HEAD
try explain main..feature/A

# Ask specific questions
try explain --query "What's the performance impact of these changes?"

# Interactive commit selection (built-in Rust TUI powered by yuru-tui)
try explain --list

Tips & Tricks

# Copy commit message to clipboard (macOS / Linux)
try draft | pbcopy
try draft | xclip -selection c

# Directly commit using the generated message
try draft | git commit -F -

Always add --json to receive the complete machine-readable API response.

lazygit integration is available β€” see the user config docs for binding try draft to a custom command.

Agent Mode

Use try agent when a local coding agent should perform work in the current repository:

try agent --provider codex-cli "fix the failing tests"
try agent --provider claude-cli --model claude-fable-5 "review and simplify this change"
try agent --reconfigure

ask accepts direct providers only. Its ai settings are shared with explain and draft. agent proxies Codex CLI, Claude CLI, or OpenCode CLI and keeps independent settings under agent.

In Trylle Actions, TRYLLE_AI_GATEWAY and the run-scoped secret TRYLLE_AI_TOKEN are injected automatically. try agent translates them to the selected agent's native gateway and API-key variables, so Codex CLI, Claude Code, and OpenCode can consume the run owner's Trylle AI credits without provider-specific secret setup. The CLI also uses the injected TRYLLE_BOT_TOKEN run JWT for Trylle API commands.

IMPORTANT

agent is designed for unattended execution and starts each provider in its broadest non-interactive mode: Codex uses --dangerously-bypass-approvals-and-sandbox, Claude uses --dangerously-skip-permissions, and OpenCode uses --auto. This lets agents update Git state and reach remote services, but removes or relaxes provider safety checks. Run try agent only in repositories and environments you trust.

Direct Providers

ProviderAPI Key RequiredModels
OpenAI openai (Default)Yesdefault: gpt-5.3-codex-spark
Claude claudeYesdefault: claude-sonnet-5)
Groq groqYesdefault: qwen/qwen3.6-27b
OpenCode Zen opencode-zenYessee list (default: claude-sonnet-5)
Ollama ollamaNo (local)see list (default: llama3.2)
OpenRouter openrouterYessee list (default: anthropic/claude-sonnet-5)
DeepSeek deepseekYesdefault: deepseek-chat
Google Gemini geminiYesdefault: gemini-2.5-flash
xAI xaiYesdefault: grok-3
Z.ai zaiYesdefault: glm-5.2
Vercel AI Gateway vercelYessee list (default: anthropic/claude-sonnet-5)

Trylle Agent Skill

Official builds contain a complete snapshot of the Trylle CLI skill. try skill install installs that bundled snapshot without network access, while try skill update explicitly downloads the latest trylle/skills archive and replaces the installed directory:

try skill install

# advanced usage:
try skill --help
try skill install --agent codex-cli --scope global
try skill update

Project paths are .agents/skills/trylle-cli/SKILL.md for Codex and OpenCode and .claude/skills/trylle-cli/SKILL.md for Claude. Global paths follow each agent's native skill directory.

try agent does not inject skill text into the prompt. It uses an existing repo-local or global installation when present, otherwise it installs the bundled snapshot globally and lets the selected agent discover it normally. Use try agent --no-skill ... to disable provisioning for one run, or try agent --latest-skill ... to replace the discovered installation with the latest archive before starting the agent.

Coding Agent Integrations πŸ”…

Use try as the review surface for your coding agent. When the agent finishes a turn, shell-escape to trylle-cli, annotate the diff inline, and press s to send your annotations back as the agent's next prompt.

agent finishes turn β†’ !try diff β†’ annotate β†’ press `s`
β†’ stdout returns to the agent β†’ agent fixes your notes

The mechanics are just stdin/stdout β€” no plugins, no extensions:

  • s in the diff TUI opens a confirmation modal. On Enter, try exits and writes the formatted annotations to stdout (the same text y copies to your clipboard).
  • The TUI auto-routes to /dev/tty when stdout is captured, so the agent receives clean text β€” no escape codes.

Works with anything that has a shell-escape:

AgentHow to trigger
Claude Code!ty diff
Codex!try diff
Any agent with shell accesstry diff from a tool/bash call

Annotate with i (selection / hunk / file), press s β†’ Enter to send. Press q to dismiss without sending.

Advanced Configuration πŸ”…

Configuration File

Trylle CLI supports an AI configuration file in either location:

  1. Custom Path: Specify a path using the try ask --config CLI option.
  2. Global Configuration (Optional): Place an ai.config.json file in the CLI configuration directory:
    • Linux/macOS: ~/.config/trylle-cli/ai.config.json
    • Windows: %USERPROFILE%\.config\trylle-cli\ai.config.json

Trylle CLI will load configurations in the following order of priority:

  1. CLI arguments and environment variables (highest priority)
  2. Configuration file specified by --config
  3. Values saved by try ask
  4. Global ai.config.json
{
  "provider": "openai",
  "model": "gpt-5.3-codex-spark",
  "api_key": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "theme": "catppuccin-mocha",
  "wrap": true,
  "draft": {
    "commit_types": {
      "docs": "Documentation only changes",
      "style": "Changes that do not affect the meaning of the code",
      "refactor": "A code change that neither fixes a bug nor adds a feature",
      "perf": "A code change that improves performance",
      "test": "Adding missing tests or correcting existing tests",
      "build": "Changes that affect the build system or external dependencies",
      "ci": "Changes to our CI configuration files and scripts",
      "chore": "Other changes that don't modify src or test files",
      "revert": "Reverts a previous commit",
      "feat": "A new feature",
      "fix": "A bug fix"
    }
  }
}

Agent settings use TRYLLE_AGENT_CONFIG, TRYLLE_AGENT_PROVIDER, TRYLLE_AGENT_MODEL, TRYLLE_AGENT_THINKING, and TRYLLE_AGENT_FAST. Shared AI settings use TRYLLE_AI_CONFIG, TRYLLE_AI_PROVIDER, TRYLLE_AI_API_KEY, TRYLLE_AI_MODEL, TRYLLE_AI_THINKING, and TRYLLE_AI_FAST.

License

MIT

Contains modified open-source software:

  • Lumen copyright (c) 2024 Sahaj Jain. MIT License.