Skip to content

Commit d0f9748

Browse files
authored
docs: add local and native binary installation configuration instructions (#94)
Change-Id: If05849fa95992739ce6659f1200f073be653ced1 Signed-off-by: Thomas Kosiewski <[email protected]>
1 parent b8e5e54 commit d0f9748

File tree

1 file changed

+110
-0
lines changed

1 file changed

+110
-0
lines changed

README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,112 @@ That's it! The plugin will auto-configure everything else.
5757
- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) installed
5858
- [folke/snacks.nvim](https://github.com/folke/snacks.nvim) for enhanced terminal support
5959

60+
## Local Installation Configuration
61+
62+
If you've used Claude Code's `migrate-installer` command to move to a local installation, you'll need to configure the plugin to use the local path.
63+
64+
### What is a Local Installation?
65+
66+
Claude Code offers a `claude migrate-installer` command that:
67+
68+
- Moves Claude Code from a global npm installation to `~/.claude/local/`
69+
- Avoids permission issues with system directories
70+
- Creates shell aliases but these may not be available to Neovim
71+
72+
### Detecting Your Installation Type
73+
74+
Check your installation type:
75+
76+
```bash
77+
# Check where claude command points
78+
which claude
79+
80+
# Global installation shows: /usr/local/bin/claude (or similar)
81+
# Local installation shows: alias to ~/.claude/local/claude
82+
83+
# Verify installation health
84+
claude doctor
85+
```
86+
87+
### Configuring for Local Installation
88+
89+
If you have a local installation, configure the plugin with the direct path:
90+
91+
```lua
92+
{
93+
"coder/claudecode.nvim",
94+
dependencies = { "folke/snacks.nvim" },
95+
opts = {
96+
terminal_cmd = "~/.claude/local/claude", -- Point to local installation
97+
},
98+
config = true,
99+
keys = {
100+
-- Your keymaps here
101+
},
102+
}
103+
```
104+
105+
<details>
106+
<summary>Native Binary Installation (Alpha)</summary>
107+
108+
Claude Code also offers an experimental native binary installation method currently in alpha testing. This provides a single executable with no Node.js dependencies.
109+
110+
#### Installation Methods
111+
112+
Install the native binary using one of these methods:
113+
114+
```bash
115+
# Fresh install (recommended)
116+
curl -fsSL claude.ai/install.sh | bash
117+
118+
# From existing Claude Code installation
119+
claude install
120+
```
121+
122+
#### Platform Support
123+
124+
- **macOS**: Full support for Intel and Apple Silicon
125+
- **Linux**: x64 and arm64 architectures
126+
- **Windows**: Via WSL (Windows Subsystem for Linux)
127+
128+
#### Benefits
129+
130+
- **Zero Dependencies**: Single executable file with no external requirements
131+
- **Cross-Platform**: Consistent experience across operating systems
132+
- **Secure Installation**: Includes checksum verification and automatic cleanup
133+
134+
#### Configuring for Native Binary
135+
136+
The exact binary path depends on your shell integration. To find your installation:
137+
138+
```bash
139+
# Check where claude command points
140+
which claude
141+
142+
# Verify installation type and health
143+
claude doctor
144+
```
145+
146+
Configure the plugin with the detected path:
147+
148+
```lua
149+
{
150+
"coder/claudecode.nvim",
151+
dependencies = { "folke/snacks.nvim" },
152+
opts = {
153+
terminal_cmd = "/path/to/your/claude", -- Use output from 'which claude'
154+
},
155+
config = true,
156+
keys = {
157+
-- Your keymaps here
158+
},
159+
}
160+
```
161+
162+
</details>
163+
164+
> **Note**: If Claude Code was installed globally via npm, you can use the default configuration without specifying `terminal_cmd`.
165+
60166
## Quick Demo
61167

62168
```vim
@@ -140,6 +246,8 @@ For deep technical details, see [ARCHITECTURE.md](./ARCHITECTURE.md).
140246
auto_start = true,
141247
log_level = "info", -- "trace", "debug", "info", "warn", "error"
142248
terminal_cmd = nil, -- Custom terminal command (default: "claude")
249+
-- For local installations: "~/.claude/local/claude"
250+
-- For native binary: use output from 'which claude'
143251

144252
-- Selection Tracking
145253
track_selection = true,
@@ -469,6 +577,8 @@ Provides convenient Claude interaction history management and access for enhance
469577
- **Claude not connecting?** Check `:ClaudeCodeStatus` and verify lock file exists in `~/.claude/ide/` (or `$CLAUDE_CONFIG_DIR/ide/` if `CLAUDE_CONFIG_DIR` is set)
470578
- **Need debug logs?** Set `log_level = "debug"` in opts
471579
- **Terminal issues?** Try `provider = "native"` if using snacks.nvim
580+
- **Local installation not working?** If you used `claude migrate-installer`, set `terminal_cmd = "~/.claude/local/claude"` in your config. Check `which claude` vs `ls ~/.claude/local/claude` to verify your installation type.
581+
- **Native binary installation not working?** If you used the alpha native binary installer, run `claude doctor` to verify installation health and use `which claude` to find the binary path. Set `terminal_cmd = "/path/to/claude"` with the detected path in your config.
472582

473583
## Contributing
474584

0 commit comments

Comments
 (0)