Browse Source

feat(canvas-tui): Add 'canvas' as shorter CLI alias

- Add 'canvas' bin entry alongside 'canvas-tui'
- Update help text with all current controls
- Just type 'canvas' - defaults handle the rest

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0xDarkMatter 3 months ago
parent
commit
79f5c83729
2 changed files with 15 additions and 13 deletions
  1. 1 0
      canvas-tui/package.json
  2. 14 13
      canvas-tui/src/index.tsx

+ 1 - 0
canvas-tui/package.json

@@ -5,6 +5,7 @@
   "type": "module",
   "main": "dist/index.js",
   "bin": {
+    "canvas": "./bin/canvas.js",
     "canvas-tui": "./bin/canvas.js"
   },
   "scripts": {

+ 14 - 13
canvas-tui/src/index.tsx

@@ -6,30 +6,31 @@ import { App } from './app.js';
 
 const cli = meow(`
   Usage
-    $ canvas-tui [options]
+    $ canvas [options]
 
   Options
-    --watch, -w       Watch directory for changes (default: .claude/canvas)
+    --watch, -w       Watch directory (default: .claude/canvas)
     --file, -f        Specific file to watch
     --no-mouse        Disable mouse wheel scrolling
-    --help            Show this help message
+    --help            Show this help
     --version         Show version
 
   Examples
-    $ canvas-tui --watch
-    $ canvas-tui --file ./draft.md
-    $ canvas-tui --watch --no-mouse
+    $ canvas                     # Just run it - defaults work
+    $ canvas --file ./draft.md   # Watch specific file
 
   Controls
-    Arrow keys / Mouse wheel    Scroll content
-    g / G                       Go to top / bottom
-    q / Ctrl+C                  Quit
-    r                           Refresh
+    ↑↓ / Mouse wheel    Scroll content
+    g / G               Top / bottom
+    Tab                 Open file selector
+    e                   Edit in external editor
+    m                   Toggle mouse capture
+    q                   Quit
 
   Terminal Setup
-    Warp:     Ctrl+Shift+D to split, run canvas-tui in new pane
-    tmux:     tmux split-window -h 'canvas-tui --watch'
-    iTerm2:   Cmd+D to split, run canvas-tui in new pane
+    Warp:     Ctrl+Shift+D to split, run 'canvas' in new pane
+    tmux:     tmux split-window -h 'canvas'
+    iTerm2:   Cmd+D to split, run 'canvas' in new pane
 `, {
   importMeta: import.meta,
   flags: {