@eugene218/noxdev 1.0.0

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.
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env bash
2
+ # docker-capture-diff.sh — Capture full git diff (staged, unstaged, untracked) from a worktree
3
+ #
4
+ # Usage:
5
+ # docker-capture-diff.sh <worktree_dir> <output_file>
6
+ #
7
+ # Arguments:
8
+ # $1 worktree_dir Path to the git worktree
9
+ # $2 output_file Path to write the combined diff output
10
+ #
11
+ # Output format:
12
+ # - Unstaged changes (git diff HEAD)
13
+ # - "---STAGED---" separator
14
+ # - Staged changes (git diff --cached)
15
+ # - "---UNTRACKED---" separator
16
+ # - Contents of each untracked file prefixed with "=== <filename> ==="
17
+ #
18
+ # Exits 0 even if there are no changes (empty diff is valid).
19
+
20
+ set -euo pipefail
21
+
22
+ if [ "$#" -ne 2 ]; then
23
+ echo "Error: expected 2 arguments, got $#" >&2
24
+ echo "Usage: docker-capture-diff.sh <worktree_dir> <output_file>" >&2
25
+ exit 1
26
+ fi
27
+
28
+ worktree_dir="$1"
29
+ output_file="$2"
30
+
31
+ cd "$worktree_dir"
32
+
33
+ # Stage untracked files as intent-to-add so they appear in git diff
34
+ git add -N . 2>/dev/null || true
35
+
36
+ {
37
+ git diff HEAD || true
38
+ echo "---STAGED---"
39
+ git diff --cached || true
40
+ echo "---UNTRACKED---"
41
+ git ls-files --others --exclude-standard | while IFS= read -r f; do
42
+ echo "=== $f ==="
43
+ cat "$f" 2>/dev/null || true
44
+ done
45
+ } > "$output_file"
46
+
47
+ # Unstage intent-to-add files to restore working directory state
48
+ git reset HEAD . 2>/dev/null || true
49
+
50
+ exit 0
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env bash
2
+ # docker-run-api.sh — Run Claude Code in Docker using API key authentication
3
+ #
4
+ # Usage:
5
+ # docker-run-api.sh <prompt_file> <task_log> <timeout_seconds> <worktree_dir> \
6
+ # <project_git_dir> <git_target_path> <memory_limit> <cpu_limit> <docker_image> <api_key>
7
+ #
8
+ # Arguments:
9
+ # $1 prompt_file Path to the prompt markdown file
10
+ # $2 task_log Path to write task output log
11
+ # $3 timeout_seconds Max execution time in seconds
12
+ # $4 worktree_dir Path to the git worktree to mount as /workspace
13
+ # $5 project_git_dir Path to the project .git directory (unused, reserved)
14
+ # $6 git_target_path Target path for git operations (unused, reserved)
15
+ # $7 memory_limit Docker memory limit (e.g., 2g)
16
+ # $8 cpu_limit Docker CPU limit (e.g., 2)
17
+ # $9 docker_image Docker image to use
18
+ # $10 api_key Anthropic API key
19
+
20
+ set -euo pipefail
21
+
22
+ # Credential restore - restore from snapshot if it exists
23
+ CRED_SNAPSHOT="$HOME/.noxdev/.claude-snapshot.json"
24
+ if [ -f "$CRED_SNAPSHOT" ]; then
25
+ cp "$CRED_SNAPSHOT" "$HOME/.claude.json"
26
+ fi
27
+
28
+ if [ "$#" -ne 10 ]; then
29
+ echo "Error: expected 10 arguments, got $#" >&2
30
+ echo "Usage: docker-run-api.sh <prompt_file> <task_log> <timeout_seconds> <worktree_dir> <project_git_dir> <git_target_path> <memory_limit> <cpu_limit> <docker_image> <api_key>" >&2
31
+ exit 1
32
+ fi
33
+
34
+ prompt_file="$1"
35
+ task_log="$2"
36
+ timeout_seconds="$3"
37
+ worktree_dir="$4"
38
+ project_git_dir="$5"
39
+ git_target_path="$6"
40
+ memory_limit="$7"
41
+ cpu_limit="$8"
42
+ docker_image="$9"
43
+ api_key="${10}"
44
+
45
+ HOST_UID=$(id -u)
46
+ HOST_GID=$(id -g)
47
+
48
+ timeout "$timeout_seconds" docker run --rm \
49
+ --memory="$memory_limit" \
50
+ --cpus="$cpu_limit" \
51
+ -v "$worktree_dir":/workspace \
52
+ -v "$project_git_dir":"$git_target_path" \
53
+ -v "$prompt_file":/tmp/task-prompt.txt:ro \
54
+ -e ANTHROPIC_API_KEY="$api_key" \
55
+ -e HOME=/tmp \
56
+ --user "$HOST_UID":"$HOST_GID" \
57
+ "$docker_image" \
58
+ bash -c 'git config user.name "noxdev" && git config user.email "noxdev@local" && claude -p "$(cat /tmp/task-prompt.txt)" --dangerously-skip-permissions --model claude-sonnet-4-20250514 --effort high' \
59
+ > "$task_log" 2>&1
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env bash
2
+ # docker-run-max.sh — Run Claude Code in Docker using Max subscription (~/.claude.json)
3
+ #
4
+ # Usage:
5
+ # docker-run-max.sh <prompt_file> <task_log> <timeout_seconds> <worktree_dir> \
6
+ # <project_git_dir> <git_target_path> <memory_limit> <cpu_limit> <docker_image>
7
+ #
8
+ # Arguments:
9
+ # $1 prompt_file Path to the prompt markdown file
10
+ # $2 task_log Path to write task output log
11
+ # $3 timeout_seconds Max execution time in seconds
12
+ # $4 worktree_dir Path to the git worktree to mount as /workspace
13
+ # $5 project_git_dir Path to the project .git directory (unused, reserved)
14
+ # $6 git_target_path Target path for git operations (unused, reserved)
15
+ # $7 memory_limit Docker memory limit (e.g., 2g)
16
+ # $8 cpu_limit Docker CPU limit (e.g., 2)
17
+ # $9 docker_image Docker image to use
18
+
19
+ set -euo pipefail
20
+
21
+ # Credential restore - restore from snapshot if it exists
22
+ CRED_SNAPSHOT="$HOME/.noxdev/.claude-snapshot.json"
23
+ if [ -f "$CRED_SNAPSHOT" ]; then
24
+ cp "$CRED_SNAPSHOT" "$HOME/.claude.json"
25
+ fi
26
+
27
+ if [ "$#" -ne 9 ]; then
28
+ echo "Error: expected 9 arguments, got $#" >&2
29
+ echo "Usage: docker-run-max.sh <prompt_file> <task_log> <timeout_seconds> <worktree_dir> <project_git_dir> <git_target_path> <memory_limit> <cpu_limit> <docker_image>" >&2
30
+ exit 1
31
+ fi
32
+
33
+ prompt_file="$1"
34
+ task_log="$2"
35
+ timeout_seconds="$3"
36
+ worktree_dir="$4"
37
+ project_git_dir="$5" # reserved
38
+ git_target_path="$6" # reserved
39
+ memory_limit="$7"
40
+ cpu_limit="$8"
41
+ docker_image="$9"
42
+
43
+ HOST_UID=$(id -u)
44
+ HOST_GID=$(id -g)
45
+
46
+ timeout "$timeout_seconds" docker run --rm \
47
+ --memory="$memory_limit" \
48
+ --cpus="$cpu_limit" \
49
+ -v "$worktree_dir":/workspace \
50
+ -v "$project_git_dir":"$git_target_path" \
51
+ -v ~/.claude:/tmp/.claude \
52
+ -e HOME=/tmp \
53
+ --user "$HOST_UID":"$HOST_GID" \
54
+ -v "$prompt_file":/tmp/task-prompt.txt:ro \
55
+ "$docker_image" \
56
+ bash -c 'git config user.name "noxdev" && git config user.email "noxdev@local" && claude -p "$(cat /tmp/task-prompt.txt)" --dangerously-skip-permissions --model claude-sonnet-4-20250514 --effort high' \
57
+ > "$task_log" 2>&1
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@eugene218/noxdev",
3
+ "version": "1.0.0",
4
+ "description": "Autonomous overnight coding agent orchestrator — ship code while you sleep",
5
+ "keywords": [
6
+ "cli",
7
+ "ai",
8
+ "coding-agent",
9
+ "docker",
10
+ "autonomous",
11
+ "claude",
12
+ "devtools"
13
+ ],
14
+ "author": "Eugene Orlov",
15
+ "license": "MIT",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/eugeneorlov/noxdev"
19
+ },
20
+ "homepage": "https://github.com/eugeneorlov/noxdev",
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
24
+ "files": [
25
+ "dist/",
26
+ "scripts/",
27
+ "README.md",
28
+ "LICENSE"
29
+ ],
30
+ "type": "module",
31
+ "bin": {
32
+ "noxdev": "./dist/index.js"
33
+ },
34
+ "scripts": {
35
+ "build": "tsup",
36
+ "postbuild": "rm -rf dist/scripts && cp -r scripts dist/scripts && rm -rf dist/dashboard && cp -r ../dashboard/dist dist/dashboard",
37
+ "lint": "tsc --noEmit",
38
+ "test": "vitest run"
39
+ },
40
+ "dependencies": {
41
+ "better-sqlite3": "^11.8.1",
42
+ "chalk": "^5.4.1",
43
+ "commander": "^13.1.0",
44
+ "cors": "^2.8.6",
45
+ "express": "^4.21.2",
46
+ "ora": "^8.2.0"
47
+ },
48
+ "devDependencies": {
49
+ "@noxdev/dashboard": "workspace:*",
50
+ "@types/better-sqlite3": "^7.6.13",
51
+ "@types/cors": "^2.8.19",
52
+ "@types/express": "^5.0.3",
53
+ "@types/node": "^22.13.10",
54
+ "tsup": "^8.4.0",
55
+ "typescript": "^5.7.3",
56
+ "vitest": "^3.0.9"
57
+ }
58
+ }
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env bash
2
+ # docker-capture-diff.sh — Capture full git diff (staged, unstaged, untracked) from a worktree
3
+ #
4
+ # Usage:
5
+ # docker-capture-diff.sh <worktree_dir> <output_file>
6
+ #
7
+ # Arguments:
8
+ # $1 worktree_dir Path to the git worktree
9
+ # $2 output_file Path to write the combined diff output
10
+ #
11
+ # Output format:
12
+ # - Unstaged changes (git diff HEAD)
13
+ # - "---STAGED---" separator
14
+ # - Staged changes (git diff --cached)
15
+ # - "---UNTRACKED---" separator
16
+ # - Contents of each untracked file prefixed with "=== <filename> ==="
17
+ #
18
+ # Exits 0 even if there are no changes (empty diff is valid).
19
+
20
+ set -euo pipefail
21
+
22
+ if [ "$#" -ne 2 ]; then
23
+ echo "Error: expected 2 arguments, got $#" >&2
24
+ echo "Usage: docker-capture-diff.sh <worktree_dir> <output_file>" >&2
25
+ exit 1
26
+ fi
27
+
28
+ worktree_dir="$1"
29
+ output_file="$2"
30
+
31
+ cd "$worktree_dir"
32
+
33
+ # Stage untracked files as intent-to-add so they appear in git diff
34
+ git add -N . 2>/dev/null || true
35
+
36
+ {
37
+ git diff HEAD || true
38
+ echo "---STAGED---"
39
+ git diff --cached || true
40
+ echo "---UNTRACKED---"
41
+ git ls-files --others --exclude-standard | while IFS= read -r f; do
42
+ echo "=== $f ==="
43
+ cat "$f" 2>/dev/null || true
44
+ done
45
+ } > "$output_file"
46
+
47
+ # Unstage intent-to-add files to restore working directory state
48
+ git reset HEAD . 2>/dev/null || true
49
+
50
+ exit 0
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env bash
2
+ # docker-run-api.sh — Run Claude Code in Docker using API key authentication
3
+ #
4
+ # Usage:
5
+ # docker-run-api.sh <prompt_file> <task_log> <timeout_seconds> <worktree_dir> \
6
+ # <project_git_dir> <git_target_path> <memory_limit> <cpu_limit> <docker_image> <api_key>
7
+ #
8
+ # Arguments:
9
+ # $1 prompt_file Path to the prompt markdown file
10
+ # $2 task_log Path to write task output log
11
+ # $3 timeout_seconds Max execution time in seconds
12
+ # $4 worktree_dir Path to the git worktree to mount as /workspace
13
+ # $5 project_git_dir Path to the project .git directory (unused, reserved)
14
+ # $6 git_target_path Target path for git operations (unused, reserved)
15
+ # $7 memory_limit Docker memory limit (e.g., 2g)
16
+ # $8 cpu_limit Docker CPU limit (e.g., 2)
17
+ # $9 docker_image Docker image to use
18
+ # $10 api_key Anthropic API key
19
+
20
+ set -euo pipefail
21
+
22
+ # Credential restore - restore from snapshot if it exists
23
+ CRED_SNAPSHOT="$HOME/.noxdev/.claude-snapshot.json"
24
+ if [ -f "$CRED_SNAPSHOT" ]; then
25
+ cp "$CRED_SNAPSHOT" "$HOME/.claude.json"
26
+ fi
27
+
28
+ if [ "$#" -ne 10 ]; then
29
+ echo "Error: expected 10 arguments, got $#" >&2
30
+ echo "Usage: docker-run-api.sh <prompt_file> <task_log> <timeout_seconds> <worktree_dir> <project_git_dir> <git_target_path> <memory_limit> <cpu_limit> <docker_image> <api_key>" >&2
31
+ exit 1
32
+ fi
33
+
34
+ prompt_file="$1"
35
+ task_log="$2"
36
+ timeout_seconds="$3"
37
+ worktree_dir="$4"
38
+ project_git_dir="$5"
39
+ git_target_path="$6"
40
+ memory_limit="$7"
41
+ cpu_limit="$8"
42
+ docker_image="$9"
43
+ api_key="${10}"
44
+
45
+ HOST_UID=$(id -u)
46
+ HOST_GID=$(id -g)
47
+
48
+ timeout "$timeout_seconds" docker run --rm \
49
+ --memory="$memory_limit" \
50
+ --cpus="$cpu_limit" \
51
+ -v "$worktree_dir":/workspace \
52
+ -v "$project_git_dir":"$git_target_path" \
53
+ -v "$prompt_file":/tmp/task-prompt.txt:ro \
54
+ -e ANTHROPIC_API_KEY="$api_key" \
55
+ -e HOME=/tmp \
56
+ --user "$HOST_UID":"$HOST_GID" \
57
+ "$docker_image" \
58
+ bash -c 'git config user.name "noxdev" && git config user.email "noxdev@local" && claude -p "$(cat /tmp/task-prompt.txt)" --dangerously-skip-permissions --model claude-sonnet-4-20250514 --effort high' \
59
+ > "$task_log" 2>&1
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env bash
2
+ # docker-run-max.sh — Run Claude Code in Docker using Max subscription (~/.claude.json)
3
+ #
4
+ # Usage:
5
+ # docker-run-max.sh <prompt_file> <task_log> <timeout_seconds> <worktree_dir> \
6
+ # <project_git_dir> <git_target_path> <memory_limit> <cpu_limit> <docker_image>
7
+ #
8
+ # Arguments:
9
+ # $1 prompt_file Path to the prompt markdown file
10
+ # $2 task_log Path to write task output log
11
+ # $3 timeout_seconds Max execution time in seconds
12
+ # $4 worktree_dir Path to the git worktree to mount as /workspace
13
+ # $5 project_git_dir Path to the project .git directory (unused, reserved)
14
+ # $6 git_target_path Target path for git operations (unused, reserved)
15
+ # $7 memory_limit Docker memory limit (e.g., 2g)
16
+ # $8 cpu_limit Docker CPU limit (e.g., 2)
17
+ # $9 docker_image Docker image to use
18
+
19
+ set -euo pipefail
20
+
21
+ # Credential restore - restore from snapshot if it exists
22
+ CRED_SNAPSHOT="$HOME/.noxdev/.claude-snapshot.json"
23
+ if [ -f "$CRED_SNAPSHOT" ]; then
24
+ cp "$CRED_SNAPSHOT" "$HOME/.claude.json"
25
+ fi
26
+
27
+ if [ "$#" -ne 9 ]; then
28
+ echo "Error: expected 9 arguments, got $#" >&2
29
+ echo "Usage: docker-run-max.sh <prompt_file> <task_log> <timeout_seconds> <worktree_dir> <project_git_dir> <git_target_path> <memory_limit> <cpu_limit> <docker_image>" >&2
30
+ exit 1
31
+ fi
32
+
33
+ prompt_file="$1"
34
+ task_log="$2"
35
+ timeout_seconds="$3"
36
+ worktree_dir="$4"
37
+ project_git_dir="$5" # reserved
38
+ git_target_path="$6" # reserved
39
+ memory_limit="$7"
40
+ cpu_limit="$8"
41
+ docker_image="$9"
42
+
43
+ HOST_UID=$(id -u)
44
+ HOST_GID=$(id -g)
45
+
46
+ timeout "$timeout_seconds" docker run --rm \
47
+ --memory="$memory_limit" \
48
+ --cpus="$cpu_limit" \
49
+ -v "$worktree_dir":/workspace \
50
+ -v "$project_git_dir":"$git_target_path" \
51
+ -v ~/.claude:/tmp/.claude \
52
+ -e HOME=/tmp \
53
+ --user "$HOST_UID":"$HOST_GID" \
54
+ -v "$prompt_file":/tmp/task-prompt.txt:ro \
55
+ "$docker_image" \
56
+ bash -c 'git config user.name "noxdev" && git config user.email "noxdev@local" && claude -p "$(cat /tmp/task-prompt.txt)" --dangerously-skip-permissions --model claude-sonnet-4-20250514 --effort high' \
57
+ > "$task_log" 2>&1