claude-dev-cli 0.8.3__py3-none-any.whl → 0.8.5__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-dev-cli might be problematic. Click here for more details.

@@ -9,7 +9,7 @@ Features:
9
9
  - Interactive and single-shot modes
10
10
  """
11
11
 
12
- __version__ = "0.8.3"
12
+ __version__ = "0.8.5"
13
13
  __author__ = "Julio"
14
14
  __license__ = "MIT"
15
15
 
claude_dev_cli/config.py CHANGED
@@ -84,7 +84,22 @@ class Config:
84
84
 
85
85
  def _ensure_config_dir(self) -> None:
86
86
  """Ensure configuration directory exists."""
87
+ # Check if config_dir exists as a file (not directory)
88
+ if self.config_dir.exists() and not self.config_dir.is_dir():
89
+ raise RuntimeError(
90
+ f"Configuration path {self.config_dir} exists but is not a directory. "
91
+ f"Please remove or rename this file."
92
+ )
93
+
87
94
  self.config_dir.mkdir(parents=True, exist_ok=True)
95
+
96
+ # Check if usage_log exists as a directory (not file)
97
+ if self.usage_log.exists() and self.usage_log.is_dir():
98
+ raise RuntimeError(
99
+ f"Usage log path {self.usage_log} is a directory. "
100
+ f"Please remove this directory."
101
+ )
102
+
88
103
  self.usage_log.touch(exist_ok=True)
89
104
 
90
105
  def _load_config(self) -> Dict:
@@ -101,8 +116,28 @@ class Config:
101
116
  self._save_config(default_config)
102
117
  return default_config
103
118
 
104
- with open(self.config_file, 'r') as f:
105
- return json.load(f)
119
+ # Check if config_file is actually a directory
120
+ if self.config_file.is_dir():
121
+ raise RuntimeError(
122
+ f"Configuration file {self.config_file} is a directory. "
123
+ f"Please remove this directory."
124
+ )
125
+
126
+ try:
127
+ with open(self.config_file, 'r') as f:
128
+ config = json.load(f)
129
+
130
+ # Ensure required keys exist (for backwards compatibility)
131
+ if "context" not in config:
132
+ config["context"] = ContextConfig().model_dump()
133
+ if "summarization" not in config:
134
+ config["summarization"] = SummarizationConfig().model_dump()
135
+
136
+ return config
137
+ except (json.JSONDecodeError, IOError) as e:
138
+ raise RuntimeError(
139
+ f"Failed to load configuration from {self.config_file}: {e}"
140
+ )
106
141
 
107
142
  def _save_config(self, data: Optional[Dict] = None) -> None:
108
143
  """Save configuration to file."""
claude_dev_cli/history.py CHANGED
@@ -114,6 +114,14 @@ class ConversationHistory:
114
114
 
115
115
  def __init__(self, history_dir: Path):
116
116
  self.history_dir = history_dir
117
+
118
+ # Check if history_dir exists as a file (not directory)
119
+ if self.history_dir.exists() and not self.history_dir.is_dir():
120
+ raise RuntimeError(
121
+ f"History directory path {self.history_dir} exists but is not a directory. "
122
+ f"Please remove or rename this file."
123
+ )
124
+
117
125
  self.history_dir.mkdir(parents=True, exist_ok=True)
118
126
 
119
127
  def _get_conversation_file(self, conversation_id: str) -> Path:
@@ -77,6 +77,13 @@ class SecureStorage:
77
77
 
78
78
  def _ensure_encryption_key(self) -> None:
79
79
  """Ensure encryption key exists for fallback storage."""
80
+ # Check if key_file path is a directory
81
+ if self.key_file.exists() and self.key_file.is_dir():
82
+ raise RuntimeError(
83
+ f"Encryption key path {self.key_file} is a directory. "
84
+ f"Please remove this directory."
85
+ )
86
+
80
87
  if not self.key_file.exists():
81
88
  # Generate a new encryption key
82
89
  key = Fernet.generate_key()
@@ -87,6 +94,11 @@ class SecureStorage:
87
94
 
88
95
  def _get_cipher(self) -> Fernet:
89
96
  """Get Fernet cipher for fallback encryption."""
97
+ if self.key_file.is_dir():
98
+ raise RuntimeError(
99
+ f"Encryption key path {self.key_file} is a directory. "
100
+ f"Please remove this directory."
101
+ )
90
102
  key = self.key_file.read_bytes()
91
103
  return Fernet(key)
92
104
 
@@ -95,6 +107,13 @@ class SecureStorage:
95
107
  if not self.encrypted_file.exists():
96
108
  return {}
97
109
 
110
+ # Check if encrypted_file is a directory
111
+ if self.encrypted_file.is_dir():
112
+ raise RuntimeError(
113
+ f"Encrypted keys file {self.encrypted_file} is a directory. "
114
+ f"Please remove this directory."
115
+ )
116
+
98
117
  try:
99
118
  cipher = self._get_cipher()
100
119
  encrypted_data = self.encrypted_file.read_bytes()
@@ -106,6 +125,13 @@ class SecureStorage:
106
125
 
107
126
  def _save_encrypted_keys(self, keys: dict) -> None:
108
127
  """Save keys to encrypted fallback file."""
128
+ # Check if encrypted_file is a directory
129
+ if self.encrypted_file.exists() and self.encrypted_file.is_dir():
130
+ raise RuntimeError(
131
+ f"Encrypted keys file {self.encrypted_file} is a directory. "
132
+ f"Please remove this directory."
133
+ )
134
+
109
135
  cipher = self._get_cipher()
110
136
  data = json.dumps(keys).encode()
111
137
  encrypted_data = cipher.encrypt(data)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-dev-cli
3
- Version: 0.8.3
3
+ Version: 0.8.5
4
4
  Summary: A powerful CLI tool for developers using Claude AI with multi-API routing, test generation, code review, and usage tracking
5
5
  Author-email: Julio <thinmanj@users.noreply.github.com>
6
6
  License: MIT
@@ -46,7 +46,7 @@ Dynamic: license-file
46
46
 
47
47
  [![PyPI version](https://badge.fury.io/py/claude-dev-cli.svg)](https://badge.fury.io/py/claude-dev-cli)
48
48
  [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
49
- [![Tests](https://img.shields.io/badge/tests-257%20passing-brightgreen.svg)](https://github.com/thinmanj/claude-dev-cli)
49
+ [![Tests](https://img.shields.io/badge/tests-259%20passing-brightgreen.svg)](https://github.com/thinmanj/claude-dev-cli)
50
50
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
51
51
  [![Homebrew](https://img.shields.io/badge/homebrew-available-orange.svg)](https://github.com/thinmanj/homebrew-tap)
52
52
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
@@ -1,11 +1,11 @@
1
- claude_dev_cli/__init__.py,sha256=4-FONrbZl8GAHKPOWIDbvA7AmSZsTv8CRep1rwl1w5Y,469
1
+ claude_dev_cli/__init__.py,sha256=rYarRlx5P7uBluBkbUZAqYHYUE7J0HPxfNHO16XThrk,469
2
2
  claude_dev_cli/cli.py,sha256=hy2HjU7oEWgGwNB7apBKFQmzjhYrxhHxTqtJ18iePZE,61164
3
3
  claude_dev_cli/commands.py,sha256=RKGx2rv56PM6eErvA2uoQ20hY8babuI5jav8nCUyUOk,3964
4
- claude_dev_cli/config.py,sha256=hisG91dUfDwuSdBhmYovU-rrGv__nFq-6fp7S288cSw,10471
4
+ claude_dev_cli/config.py,sha256=WCrXqb9jaGq_K7YOeosjzFXIRx8dZdaB1tFPhnFKK74,11961
5
5
  claude_dev_cli/context.py,sha256=1TlLzpREFZDEIuU7RAtlkjxARKWZpnxHHvK283sUAZE,26714
6
6
  claude_dev_cli/core.py,sha256=yaLjEixDvPzvUy4fJ2UB7nMpPPLyKACjR-RuM-1OQBY,4780
7
- claude_dev_cli/history.py,sha256=v952xORhxZD0ayrrMaIbTLfe6kOW5fYryoeEmQLlQPg,10163
8
- claude_dev_cli/secure_storage.py,sha256=TK3WOaU7a0yTOtzdP_t_28fDRp2lovANNAC6MBdm4nQ,7096
7
+ claude_dev_cli/history.py,sha256=26EjNW68JuFQJhUp1j8UdB19S-eYz3eqevkpCOATwP0,10510
8
+ claude_dev_cli/secure_storage.py,sha256=KcZuQMLTbQpMAi2Cyh-_JkNcK9vHzAITOgjTcM9sr98,8161
9
9
  claude_dev_cli/template_manager.py,sha256=ZFXOtRIoB6hpf8kLSF9TWJfvUPJt9b-PyEv3qTBK7Zs,8600
10
10
  claude_dev_cli/templates.py,sha256=lKxH943ySfUKgyHaWa4W3LVv91SgznKgajRtSRp_4UY,2260
11
11
  claude_dev_cli/toon_utils.py,sha256=S3px2UvmNEaltmTa5K-h21n2c0CPvYjZc9mc7kHGqNQ,2828
@@ -17,9 +17,9 @@ claude_dev_cli/plugins/base.py,sha256=H4HQet1I-a3WLCfE9F06Lp8NuFvVoIlou7sIgyJFK-
17
17
  claude_dev_cli/plugins/diff_editor/__init__.py,sha256=gqR5S2TyIVuq-sK107fegsutQ7Z-sgAIEbtc71FhXIM,101
18
18
  claude_dev_cli/plugins/diff_editor/plugin.py,sha256=M1bUoqpasD3ZNQo36Fu_8g92uySPZyG_ujMbj5UplsU,3073
19
19
  claude_dev_cli/plugins/diff_editor/viewer.py,sha256=1IOXIKw_01ppJx5C1dQt9Kr6U1TdAHT8_iUT5r_q0NM,17169
20
- claude_dev_cli-0.8.3.dist-info/licenses/LICENSE,sha256=DGueuJwMJtMwgLO5mWlS0TaeBrFwQuNpNZ22PU9J2bw,1062
21
- claude_dev_cli-0.8.3.dist-info/METADATA,sha256=zgkMO_8g4hwJ7ccfDqGqXM-d3OfghrhxsWt7JK0evgs,17356
22
- claude_dev_cli-0.8.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- claude_dev_cli-0.8.3.dist-info/entry_points.txt,sha256=zymgUIIVpFTARkFmxAuW2A4BQsNITh_L0uU-XunytHg,85
24
- claude_dev_cli-0.8.3.dist-info/top_level.txt,sha256=m7MF6LOIuTe41IT5Fgt0lc-DK1EgM4gUU_IZwWxK0pg,15
25
- claude_dev_cli-0.8.3.dist-info/RECORD,,
20
+ claude_dev_cli-0.8.5.dist-info/licenses/LICENSE,sha256=DGueuJwMJtMwgLO5mWlS0TaeBrFwQuNpNZ22PU9J2bw,1062
21
+ claude_dev_cli-0.8.5.dist-info/METADATA,sha256=XtTb-5eyIKIxO9FUtJSEfEq5AhADriycH-HNlDgqD3k,17356
22
+ claude_dev_cli-0.8.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
23
+ claude_dev_cli-0.8.5.dist-info/entry_points.txt,sha256=zymgUIIVpFTARkFmxAuW2A4BQsNITh_L0uU-XunytHg,85
24
+ claude_dev_cli-0.8.5.dist-info/top_level.txt,sha256=m7MF6LOIuTe41IT5Fgt0lc-DK1EgM4gUU_IZwWxK0pg,15
25
+ claude_dev_cli-0.8.5.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5