You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MORG-13: Add option to use Claude CLI for AI prompts instead of Anthropic API (#43)
* feat(MORG-13): add Claude CLI AI provider
Adds a `claude-cli` backend that calls the local `claude -p` binary
instead of hitting the Anthropic API, so users with a Claude
subscription but no API key can use AI features (standup, PR descriptions, PR review).
- New `ClaudeCLIProvider` implementing `AIProvider` via `claude --print`
- `aiProvider` field in `GlobalConfigSchema` (`anthropic-api` | `claude-cli`)
- Registry `ai()` returns `ClaudeCLIProvider` when `aiProvider === 'claude-cli'`
- Config wizard gains an AI provider `select` prompt; `--show` displays it
- Standup error message updated to be provider-agnostic
- 9 integration tests for `ClaudeCLIProvider`
* fix: add missing null-coalescing in password() prompt wrapper
clack v1.1 password() can return undefined for empty input; add ?? ''
fallback (matching text()) to prevent "Cannot read properties of undefined
(reading 'trim')" errors in the config wizard.
* fix: remove unsupported --tools flag from claude CLI invocation
--tools is not available in all claude CLI versions; drop it since
--print alone is sufficient for text-only completions.
* fix: drop --no-session-persistence flag for wider claude CLI compatibility
* fix: pipe prompt via stdin instead of positional arg
Large prompts (e.g. PR diffs) stall when passed as a CLI argument;
piping via stdin handles arbitrary-length input cleanly.
* fix: unset CLAUDECODE env var when spawning claude CLI
When morg is invoked from within Claude Code, the CLAUDECODE env var
is set. The claude binary refuses to run nested sessions and exits
with an error. Strip it (and CLAUDE_CODE_ENTRYPOINT) from the child
process environment so morg can call claude --print from any context.
* feat: multi-line PR body editor using @inquirer/editor
Replace the single-line text() prompt for PR body with an
@inquirer/editor prompt that opens $EDITOR, allowing full
multi-line editing of AI-generated PR descriptions.
* fix: restore --tools and --no-session-persistence flags
These are supported by claude CLI >=2.1.69. The flags were removed
during debugging but work correctly with the current version.
* feat: replace @inquirer/editor with $EDITOR-based multi-line prompt
Drop the 700KB+ inquirer dependency. The editor() prompt writes
initial content to a temp file, opens $VISUAL/$EDITOR/vi with
inherited stdio, and reads back the result — same UX, zero new deps.
* fix: ask AI provider before API key, add 'none' option
- Move AI provider select before the API key prompt
- Only show the Anthropic API key prompt when user picks 'anthropic-api'
- Add 'None (disable AI features)' as a first-class option
* feat: replace integration confirm prompts with multiselect
Single 'Integrations to enable' multiselect (Jira / Notion / Slack)
replaces three separate yes/no prompts. Credentials are only asked
for selected providers. Jira and Notion are grouped with a 'tickets
provider' hint so users know only one can be active per project.
* feat(MORG-13): update AI prompts to structured format with ticket URL support
- SYSTEM_PR_DESCRIPTION: enforce ## Ticket / ## Summary / ## Test plan
structure with explicit "no title/preamble" instruction
- SYSTEM_PR_REVIEW: explicit **What it does** / **Potential concerns** /
**Overall assessment** sections
- SYSTEM_STANDUP: **Yesterday** / **Today** / **Blockers** structure
- prDescriptionPrompt: add ticketId + ticketUrl params; builds linked
ticket reference ([ID](url): title) when URL is available
- BranchSchema: add ticketUrl field (nullable, default null)
- start.ts: store ticket.url as ticketUrl when creating branch entry
- track.ts: include ticketUrl: null in new branch entries
- pr.ts: pass ticketId + ticketUrl to prDescriptionPrompt
0 commit comments