Skip to content

feat: add ! and ? CLI shortcuts#43

Merged
laynepenney merged 23 commits intomainfrom
feat/cli-shortcuts
Jan 18, 2026
Merged

feat: add ! and ? CLI shortcuts#43
laynepenney merged 23 commits intomainfrom
feat/cli-shortcuts

Conversation

@laynepenney
Copy link
Copy Markdown
Collaborator

Summary

Add convenient shortcuts inspired by Claude Code and Codex:

  • !<command> - Run shell command directly (e.g., !ls, !git status)
  • ?[topic] - Show help, optionally filtered by topic

Features

Shell shortcut (!)

> !ls -la
total 48
drwxr-xr-x  12 user  staff   384 Jan 18 08:00 .
...

> !git status
On branch main
nothing to commit, working tree clean

Help shortcut (?)

> ?
(shows full help)

> ?git
Commands matching "git":
  /commit (ci)
    Generate commit message and commit
  /branch (br)
    Create, switch, list, delete branches
  ...

Test plan

  • All 1419 tests pass
  • Manual test: !ls runs ls command
  • Manual test: ?git shows git-related commands
  • Manual test: ? shows full help

🤖 Generated with Claude Code

laynepenney and others added 23 commits January 17, 2026 12:33
The PasteInterceptor processes the entire paste (including end marker)
before readline fires any line events. This caused multi-line pastes
to be submitted line-by-line because by the time the first line event
fired, the paste was already 'ended'.

Fix: Track expected line count when paste ends, and only flush after
all expected lines have been received.
Completely rewrites paste handling to work like Claude Code:
- Capture entire paste content in PasteInterceptor
- Display '[pasted N lines, M chars]' summary
- Store paste for consumption by line handler
- Emit newline to trigger readline submission

This fixes multi-line paste being submitted line-by-line.
Added /log and /history as standalone aliases for /git log,
matching the pattern of other git command aliases like /commit,
/branch, and /pr.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added TypeDoc API documentation generation (pnpm docs)
- Created CHANGELOG.md from GitHub release notes
- Fixed docs/tools.md - removed outdated paste code examples
- Added ollama-cloud mentions alongside ollama in:
  - marketing/social-posts.md
  - docs/index.html
  - .github/ISSUE_TEMPLATE/bug_report.md
- Added docs/api/ to .gitignore (generated)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Clarified that AI agents must review PRs before merging:
- Added explicit warning not to merge without reviewing
- Added specific instructions for AI agents
- Added step to document review with comment
- Emphasized "merge only after review is complete"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Changed default baseUrl from localhost to https://ollama.com
- Added OLLAMA_API_KEY support for authentication
- Added Authorization header to all API calls when key is set
- Updated docs to show ollama signin and API key options
- Removed incorrect OLLAMA_BASE_URL instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed auto-detection to prefer Ollama (free/local) over OpenAI.
Users can still explicitly set embeddingProvider: 'openai' in config
if they prefer OpenAI embeddings.

Note: Anthropic does not offer embedding models - they recommend
Voyage AI as their preferred embedding partner.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add convenient shortcuts for common CLI operations:

- !<command> - Run shell command directly (e.g., !ls, !git status)
  Executes with inherited stdio for real-time output
- ?[topic] - Show help, optionally filtered by topic
  Searches command names, descriptions, and aliases

Updated /help to show shortcuts section at the top.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator Author

@laynepenney laynepenney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff. Implementation looks clean:

  • Uses spawn with stdio: 'inherit' for real-time command output
  • Properly handles exit codes and errors
  • ? search is case-insensitive and checks name, description, and aliases
  • Help text updated to show shortcuts prominently

Ready to merge.

@laynepenney laynepenney merged commit 324b2ae into main Jan 18, 2026
0 of 2 checks passed
@laynepenney laynepenney mentioned this pull request Jan 18, 2026
2 tasks
@laynepenney laynepenney deleted the feat/cli-shortcuts branch January 24, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant