claude-dev-cli 0.8.3__tar.gz → 0.8.5__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_dev_cli-0.8.3/src/claude_dev_cli.egg-info → claude_dev_cli-0.8.5}/PKG-INFO +2 -2
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/README.md +1 -1
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/pyproject.toml +1 -1
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/__init__.py +1 -1
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/config.py +37 -2
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/history.py +8 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/secure_storage.py +26 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5/src/claude_dev_cli.egg-info}/PKG-INFO +2 -2
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_config.py +35 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/LICENSE +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/MANIFEST.in +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/setup.cfg +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/cli.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/commands.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/context.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/core.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/plugins/__init__.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/plugins/base.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/plugins/diff_editor/__init__.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/plugins/diff_editor/plugin.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/plugins/diff_editor/viewer.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/template_manager.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/templates.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/toon_utils.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/usage.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/warp_integration.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/workflows.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli.egg-info/SOURCES.txt +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli.egg-info/dependency_links.txt +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli.egg-info/entry_points.txt +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli.egg-info/requires.txt +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli.egg-info/top_level.txt +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_cli.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_commands.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_context.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_core.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_diff_editor.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_history.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_secure_storage.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_template_manager.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_toon_utils.py +0 -0
- {claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/tests/test_usage.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-dev-cli
|
|
3
|
-
Version: 0.8.
|
|
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
|
[](https://badge.fury.io/py/claude-dev-cli)
|
|
48
48
|
[](https://www.python.org/downloads/)
|
|
49
|
-
[](https://github.com/thinmanj/claude-dev-cli)
|
|
50
50
|
[](https://opensource.org/licenses/MIT)
|
|
51
51
|
[](https://github.com/thinmanj/homebrew-tap)
|
|
52
52
|
[](https://github.com/psf/black)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/py/claude-dev-cli)
|
|
4
4
|
[](https://www.python.org/downloads/)
|
|
5
|
-
[](https://github.com/thinmanj/claude-dev-cli)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://github.com/thinmanj/homebrew-tap)
|
|
8
8
|
[](https://github.com/psf/black)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "claude-dev-cli"
|
|
7
|
-
version = "0.8.
|
|
7
|
+
version = "0.8.5"
|
|
8
8
|
description = "A powerful CLI tool for developers using Claude AI with multi-API routing, test generation, code review, and usage tracking"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -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
|
-
|
|
105
|
-
|
|
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."""
|
|
@@ -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
|
+
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
|
[](https://badge.fury.io/py/claude-dev-cli)
|
|
48
48
|
[](https://www.python.org/downloads/)
|
|
49
|
-
[](https://github.com/thinmanj/claude-dev-cli)
|
|
50
50
|
[](https://opensource.org/licenses/MIT)
|
|
51
51
|
[](https://github.com/thinmanj/homebrew-tap)
|
|
52
52
|
[](https://github.com/psf/black)
|
|
@@ -70,6 +70,41 @@ class TestConfig:
|
|
|
70
70
|
assert config.config_dir.exists()
|
|
71
71
|
assert config.usage_log.exists()
|
|
72
72
|
|
|
73
|
+
def test_config_dir_as_file_raises(self, temp_home: Path) -> None:
|
|
74
|
+
"""Test that having config path as file raises error."""
|
|
75
|
+
# Create config path as a file instead of directory
|
|
76
|
+
config_path = temp_home / ".claude-dev-cli"
|
|
77
|
+
config_path.write_text("invalid file")
|
|
78
|
+
|
|
79
|
+
with pytest.raises(RuntimeError, match="exists but is not a directory"):
|
|
80
|
+
Config()
|
|
81
|
+
|
|
82
|
+
def test_config_file_as_dir_raises(self, temp_home: Path) -> None:
|
|
83
|
+
"""Test that having config.json as directory raises error."""
|
|
84
|
+
# Create config directory
|
|
85
|
+
config_dir = temp_home / ".claude-dev-cli"
|
|
86
|
+
config_dir.mkdir(parents=True, exist_ok=True)
|
|
87
|
+
|
|
88
|
+
# Create config.json as a directory
|
|
89
|
+
config_file = config_dir / "config.json"
|
|
90
|
+
config_file.mkdir()
|
|
91
|
+
|
|
92
|
+
with pytest.raises(RuntimeError, match="is a directory"):
|
|
93
|
+
Config()
|
|
94
|
+
|
|
95
|
+
def test_usage_log_as_dir_raises(self, temp_home: Path) -> None:
|
|
96
|
+
"""Test that having usage.jsonl as directory raises error."""
|
|
97
|
+
# Create config directory
|
|
98
|
+
config_dir = temp_home / ".claude-dev-cli"
|
|
99
|
+
config_dir.mkdir(parents=True, exist_ok=True)
|
|
100
|
+
|
|
101
|
+
# Create usage.jsonl as a directory
|
|
102
|
+
usage_log = config_dir / "usage.jsonl"
|
|
103
|
+
usage_log.mkdir()
|
|
104
|
+
|
|
105
|
+
with pytest.raises(RuntimeError, match="is a directory"):
|
|
106
|
+
Config()
|
|
107
|
+
|
|
73
108
|
def test_init_creates_default_config(self, temp_home: Path) -> None:
|
|
74
109
|
"""Test that Config.__init__ creates default config file."""
|
|
75
110
|
config = Config()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/plugins/diff_editor/__init__.py
RENAMED
|
File without changes
|
{claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/plugins/diff_editor/plugin.py
RENAMED
|
File without changes
|
{claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli/plugins/diff_editor/viewer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_dev_cli-0.8.3 → claude_dev_cli-0.8.5}/src/claude_dev_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|