claude-code-tools 0.2.6__py3-none-any.whl → 0.2.7__py3-none-any.whl

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.

Potentially problematic release.


This version of claude-code-tools might be problematic. Click here for more details.

@@ -1,3 +1,3 @@
1
1
  """Claude Code Tools - Collection of utilities for Claude Code."""
2
2
 
3
- __version__ = "0.2.6"
3
+ __version__ = "0.2.7"
@@ -262,21 +262,30 @@ def display_interactive_ui(
262
262
  ui_console.print("[red]Invalid choice. Please try again.[/red]")
263
263
 
264
264
 
265
- def show_action_menu(session: dict) -> Optional[str]:
265
+ def show_action_menu(session: dict, stderr_mode: bool = False) -> Optional[str]:
266
266
  """Show action menu for selected session."""
267
- print(f"\n=== Session: {session['session_id'][:16]}... ===")
268
- print(f"Agent: {session['agent_display']}")
269
- print(f"Project: {session['project']}")
267
+ output = sys.stderr if stderr_mode else sys.stdout
268
+
269
+ print(f"\n=== Session: {session['session_id'][:16]}... ===", file=output)
270
+ print(f"Agent: {session['agent_display']}", file=output)
271
+ print(f"Project: {session['project']}", file=output)
270
272
  if session.get("branch"):
271
- print(f"Branch: {session['branch']}")
272
- print(f"\nWhat would you like to do?")
273
- print("1. Resume session (default)")
274
- print("2. Show session file path")
275
- print("3. Copy session file to file (*.jsonl) or directory")
276
- print()
273
+ print(f"Branch: {session['branch']}", file=output)
274
+ print(f"\nWhat would you like to do?", file=output)
275
+ print("1. Resume session (default)", file=output)
276
+ print("2. Show session file path", file=output)
277
+ print("3. Copy session file to file (*.jsonl) or directory", file=output)
278
+ print(file=output)
277
279
 
278
280
  try:
279
- choice = input("Enter choice [1-3] (or Enter for 1): ").strip()
281
+ if stderr_mode:
282
+ # In stderr mode, prompt to stderr so it's visible
283
+ sys.stderr.write("Enter choice [1-3] (or Enter for 1): ")
284
+ sys.stderr.flush()
285
+ choice = sys.stdin.readline().strip()
286
+ else:
287
+ choice = input("Enter choice [1-3] (or Enter for 1): ").strip()
288
+
280
289
  if not choice or choice == "1":
281
290
  return "resume"
282
291
  elif choice == "2":
@@ -284,10 +293,10 @@ def show_action_menu(session: dict) -> Optional[str]:
284
293
  elif choice == "3":
285
294
  return "copy"
286
295
  else:
287
- print("Invalid choice.")
296
+ print("Invalid choice.", file=output)
288
297
  return None
289
298
  except KeyboardInterrupt:
290
- print("\nCancelled.")
299
+ print("\nCancelled.", file=output)
291
300
  return None
292
301
 
293
302
 
@@ -421,7 +430,7 @@ Examples:
421
430
  )
422
431
  if selected_session:
423
432
  # Show action menu
424
- action = show_action_menu(selected_session)
433
+ action = show_action_menu(selected_session, stderr_mode=args.shell)
425
434
  if action:
426
435
  handle_action(selected_session, action, shell_mode=args.shell)
427
436
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-code-tools
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Summary: Collection of tools for working with Claude Code
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.11
@@ -182,10 +182,28 @@ See [docs/lmsh.md](docs/lmsh.md) for details.
182
182
 
183
183
  **Unified session finder** - Search across both Claude Code and Codex sessions simultaneously.
184
184
 
185
- > **⚠️ Note about the `fs` command**: For convenience, this tool is available as both `find-session` and `fs`. The short `fs` alias may conflict with existing commands or aliases in your shell. If you have a conflict, you can:
186
- > - Use the full `find-session` command instead
187
- > - Create your own alias: `alias mysearch='find-session'`
188
- > - Uninstall and reinstall without the `fs` entry point (edit `pyproject.toml`)
185
+ ### Setup (Recommended)
186
+
187
+ Add this function to your shell config (.bashrc/.zshrc) for persistent directory changes:
188
+
189
+ ```bash
190
+ fs() {
191
+ # Check if user is asking for help
192
+ if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then
193
+ find-session --help
194
+ return
195
+ fi
196
+ # Run find-session in shell mode and evaluate the output
197
+ eval "$(find-session --shell "$@" | sed '/^$/d')"
198
+ }
199
+ ```
200
+
201
+ Or source the provided function:
202
+ ```bash
203
+ source /path/to/claude-code-tools/scripts/fs-function.sh
204
+ ```
205
+
206
+ **Why use the shell wrapper?** When you resume a session from a different directory, the wrapper ensures the directory change persists after the session exits. Without it, you'll be back in your original directory after exiting the session (though the session itself runs in the correct directory).
189
207
 
190
208
  ### Usage
191
209
 
@@ -215,6 +233,7 @@ fs "keywords" -n 15
215
233
  - **Multi-agent search**: Searches both Claude Code and Codex sessions simultaneously
216
234
  - **Unified display**: Single table showing sessions from all agents with agent column
217
235
  - **Smart resume**: Automatically uses correct CLI tool (`claude` or `codex`) based on selected session
236
+ - **Persistent directory changes**: Using the `fs` wrapper ensures you stay in the session's directory after exit
218
237
  - **Optional keyword search**: Keywords are optional—omit them to show all sessions
219
238
  - **Action menu** after session selection:
220
239
  - Resume session (default)
@@ -228,6 +247,8 @@ fs "keywords" -n 15
228
247
  - Reverse chronological ordering (most recent first)
229
248
  - Press Enter to cancel (no need for Ctrl+C)
230
249
 
250
+ Note: You can also use `find-session` directly, but directory changes won't persist after exiting sessions.
251
+
231
252
  ### Configuration (Optional)
232
253
 
233
254
  Create `~/.config/find-session/config.json` to customize agent settings:
@@ -335,27 +356,48 @@ Search and resume Codex sessions by keywords. Usage is similar to `find-claude-s
335
356
  - Extracts metadata from `session_meta` entries in Codex JSONL files
336
357
  - Resumes sessions with `codex resume <session-id>`
337
358
 
359
+ ### Setup (Recommended)
360
+
361
+ Add this function to your shell config (.bashrc/.zshrc) for persistent directory changes:
362
+
363
+ ```bash
364
+ fcs-codex() {
365
+ # Check if user is asking for help
366
+ if [[ "$1" == "--help" ]] || [[ "$1" == "-h" ]]; then
367
+ find-codex-session --help
368
+ return
369
+ fi
370
+ # Run find-codex-session in shell mode and evaluate the output
371
+ eval "$(find-codex-session --shell "$@" | sed '/^$/d')"
372
+ }
373
+ ```
374
+
375
+ Or source the provided function:
376
+ ```bash
377
+ source /path/to/claude-code-tools/scripts/fcs-codex-function.sh
378
+ ```
379
+
338
380
  ### Usage
339
381
 
340
382
  ```bash
341
383
  # Search in current project only (default)
342
- find-codex-session "keyword1,keyword2"
384
+ fcs-codex "keyword1,keyword2"
343
385
 
344
386
  # Show all sessions in current project (no keyword filtering)
345
- find-codex-session
387
+ fcs-codex
346
388
 
347
389
  # Search across all projects
348
- find-codex-session "keywords" -g
349
- find-codex-session "keywords" --global
390
+ fcs-codex "keywords" -g
391
+ fcs-codex "keywords" --global
350
392
 
351
393
  # Show all sessions across all projects
352
- find-codex-session -g
394
+ fcs-codex -g
353
395
 
354
396
  # Limit number of results
355
- find-codex-session "keywords" -n 5
397
+ fcs-codex "keywords" -n 5
356
398
 
357
399
  # Custom Codex home directory
358
- find-codex-session "keywords" --codex-home /custom/path
400
+ fcs-codex "keywords" --codex-home /custom/path
359
401
  ```
360
402
 
361
403
  ### Features
@@ -375,6 +417,8 @@ find-codex-session "keywords" --codex-home /custom/path
375
417
  - Multi-line preview wrapping for better readability
376
418
  - Press Enter to cancel (no need for Ctrl+C)
377
419
 
420
+ Note: You can also use `find-codex-session` directly, but directory changes won't persist after exiting Codex.
421
+
378
422
  Looks like this --
379
423
 
380
424
  ![find-codex-session.png](demos/find-codex-session.png)
@@ -1,10 +1,10 @@
1
- claude_code_tools/__init__.py,sha256=knITpR_cX-jp2FZcW914SnsNTPegPNGIHf2aZ5f3AQY,89
1
+ claude_code_tools/__init__.py,sha256=GaBBOYwJZjFc1syMk9qvI2rExHTcUBiiS132gH0E4V0,89
2
2
  claude_code_tools/codex_bridge_mcp.py,sha256=0roYm3YgEFB6y2MvGovzHyY7avKtire4qBtz3kVaYoY,12596
3
3
  claude_code_tools/dotenv_vault.py,sha256=KPI9NDFu5HE6FfhQUYw6RhdR-miN0ScJHsBg0OVG61k,9617
4
4
  claude_code_tools/env_safe.py,sha256=TSSkOjEpzBwNgbeSR-0tR1-pAW_qmbZNmn3fiAsHJ4w,7659
5
5
  claude_code_tools/find_claude_session.py,sha256=Mc75CnAdp8mgO9y2s1_oG1rH9svZAUAdqOg_7ezkRg4,31482
6
6
  claude_code_tools/find_codex_session.py,sha256=oRSHux_0kwSxKZe5m_Nzjx2aV0b--cVzPJ-w6RXLh0c,20791
7
- claude_code_tools/find_session.py,sha256=PYGZtjqvAoND32Cqr4rzjc3h-cR4oX6qNUMf1V_g4KY,14938
7
+ claude_code_tools/find_session.py,sha256=IjvJSaeRxmGvdL6_GUVUqxQnTK7zfNECSP___QHX1V4,15443
8
8
  claude_code_tools/tmux_cli_controller.py,sha256=5QDrDlv3oabIghRHuP8jMhUfxPeyYZxizNWW5sVuJIg,34607
9
9
  claude_code_tools/tmux_remote_controller.py,sha256=eY1ouLtUzJ40Ik4nqUBvc3Gl1Rx0_L4TFW4j708lgvI,9942
10
10
  docs/cc-codex-instructions.md,sha256=5E9QotkrcVYIE5VrvJGi-sg7tdyITDrsbhaqBKr4MUk,1109
@@ -16,8 +16,8 @@ docs/lmsh.md,sha256=o2TNP1Yfl3zW23GzEqK8Bx6z1hQof_lplaeEucuHNRU,1335
16
16
  docs/reddit-post.md,sha256=ZA7kPoJNi06t6F9JQMBiIOv039ADC9lM8YXFt8UA_Jg,2345
17
17
  docs/tmux-cli-instructions.md,sha256=hKGOdaPdBlb5XFzHfi0Mm7CVlysBuJUAfop3GHreyuw,5008
18
18
  docs/vault-documentation.md,sha256=5XzNpHyhGU38JU2hKEWEL1gdPq3rC2zBg8yotK4eNF4,3600
19
- claude_code_tools-0.2.6.dist-info/METADATA,sha256=KpJQvdt74-q19JWelD7Dozm8tVIIcQRJqJL2IyTJIe4,20633
20
- claude_code_tools-0.2.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
- claude_code_tools-0.2.6.dist-info/entry_points.txt,sha256=pDnqUaK1EJ4FcFA3sGIAhTKeBhjqDkj85FfiWfdlRY8,379
22
- claude_code_tools-0.2.6.dist-info/licenses/LICENSE,sha256=BBQdOBLdFB3CEPmb3pqxeOThaFCIdsiLzmDANsCHhoM,1073
23
- claude_code_tools-0.2.6.dist-info/RECORD,,
19
+ claude_code_tools-0.2.7.dist-info/METADATA,sha256=JXVeXw2xHveoenlfljQO1iBbdooO-22c9ruYxiwA54M,21823
20
+ claude_code_tools-0.2.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
+ claude_code_tools-0.2.7.dist-info/entry_points.txt,sha256=4H8xD_1zxiannjRRB-vMyCpPOyaRG8d1jqsSJota4F4,338
22
+ claude_code_tools-0.2.7.dist-info/licenses/LICENSE,sha256=BBQdOBLdFB3CEPmb3pqxeOThaFCIdsiLzmDANsCHhoM,1073
23
+ claude_code_tools-0.2.7.dist-info/RECORD,,
@@ -3,6 +3,5 @@ env-safe = claude_code_tools.env_safe:main
3
3
  find-claude-session = claude_code_tools.find_claude_session:main
4
4
  find-codex-session = claude_code_tools.find_codex_session:main
5
5
  find-session = claude_code_tools.find_session:main
6
- fs = claude_code_tools.find_session:main
7
6
  tmux-cli = claude_code_tools.tmux_cli_controller:main
8
7
  vault = claude_code_tools.dotenv_vault:main