juno-code 1.0.22 → 1.0.24
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.
- package/dist/bin/cli.js +71 -2
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +71 -2
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/templates/scripts/kanban.sh +17 -5
- package/dist/templates/services/__pycache__/claude.cpython-38.pyc +0 -0
- package/dist/templates/services/claude.py +38 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
set -euo pipefail # Exit on error, undefined variable, or pipe failure
|
|
17
17
|
|
|
18
|
-
# DEBUG OUTPUT: Show that kanban.sh is being executed
|
|
19
|
-
|
|
18
|
+
# DEBUG OUTPUT: Show that kanban.sh is being executed (only if JUNO_VERBOSE=true)
|
|
19
|
+
if [ "${JUNO_VERBOSE:-false}" = "true" ]; then
|
|
20
|
+
echo "[DEBUG] kanban.sh is being executed from: $(pwd)" >&2
|
|
21
|
+
fi
|
|
20
22
|
|
|
21
23
|
# Color output for better readability
|
|
22
24
|
RED='\033[0;31m'
|
|
@@ -32,18 +34,28 @@ INSTALL_SCRIPT="${SCRIPTS_DIR}/install_requirements.sh"
|
|
|
32
34
|
|
|
33
35
|
# Logging functions
|
|
34
36
|
log_info() {
|
|
35
|
-
|
|
37
|
+
# Only print if JUNO_VERBOSE is set to true
|
|
38
|
+
if [ "${JUNO_VERBOSE:-false}" = "true" ]; then
|
|
39
|
+
echo -e "${BLUE}[KANBAN]${NC} $1"
|
|
40
|
+
fi
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
log_success() {
|
|
39
|
-
|
|
44
|
+
# Only print if JUNO_VERBOSE is set to true
|
|
45
|
+
if [ "${JUNO_VERBOSE:-false}" = "true" ]; then
|
|
46
|
+
echo -e "${GREEN}[KANBAN]${NC} $1"
|
|
47
|
+
fi
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
log_warning() {
|
|
43
|
-
|
|
51
|
+
# Only print if JUNO_VERBOSE is set to true
|
|
52
|
+
if [ "${JUNO_VERBOSE:-false}" = "true" ]; then
|
|
53
|
+
echo -e "${YELLOW}[KANBAN]${NC} $1"
|
|
54
|
+
fi
|
|
44
55
|
}
|
|
45
56
|
|
|
46
57
|
log_error() {
|
|
58
|
+
# Always print errors regardless of JUNO_VERBOSE
|
|
47
59
|
echo -e "${RED}[KANBAN]${NC} $1"
|
|
48
60
|
}
|
|
49
61
|
|
|
Binary file
|
|
@@ -19,10 +19,12 @@ class ClaudeService:
|
|
|
19
19
|
|
|
20
20
|
# Default configuration
|
|
21
21
|
DEFAULT_MODEL = "claude-sonnet-4-5-20250929"
|
|
22
|
+
DEFAULT_PERMISSION_MODE = "default"
|
|
22
23
|
DEFAULT_AUTO_INSTRUCTION = """You are Claude Code, an AI coding assistant. Follow the instructions provided and generate high-quality code."""
|
|
23
24
|
|
|
24
25
|
def __init__(self):
|
|
25
26
|
self.model_name = self.DEFAULT_MODEL
|
|
27
|
+
self.permission_mode = self.DEFAULT_PERMISSION_MODE
|
|
26
28
|
self.auto_instruction = self.DEFAULT_AUTO_INSTRUCTION
|
|
27
29
|
self.project_path = os.getcwd()
|
|
28
30
|
self.prompt = ""
|
|
@@ -53,6 +55,14 @@ Examples:
|
|
|
53
55
|
%(prog)s -p "Write a hello world function"
|
|
54
56
|
%(prog)s -pp prompt.txt --cd /path/to/project
|
|
55
57
|
%(prog)s -p "Add tests" -m claude-opus-4-20250514 --tool "Bash Edit"
|
|
58
|
+
|
|
59
|
+
Environment Variables:
|
|
60
|
+
CLAUDE_PROJECT_PATH Project path (default: current directory)
|
|
61
|
+
CLAUDE_MODEL Model name (default: claude-sonnet-4-5-20250929)
|
|
62
|
+
CLAUDE_AUTO_INSTRUCTION Auto instruction to prepend to prompt
|
|
63
|
+
CLAUDE_PERMISSION_MODE Permission mode (default: default)
|
|
64
|
+
CLAUDE_PRETTY Pretty print JSON output (default: true)
|
|
65
|
+
CLAUDE_VERBOSE Enable verbose output (default: false)
|
|
56
66
|
"""
|
|
57
67
|
)
|
|
58
68
|
|
|
@@ -72,22 +82,22 @@ Examples:
|
|
|
72
82
|
parser.add_argument(
|
|
73
83
|
"--cd",
|
|
74
84
|
type=str,
|
|
75
|
-
default=os.getcwd(),
|
|
76
|
-
help="Project path (absolute path). Default: current directory"
|
|
85
|
+
default=os.environ.get("CLAUDE_PROJECT_PATH", os.getcwd()),
|
|
86
|
+
help="Project path (absolute path). Default: current directory (env: CLAUDE_PROJECT_PATH)"
|
|
77
87
|
)
|
|
78
88
|
|
|
79
89
|
parser.add_argument(
|
|
80
90
|
"-m", "--model",
|
|
81
91
|
type=str,
|
|
82
|
-
default=self.DEFAULT_MODEL,
|
|
83
|
-
help=f"Model name (e.g. 'sonnet', 'opus', or full name). Default: {self.DEFAULT_MODEL}"
|
|
92
|
+
default=os.environ.get("CLAUDE_MODEL", self.DEFAULT_MODEL),
|
|
93
|
+
help=f"Model name (e.g. 'sonnet', 'opus', or full name). Default: {self.DEFAULT_MODEL} (env: CLAUDE_MODEL)"
|
|
84
94
|
)
|
|
85
95
|
|
|
86
96
|
parser.add_argument(
|
|
87
97
|
"--auto-instruction",
|
|
88
98
|
type=str,
|
|
89
|
-
default=self.DEFAULT_AUTO_INSTRUCTION,
|
|
90
|
-
help="Auto instruction to prepend to prompt"
|
|
99
|
+
default=os.environ.get("CLAUDE_AUTO_INSTRUCTION", self.DEFAULT_AUTO_INSTRUCTION),
|
|
100
|
+
help="Auto instruction to prepend to prompt (env: CLAUDE_AUTO_INSTRUCTION)"
|
|
91
101
|
)
|
|
92
102
|
|
|
93
103
|
parser.add_argument(
|
|
@@ -100,9 +110,9 @@ Examples:
|
|
|
100
110
|
parser.add_argument(
|
|
101
111
|
"--permission-mode",
|
|
102
112
|
type=str,
|
|
103
|
-
choices=["acceptEdits", "bypassPermissions", "default", "plan"],
|
|
104
|
-
default="
|
|
105
|
-
help="Permission mode for the session. Default:
|
|
113
|
+
choices=["acceptEdits", "bypassPermissions", "default", "plan", "skip"],
|
|
114
|
+
default=os.environ.get("CLAUDE_PERMISSION_MODE", self.DEFAULT_PERMISSION_MODE),
|
|
115
|
+
help=f"Permission mode for the session. Default: {self.DEFAULT_PERMISSION_MODE} (env: CLAUDE_PERMISSION_MODE)"
|
|
106
116
|
)
|
|
107
117
|
|
|
108
118
|
parser.add_argument(
|
|
@@ -123,7 +133,8 @@ Examples:
|
|
|
123
133
|
parser.add_argument(
|
|
124
134
|
"--verbose",
|
|
125
135
|
action="store_true",
|
|
126
|
-
|
|
136
|
+
default=os.environ.get("CLAUDE_VERBOSE", "false").lower() == "true",
|
|
137
|
+
help="Enable verbose output (env: CLAUDE_VERBOSE)"
|
|
127
138
|
)
|
|
128
139
|
|
|
129
140
|
parser.add_argument(
|
|
@@ -249,7 +260,16 @@ Examples:
|
|
|
249
260
|
if tool_use_data:
|
|
250
261
|
simplified["tool_use"] = tool_use_data
|
|
251
262
|
else:
|
|
252
|
-
|
|
263
|
+
# For multi-line content, render it in a readable format
|
|
264
|
+
# Check if content contains newline characters
|
|
265
|
+
if text_content and '\n' in text_content:
|
|
266
|
+
# Split into lines and create a readable multi-line representation
|
|
267
|
+
simplified["content"] = text_content
|
|
268
|
+
# Return a custom formatted output for multi-line content
|
|
269
|
+
# that preserves the structure but makes it readable
|
|
270
|
+
return json.dumps(simplified, indent=2, ensure_ascii=False)
|
|
271
|
+
else:
|
|
272
|
+
simplified["content"] = text_content
|
|
253
273
|
|
|
254
274
|
return json.dumps(simplified)
|
|
255
275
|
else:
|
|
@@ -347,6 +367,13 @@ Examples:
|
|
|
347
367
|
file=sys.stderr
|
|
348
368
|
)
|
|
349
369
|
print("\nRun 'claude.py --help' for usage information.", file=sys.stderr)
|
|
370
|
+
print("\nAvailable Environment Variables:", file=sys.stderr)
|
|
371
|
+
print(" CLAUDE_PROJECT_PATH Project path (default: current directory)", file=sys.stderr)
|
|
372
|
+
print(" CLAUDE_MODEL Model name (default: claude-sonnet-4-5-20250929)", file=sys.stderr)
|
|
373
|
+
print(" CLAUDE_AUTO_INSTRUCTION Auto instruction to prepend to prompt", file=sys.stderr)
|
|
374
|
+
print(" CLAUDE_PERMISSION_MODE Permission mode (default: default)", file=sys.stderr)
|
|
375
|
+
print(" CLAUDE_PRETTY Pretty print JSON output (default: true)", file=sys.stderr)
|
|
376
|
+
print(" CLAUDE_VERBOSE Enable verbose output (default: false)", file=sys.stderr)
|
|
350
377
|
return 1
|
|
351
378
|
|
|
352
379
|
# Check if claude is installed
|