claude-launcher 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- claude_launcher-0.1.0/LICENSE +21 -0
- claude_launcher-0.1.0/PKG-INFO +332 -0
- claude_launcher-0.1.0/README.md +291 -0
- claude_launcher-0.1.0/pyproject.toml +89 -0
- claude_launcher-0.1.0/setup.cfg +4 -0
- claude_launcher-0.1.0/src/claude_launcher/__init__.py +3 -0
- claude_launcher-0.1.0/src/claude_launcher/__main__.py +6 -0
- claude_launcher-0.1.0/src/claude_launcher/cli.py +199 -0
- claude_launcher-0.1.0/src/claude_launcher/core/__init__.py +1 -0
- claude_launcher-0.1.0/src/claude_launcher/core/config.py +250 -0
- claude_launcher-0.1.0/src/claude_launcher/core/discovery.py +97 -0
- claude_launcher-0.1.0/src/claude_launcher/core/models.py +129 -0
- claude_launcher-0.1.0/src/claude_launcher/core/storage.py +247 -0
- claude_launcher-0.1.0/src/claude_launcher/ui/__init__.py +1 -0
- claude_launcher-0.1.0/src/claude_launcher/ui/_preview_helper.py +72 -0
- claude_launcher-0.1.0/src/claude_launcher/ui/browser.py +196 -0
- claude_launcher-0.1.0/src/claude_launcher/ui/preview.py +265 -0
- claude_launcher-0.1.0/src/claude_launcher/ui/selector.py +272 -0
- claude_launcher-0.1.0/src/claude_launcher/utils/__init__.py +1 -0
- claude_launcher-0.1.0/src/claude_launcher/utils/git.py +148 -0
- claude_launcher-0.1.0/src/claude_launcher/utils/logging.py +79 -0
- claude_launcher-0.1.0/src/claude_launcher/utils/paths.py +61 -0
- claude_launcher-0.1.0/src/claude_launcher.egg-info/PKG-INFO +332 -0
- claude_launcher-0.1.0/src/claude_launcher.egg-info/SOURCES.txt +37 -0
- claude_launcher-0.1.0/src/claude_launcher.egg-info/dependency_links.txt +1 -0
- claude_launcher-0.1.0/src/claude_launcher.egg-info/entry_points.txt +2 -0
- claude_launcher-0.1.0/src/claude_launcher.egg-info/requires.txt +17 -0
- claude_launcher-0.1.0/src/claude_launcher.egg-info/top_level.txt +1 -0
- claude_launcher-0.1.0/tests/test_browser.py +238 -0
- claude_launcher-0.1.0/tests/test_cli.py +35 -0
- claude_launcher-0.1.0/tests/test_config.py +143 -0
- claude_launcher-0.1.0/tests/test_discovery.py +96 -0
- claude_launcher-0.1.0/tests/test_git.py +544 -0
- claude_launcher-0.1.0/tests/test_integration.py +132 -0
- claude_launcher-0.1.0/tests/test_logging.py +71 -0
- claude_launcher-0.1.0/tests/test_paths.py +87 -0
- claude_launcher-0.1.0/tests/test_preview.py +188 -0
- claude_launcher-0.1.0/tests/test_selector.py +184 -0
- claude_launcher-0.1.0/tests/test_storage.py +126 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Claude Launcher Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: claude-launcher
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Fast context switching for Claude Code in multi-project environments
|
|
5
|
+
Author: Solent Labsβ’
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/solentlabs/claude-launcher
|
|
8
|
+
Project-URL: Repository, https://github.com/solentlabs/claude-launcher
|
|
9
|
+
Project-URL: Issues, https://github.com/solentlabs/claude-launcher/issues
|
|
10
|
+
Keywords: claude,launcher,project-switcher,productivity,cli
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Classifier: Topic :: Software Development
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.8
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: iterfzf>=1.4.0
|
|
27
|
+
Requires-Dist: typer>=0.12.0
|
|
28
|
+
Requires-Dist: platformdirs>=4.0.0
|
|
29
|
+
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
|
|
30
|
+
Requires-Dist: tomli-w>=1.0.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
33
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
34
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
37
|
+
Requires-Dist: isort>=5.12.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# Claude Launcher
|
|
43
|
+
|
|
44
|
+
Fast context switching for Claude Code in multi-project environments.
|
|
45
|
+
|
|
46
|
+
[](https://www.python.org/downloads/)
|
|
47
|
+
[](https://opensource.org/licenses/MIT)
|
|
48
|
+
|
|
49
|
+
> **Community Project** - This is an independent tool built by the community, not affiliated with Anthropic.
|
|
50
|
+
|
|
51
|
+
## Overview
|
|
52
|
+
|
|
53
|
+
Claude Launcher is a productivity tool for developers working with multiple Claude Code projects. It provides fast project discovery, tree-structured navigation, and intelligent context switching with an interactive fuzzy-search interface powered by fzf.
|
|
54
|
+
|
|
55
|
+
## Features
|
|
56
|
+
|
|
57
|
+
- π **Auto-discovery** - Automatically finds git repositories in configured directories
|
|
58
|
+
- π **Alphabetical organization** - Projects sorted by path for easy navigation
|
|
59
|
+
- β‘ **Smart defaults** - Cursor starts on your last opened project
|
|
60
|
+
- π **Fuzzy search** - Interactive project selection powered by fzf
|
|
61
|
+
- π **Rich previews** - Shows CLAUDE.md, git status, and directory contents
|
|
62
|
+
- π― **Manual paths** - Add non-git projects manually
|
|
63
|
+
- π **Git clone integration** - Clone and launch repositories directly
|
|
64
|
+
- π‘οΈ **Error recovery** - Automatic database corruption recovery
|
|
65
|
+
- π₯οΈ **Cross-platform** - Works on Linux, macOS, and Windows
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
|
|
69
|
+
### From PyPI (Recommended)
|
|
70
|
+
```bash
|
|
71
|
+
pip install claude-launcher
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### From Source (Development)
|
|
75
|
+
```bash
|
|
76
|
+
git clone https://github.com/solentlabs/claude-launcher.git
|
|
77
|
+
cd claude-launcher
|
|
78
|
+
pip install -e .
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### With Development Dependencies
|
|
82
|
+
```bash
|
|
83
|
+
pip install -e ".[dev]"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Quick Start
|
|
87
|
+
|
|
88
|
+
### Initial Setup
|
|
89
|
+
Run the first-time setup wizard to configure scan directories:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
claude-launcher --setup
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
You'll be prompted to enter directories to scan for projects (e.g., `~/projects`, `~/work`).
|
|
96
|
+
|
|
97
|
+
### Basic Usage
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Launch interactive project selector
|
|
101
|
+
claude-launcher
|
|
102
|
+
|
|
103
|
+
# Jump directly to last opened project
|
|
104
|
+
claude-launcher --recent
|
|
105
|
+
|
|
106
|
+
# List all discovered projects
|
|
107
|
+
claude-launcher --list
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Managing Projects
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Add a manual project path
|
|
114
|
+
claude-launcher --add
|
|
115
|
+
|
|
116
|
+
# Remove a manual path
|
|
117
|
+
claude-launcher --remove
|
|
118
|
+
|
|
119
|
+
# Clone a git repository
|
|
120
|
+
claude-launcher --clone
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Commands
|
|
124
|
+
|
|
125
|
+
| Command | Description |
|
|
126
|
+
|---------|-------------|
|
|
127
|
+
| `claude-launcher` | Launch interactive project selector |
|
|
128
|
+
| `claude-launcher --setup` | Run first-time setup or reconfigure |
|
|
129
|
+
| `claude-launcher --add` | Add a manual project path via directory browser |
|
|
130
|
+
| `claude-launcher --remove` | Remove a manual path |
|
|
131
|
+
| `claude-launcher --list` | List all discovered projects |
|
|
132
|
+
| `claude-launcher --recent` | Jump to last opened project |
|
|
133
|
+
| `claude-launcher --clone` | Clone a git repository |
|
|
134
|
+
|
|
135
|
+
## Configuration
|
|
136
|
+
|
|
137
|
+
Configuration files are stored in platform-specific locations:
|
|
138
|
+
|
|
139
|
+
- **Linux/WSL:** `~/.config/claude-launcher/config.toml`
|
|
140
|
+
- **macOS:** `~/Library/Application Support/claude-launcher/config.toml`
|
|
141
|
+
- **Windows:** `%LOCALAPPDATA%\claude-launcher\config.toml`
|
|
142
|
+
|
|
143
|
+
### Configuration Options
|
|
144
|
+
|
|
145
|
+
```toml
|
|
146
|
+
[scan]
|
|
147
|
+
# Directories to scan for git repositories
|
|
148
|
+
paths = [
|
|
149
|
+
"~/projects",
|
|
150
|
+
"~/work",
|
|
151
|
+
"/mnt/c/Users/username/dev", # WSL example
|
|
152
|
+
]
|
|
153
|
+
|
|
154
|
+
# Maximum directory depth to scan
|
|
155
|
+
max_depth = 5
|
|
156
|
+
|
|
157
|
+
# Directories to skip during scanning
|
|
158
|
+
prune_dirs = [
|
|
159
|
+
"node_modules",
|
|
160
|
+
".cache",
|
|
161
|
+
"venv",
|
|
162
|
+
"__pycache__",
|
|
163
|
+
".git",
|
|
164
|
+
]
|
|
165
|
+
|
|
166
|
+
[ui]
|
|
167
|
+
# Preview pane width (characters)
|
|
168
|
+
preview_width = 70
|
|
169
|
+
|
|
170
|
+
# Show git status in preview
|
|
171
|
+
show_git_status = true
|
|
172
|
+
|
|
173
|
+
[history]
|
|
174
|
+
# Maximum access history entries to keep
|
|
175
|
+
max_entries = 50
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Path Expansion
|
|
179
|
+
|
|
180
|
+
Paths in configuration support:
|
|
181
|
+
- Tilde expansion: `~/projects` β `/home/user/projects`
|
|
182
|
+
- Environment variables: `$HOME/projects` β `/home/user/projects`
|
|
183
|
+
|
|
184
|
+
## Data Storage
|
|
185
|
+
|
|
186
|
+
Project data (manual paths, history) is stored in SQLite:
|
|
187
|
+
|
|
188
|
+
- **Linux/WSL:** `~/.local/share/claude-launcher/projects.db`
|
|
189
|
+
- **macOS:** `~/Library/Application Support/claude-launcher/projects.db`
|
|
190
|
+
- **Windows:** `%LOCALAPPDATA%\claude-launcher\projects.db`
|
|
191
|
+
|
|
192
|
+
## How It Works
|
|
193
|
+
|
|
194
|
+
1. **Discovery**: Scans configured directories for `.git` folders
|
|
195
|
+
2. **Manual Paths**: Combines discovered repos with manually added paths
|
|
196
|
+
3. **Sorting**: Sorts all projects alphabetically by path
|
|
197
|
+
4. **Selection**: Shows fuzzy-searchable list with preview pane
|
|
198
|
+
5. **Default Cursor**: Positions cursor on last opened project
|
|
199
|
+
6. **Launch**: Changes to selected directory and executes `claude` command
|
|
200
|
+
7. **Tracking**: Records selection for next session
|
|
201
|
+
|
|
202
|
+
## Preview Pane
|
|
203
|
+
|
|
204
|
+
The preview pane shows:
|
|
205
|
+
|
|
206
|
+
1. **CLAUDE.md** (first 20 lines) - Project-specific Claude Code instructions
|
|
207
|
+
2. **Git Status** - Current working tree status (if git repo)
|
|
208
|
+
3. **Directory Listing** - Top-level files and folders
|
|
209
|
+
|
|
210
|
+
## Windows Terminal Integration
|
|
211
|
+
|
|
212
|
+
Add to your Windows Terminal `settings.json`:
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"name": "Claude Launcher",
|
|
217
|
+
"commandline": "wsl.exe -d Ubuntu -- bash -lic claude-launcher",
|
|
218
|
+
"icon": "π"
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Error Handling
|
|
223
|
+
|
|
224
|
+
Claude Launcher includes robust error recovery:
|
|
225
|
+
|
|
226
|
+
- **Database corruption**: Automatically backs up and recreates
|
|
227
|
+
- **Missing manual paths**: Auto-removes from database
|
|
228
|
+
- **Invalid config**: Falls back to sensible defaults
|
|
229
|
+
- **Git failures**: Gracefully degrades (shows project without status)
|
|
230
|
+
- **Permission errors**: Logs and continues scanning
|
|
231
|
+
|
|
232
|
+
## Development
|
|
233
|
+
|
|
234
|
+
### Running Tests
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Run all tests
|
|
238
|
+
pytest
|
|
239
|
+
|
|
240
|
+
# Run with coverage
|
|
241
|
+
pytest --cov=claude_launcher --cov-report=term-missing
|
|
242
|
+
|
|
243
|
+
# Run specific test file
|
|
244
|
+
pytest tests/test_discovery.py
|
|
245
|
+
|
|
246
|
+
# Run with verbose output
|
|
247
|
+
pytest -v
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Code Quality
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# Format code
|
|
254
|
+
black src/ tests/
|
|
255
|
+
|
|
256
|
+
# Type checking
|
|
257
|
+
mypy src/
|
|
258
|
+
|
|
259
|
+
# Lint
|
|
260
|
+
flake8 src/ tests/
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Project Structure
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
claude-workflow/
|
|
267
|
+
βββ src/claude_launcher/
|
|
268
|
+
β βββ core/ # Core functionality
|
|
269
|
+
β β βββ models.py # Data models
|
|
270
|
+
β β βββ config.py # Configuration management
|
|
271
|
+
β β βββ discovery.py # Project discovery
|
|
272
|
+
β β βββ storage.py # SQLite storage
|
|
273
|
+
β βββ ui/ # User interface
|
|
274
|
+
β β βββ selector.py # Main TUI
|
|
275
|
+
β β βββ preview.py # Preview generation
|
|
276
|
+
β β βββ browser.py # Directory browser
|
|
277
|
+
β βββ utils/ # Utilities
|
|
278
|
+
β β βββ git.py # Git operations
|
|
279
|
+
β βββ cli.py # CLI entry point
|
|
280
|
+
βββ tests/ # Test suite
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## Requirements
|
|
284
|
+
|
|
285
|
+
- **Python**: 3.8 or higher
|
|
286
|
+
- **fzf**: Interactive fuzzy finder ([installation guide](https://github.com/junegunn/fzf#installation))
|
|
287
|
+
- Ubuntu/Debian: `sudo apt install fzf`
|
|
288
|
+
- macOS: `brew install fzf`
|
|
289
|
+
- Windows: `choco install fzf`
|
|
290
|
+
- **Git**: For repository discovery and status
|
|
291
|
+
- **Claude Code CLI**: Must be installed and in PATH
|
|
292
|
+
|
|
293
|
+
## Troubleshooting
|
|
294
|
+
|
|
295
|
+
### "claude command not found"
|
|
296
|
+
Ensure Claude Code CLI is installed and accessible in your PATH.
|
|
297
|
+
|
|
298
|
+
### No projects found
|
|
299
|
+
1. Run `claude-launcher --setup` to configure scan paths
|
|
300
|
+
2. Verify paths exist and contain git repositories
|
|
301
|
+
3. Check permissions on directories
|
|
302
|
+
|
|
303
|
+
### Database errors
|
|
304
|
+
The database auto-recovers from corruption. Check for `.db.backup.*` files if you need to restore data.
|
|
305
|
+
|
|
306
|
+
### Permission denied during scan
|
|
307
|
+
Some directories may not be readable. These are automatically skipped with a warning.
|
|
308
|
+
|
|
309
|
+
## Contributing
|
|
310
|
+
|
|
311
|
+
Contributions are welcome! Please:
|
|
312
|
+
|
|
313
|
+
1. Fork the repository
|
|
314
|
+
2. Create a feature branch
|
|
315
|
+
3. Add tests for new functionality
|
|
316
|
+
4. Ensure all tests pass
|
|
317
|
+
5. Submit a pull request
|
|
318
|
+
|
|
319
|
+
## License
|
|
320
|
+
|
|
321
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
322
|
+
|
|
323
|
+
## Changelog
|
|
324
|
+
|
|
325
|
+
### 0.1.0 (Initial Release)
|
|
326
|
+
- Project discovery with git repository scanning
|
|
327
|
+
- Alphabetical sorting with last-opened default
|
|
328
|
+
- Interactive fuzzy search with preview pane
|
|
329
|
+
- Manual path management
|
|
330
|
+
- Git clone integration
|
|
331
|
+
- Error recovery
|
|
332
|
+
- Cross-platform support
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
# Claude Launcher
|
|
2
|
+
|
|
3
|
+
Fast context switching for Claude Code in multi-project environments.
|
|
4
|
+
|
|
5
|
+
[](https://www.python.org/downloads/)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
> **Community Project** - This is an independent tool built by the community, not affiliated with Anthropic.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Claude Launcher is a productivity tool for developers working with multiple Claude Code projects. It provides fast project discovery, tree-structured navigation, and intelligent context switching with an interactive fuzzy-search interface powered by fzf.
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- π **Auto-discovery** - Automatically finds git repositories in configured directories
|
|
17
|
+
- π **Alphabetical organization** - Projects sorted by path for easy navigation
|
|
18
|
+
- β‘ **Smart defaults** - Cursor starts on your last opened project
|
|
19
|
+
- π **Fuzzy search** - Interactive project selection powered by fzf
|
|
20
|
+
- π **Rich previews** - Shows CLAUDE.md, git status, and directory contents
|
|
21
|
+
- π― **Manual paths** - Add non-git projects manually
|
|
22
|
+
- π **Git clone integration** - Clone and launch repositories directly
|
|
23
|
+
- π‘οΈ **Error recovery** - Automatic database corruption recovery
|
|
24
|
+
- π₯οΈ **Cross-platform** - Works on Linux, macOS, and Windows
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
### From PyPI (Recommended)
|
|
29
|
+
```bash
|
|
30
|
+
pip install claude-launcher
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### From Source (Development)
|
|
34
|
+
```bash
|
|
35
|
+
git clone https://github.com/solentlabs/claude-launcher.git
|
|
36
|
+
cd claude-launcher
|
|
37
|
+
pip install -e .
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### With Development Dependencies
|
|
41
|
+
```bash
|
|
42
|
+
pip install -e ".[dev]"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
### Initial Setup
|
|
48
|
+
Run the first-time setup wizard to configure scan directories:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
claude-launcher --setup
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
You'll be prompted to enter directories to scan for projects (e.g., `~/projects`, `~/work`).
|
|
55
|
+
|
|
56
|
+
### Basic Usage
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Launch interactive project selector
|
|
60
|
+
claude-launcher
|
|
61
|
+
|
|
62
|
+
# Jump directly to last opened project
|
|
63
|
+
claude-launcher --recent
|
|
64
|
+
|
|
65
|
+
# List all discovered projects
|
|
66
|
+
claude-launcher --list
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Managing Projects
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Add a manual project path
|
|
73
|
+
claude-launcher --add
|
|
74
|
+
|
|
75
|
+
# Remove a manual path
|
|
76
|
+
claude-launcher --remove
|
|
77
|
+
|
|
78
|
+
# Clone a git repository
|
|
79
|
+
claude-launcher --clone
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Commands
|
|
83
|
+
|
|
84
|
+
| Command | Description |
|
|
85
|
+
|---------|-------------|
|
|
86
|
+
| `claude-launcher` | Launch interactive project selector |
|
|
87
|
+
| `claude-launcher --setup` | Run first-time setup or reconfigure |
|
|
88
|
+
| `claude-launcher --add` | Add a manual project path via directory browser |
|
|
89
|
+
| `claude-launcher --remove` | Remove a manual path |
|
|
90
|
+
| `claude-launcher --list` | List all discovered projects |
|
|
91
|
+
| `claude-launcher --recent` | Jump to last opened project |
|
|
92
|
+
| `claude-launcher --clone` | Clone a git repository |
|
|
93
|
+
|
|
94
|
+
## Configuration
|
|
95
|
+
|
|
96
|
+
Configuration files are stored in platform-specific locations:
|
|
97
|
+
|
|
98
|
+
- **Linux/WSL:** `~/.config/claude-launcher/config.toml`
|
|
99
|
+
- **macOS:** `~/Library/Application Support/claude-launcher/config.toml`
|
|
100
|
+
- **Windows:** `%LOCALAPPDATA%\claude-launcher\config.toml`
|
|
101
|
+
|
|
102
|
+
### Configuration Options
|
|
103
|
+
|
|
104
|
+
```toml
|
|
105
|
+
[scan]
|
|
106
|
+
# Directories to scan for git repositories
|
|
107
|
+
paths = [
|
|
108
|
+
"~/projects",
|
|
109
|
+
"~/work",
|
|
110
|
+
"/mnt/c/Users/username/dev", # WSL example
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
# Maximum directory depth to scan
|
|
114
|
+
max_depth = 5
|
|
115
|
+
|
|
116
|
+
# Directories to skip during scanning
|
|
117
|
+
prune_dirs = [
|
|
118
|
+
"node_modules",
|
|
119
|
+
".cache",
|
|
120
|
+
"venv",
|
|
121
|
+
"__pycache__",
|
|
122
|
+
".git",
|
|
123
|
+
]
|
|
124
|
+
|
|
125
|
+
[ui]
|
|
126
|
+
# Preview pane width (characters)
|
|
127
|
+
preview_width = 70
|
|
128
|
+
|
|
129
|
+
# Show git status in preview
|
|
130
|
+
show_git_status = true
|
|
131
|
+
|
|
132
|
+
[history]
|
|
133
|
+
# Maximum access history entries to keep
|
|
134
|
+
max_entries = 50
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Path Expansion
|
|
138
|
+
|
|
139
|
+
Paths in configuration support:
|
|
140
|
+
- Tilde expansion: `~/projects` β `/home/user/projects`
|
|
141
|
+
- Environment variables: `$HOME/projects` β `/home/user/projects`
|
|
142
|
+
|
|
143
|
+
## Data Storage
|
|
144
|
+
|
|
145
|
+
Project data (manual paths, history) is stored in SQLite:
|
|
146
|
+
|
|
147
|
+
- **Linux/WSL:** `~/.local/share/claude-launcher/projects.db`
|
|
148
|
+
- **macOS:** `~/Library/Application Support/claude-launcher/projects.db`
|
|
149
|
+
- **Windows:** `%LOCALAPPDATA%\claude-launcher\projects.db`
|
|
150
|
+
|
|
151
|
+
## How It Works
|
|
152
|
+
|
|
153
|
+
1. **Discovery**: Scans configured directories for `.git` folders
|
|
154
|
+
2. **Manual Paths**: Combines discovered repos with manually added paths
|
|
155
|
+
3. **Sorting**: Sorts all projects alphabetically by path
|
|
156
|
+
4. **Selection**: Shows fuzzy-searchable list with preview pane
|
|
157
|
+
5. **Default Cursor**: Positions cursor on last opened project
|
|
158
|
+
6. **Launch**: Changes to selected directory and executes `claude` command
|
|
159
|
+
7. **Tracking**: Records selection for next session
|
|
160
|
+
|
|
161
|
+
## Preview Pane
|
|
162
|
+
|
|
163
|
+
The preview pane shows:
|
|
164
|
+
|
|
165
|
+
1. **CLAUDE.md** (first 20 lines) - Project-specific Claude Code instructions
|
|
166
|
+
2. **Git Status** - Current working tree status (if git repo)
|
|
167
|
+
3. **Directory Listing** - Top-level files and folders
|
|
168
|
+
|
|
169
|
+
## Windows Terminal Integration
|
|
170
|
+
|
|
171
|
+
Add to your Windows Terminal `settings.json`:
|
|
172
|
+
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"name": "Claude Launcher",
|
|
176
|
+
"commandline": "wsl.exe -d Ubuntu -- bash -lic claude-launcher",
|
|
177
|
+
"icon": "π"
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Error Handling
|
|
182
|
+
|
|
183
|
+
Claude Launcher includes robust error recovery:
|
|
184
|
+
|
|
185
|
+
- **Database corruption**: Automatically backs up and recreates
|
|
186
|
+
- **Missing manual paths**: Auto-removes from database
|
|
187
|
+
- **Invalid config**: Falls back to sensible defaults
|
|
188
|
+
- **Git failures**: Gracefully degrades (shows project without status)
|
|
189
|
+
- **Permission errors**: Logs and continues scanning
|
|
190
|
+
|
|
191
|
+
## Development
|
|
192
|
+
|
|
193
|
+
### Running Tests
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Run all tests
|
|
197
|
+
pytest
|
|
198
|
+
|
|
199
|
+
# Run with coverage
|
|
200
|
+
pytest --cov=claude_launcher --cov-report=term-missing
|
|
201
|
+
|
|
202
|
+
# Run specific test file
|
|
203
|
+
pytest tests/test_discovery.py
|
|
204
|
+
|
|
205
|
+
# Run with verbose output
|
|
206
|
+
pytest -v
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Code Quality
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Format code
|
|
213
|
+
black src/ tests/
|
|
214
|
+
|
|
215
|
+
# Type checking
|
|
216
|
+
mypy src/
|
|
217
|
+
|
|
218
|
+
# Lint
|
|
219
|
+
flake8 src/ tests/
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Project Structure
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
claude-workflow/
|
|
226
|
+
βββ src/claude_launcher/
|
|
227
|
+
β βββ core/ # Core functionality
|
|
228
|
+
β β βββ models.py # Data models
|
|
229
|
+
β β βββ config.py # Configuration management
|
|
230
|
+
β β βββ discovery.py # Project discovery
|
|
231
|
+
β β βββ storage.py # SQLite storage
|
|
232
|
+
β βββ ui/ # User interface
|
|
233
|
+
β β βββ selector.py # Main TUI
|
|
234
|
+
β β βββ preview.py # Preview generation
|
|
235
|
+
β β βββ browser.py # Directory browser
|
|
236
|
+
β βββ utils/ # Utilities
|
|
237
|
+
β β βββ git.py # Git operations
|
|
238
|
+
β βββ cli.py # CLI entry point
|
|
239
|
+
βββ tests/ # Test suite
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Requirements
|
|
243
|
+
|
|
244
|
+
- **Python**: 3.8 or higher
|
|
245
|
+
- **fzf**: Interactive fuzzy finder ([installation guide](https://github.com/junegunn/fzf#installation))
|
|
246
|
+
- Ubuntu/Debian: `sudo apt install fzf`
|
|
247
|
+
- macOS: `brew install fzf`
|
|
248
|
+
- Windows: `choco install fzf`
|
|
249
|
+
- **Git**: For repository discovery and status
|
|
250
|
+
- **Claude Code CLI**: Must be installed and in PATH
|
|
251
|
+
|
|
252
|
+
## Troubleshooting
|
|
253
|
+
|
|
254
|
+
### "claude command not found"
|
|
255
|
+
Ensure Claude Code CLI is installed and accessible in your PATH.
|
|
256
|
+
|
|
257
|
+
### No projects found
|
|
258
|
+
1. Run `claude-launcher --setup` to configure scan paths
|
|
259
|
+
2. Verify paths exist and contain git repositories
|
|
260
|
+
3. Check permissions on directories
|
|
261
|
+
|
|
262
|
+
### Database errors
|
|
263
|
+
The database auto-recovers from corruption. Check for `.db.backup.*` files if you need to restore data.
|
|
264
|
+
|
|
265
|
+
### Permission denied during scan
|
|
266
|
+
Some directories may not be readable. These are automatically skipped with a warning.
|
|
267
|
+
|
|
268
|
+
## Contributing
|
|
269
|
+
|
|
270
|
+
Contributions are welcome! Please:
|
|
271
|
+
|
|
272
|
+
1. Fork the repository
|
|
273
|
+
2. Create a feature branch
|
|
274
|
+
3. Add tests for new functionality
|
|
275
|
+
4. Ensure all tests pass
|
|
276
|
+
5. Submit a pull request
|
|
277
|
+
|
|
278
|
+
## License
|
|
279
|
+
|
|
280
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
281
|
+
|
|
282
|
+
## Changelog
|
|
283
|
+
|
|
284
|
+
### 0.1.0 (Initial Release)
|
|
285
|
+
- Project discovery with git repository scanning
|
|
286
|
+
- Alphabetical sorting with last-opened default
|
|
287
|
+
- Interactive fuzzy search with preview pane
|
|
288
|
+
- Manual path management
|
|
289
|
+
- Git clone integration
|
|
290
|
+
- Error recovery
|
|
291
|
+
- Cross-platform support
|