nexus-dev 3.2.0__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.
Files changed (95) hide show
  1. nexus_dev-3.2.0/.agent/workflows/finish.md +91 -0
  2. nexus_dev-3.2.0/.agent/workflows/index-code.md +46 -0
  3. nexus_dev-3.2.0/.agent/workflows/record-lesson.md +44 -0
  4. nexus_dev-3.2.0/.agent/workflows/search-first.md +49 -0
  5. nexus_dev-3.2.0/.agent/workflows/start-session.md +30 -0
  6. nexus_dev-3.2.0/.github/workflows/ci.yml +122 -0
  7. nexus_dev-3.2.0/.github/workflows/create-release.yml +114 -0
  8. nexus_dev-3.2.0/.github/workflows/release.yml +77 -0
  9. nexus_dev-3.2.0/.gitignore +85 -0
  10. nexus_dev-3.2.0/.nexus/implementations/.gitkeep +0 -0
  11. nexus_dev-3.2.0/.nexus/implementations/impl_aca4162d.md +34 -0
  12. nexus_dev-3.2.0/.nexus/insights/.gitkeep +0 -0
  13. nexus_dev-3.2.0/.nexus/insights/discovery_87608335.md +15 -0
  14. nexus_dev-3.2.0/.nexus/lessons/.gitkeep +0 -0
  15. nexus_dev-3.2.0/.python-version +1 -0
  16. nexus_dev-3.2.0/AGENTS.md +296 -0
  17. nexus_dev-3.2.0/CONTRIBUTING.md +140 -0
  18. nexus_dev-3.2.0/Dockerfile +40 -0
  19. nexus_dev-3.2.0/LICENSE +21 -0
  20. nexus_dev-3.2.0/Makefile +226 -0
  21. nexus_dev-3.2.0/PKG-INFO +636 -0
  22. nexus_dev-3.2.0/README.md +585 -0
  23. nexus_dev-3.2.0/agents/nexus_architect.yaml +35 -0
  24. nexus_dev-3.2.0/agents/nexus_doc_writer.yaml +33 -0
  25. nexus_dev-3.2.0/docker-compose.yml +19 -0
  26. nexus_dev-3.2.0/docs/AGENTS_TEMPLATE.md +229 -0
  27. nexus_dev-3.2.0/docs/adding-mcp-servers.md +155 -0
  28. nexus_dev-3.2.0/docs/configuring-agents.md +82 -0
  29. nexus_dev-3.2.0/docs/docker-deployment.md +79 -0
  30. nexus_dev-3.2.0/docs/github-import.md +89 -0
  31. nexus_dev-3.2.0/docs/model-reference.md +190 -0
  32. nexus_dev-3.2.0/docs/quick-start.md +226 -0
  33. nexus_dev-3.2.0/nexus_dev_demo.md +33 -0
  34. nexus_dev-3.2.0/pyproject.toml +136 -0
  35. nexus_dev-3.2.0/scripts/benchmark_gateway_tools.py +760 -0
  36. nexus_dev-3.2.0/scripts/benchmark_rag_efficiency.py +580 -0
  37. nexus_dev-3.2.0/src/nexus_dev/__init__.py +4 -0
  38. nexus_dev-3.2.0/src/nexus_dev/agent_templates/__init__.py +26 -0
  39. nexus_dev-3.2.0/src/nexus_dev/agent_templates/api_designer.yaml +26 -0
  40. nexus_dev-3.2.0/src/nexus_dev/agent_templates/code_reviewer.yaml +26 -0
  41. nexus_dev-3.2.0/src/nexus_dev/agent_templates/debug_detective.yaml +26 -0
  42. nexus_dev-3.2.0/src/nexus_dev/agent_templates/doc_writer.yaml +26 -0
  43. nexus_dev-3.2.0/src/nexus_dev/agent_templates/performance_optimizer.yaml +26 -0
  44. nexus_dev-3.2.0/src/nexus_dev/agent_templates/refactor_architect.yaml +26 -0
  45. nexus_dev-3.2.0/src/nexus_dev/agent_templates/security_auditor.yaml +26 -0
  46. nexus_dev-3.2.0/src/nexus_dev/agent_templates/test_engineer.yaml +26 -0
  47. nexus_dev-3.2.0/src/nexus_dev/agents/__init__.py +20 -0
  48. nexus_dev-3.2.0/src/nexus_dev/agents/agent_config.py +97 -0
  49. nexus_dev-3.2.0/src/nexus_dev/agents/agent_executor.py +197 -0
  50. nexus_dev-3.2.0/src/nexus_dev/agents/agent_manager.py +104 -0
  51. nexus_dev-3.2.0/src/nexus_dev/agents/prompt_factory.py +91 -0
  52. nexus_dev-3.2.0/src/nexus_dev/chunkers/__init__.py +168 -0
  53. nexus_dev-3.2.0/src/nexus_dev/chunkers/base.py +202 -0
  54. nexus_dev-3.2.0/src/nexus_dev/chunkers/docs_chunker.py +291 -0
  55. nexus_dev-3.2.0/src/nexus_dev/chunkers/java_chunker.py +343 -0
  56. nexus_dev-3.2.0/src/nexus_dev/chunkers/javascript_chunker.py +312 -0
  57. nexus_dev-3.2.0/src/nexus_dev/chunkers/python_chunker.py +308 -0
  58. nexus_dev-3.2.0/src/nexus_dev/cli.py +1673 -0
  59. nexus_dev-3.2.0/src/nexus_dev/config.py +253 -0
  60. nexus_dev-3.2.0/src/nexus_dev/database.py +558 -0
  61. nexus_dev-3.2.0/src/nexus_dev/embeddings.py +585 -0
  62. nexus_dev-3.2.0/src/nexus_dev/gateway/__init__.py +10 -0
  63. nexus_dev-3.2.0/src/nexus_dev/gateway/connection_manager.py +348 -0
  64. nexus_dev-3.2.0/src/nexus_dev/github_importer.py +247 -0
  65. nexus_dev-3.2.0/src/nexus_dev/mcp_client.py +281 -0
  66. nexus_dev-3.2.0/src/nexus_dev/mcp_config.py +184 -0
  67. nexus_dev-3.2.0/src/nexus_dev/schemas/mcp_config_schema.json +166 -0
  68. nexus_dev-3.2.0/src/nexus_dev/server.py +1866 -0
  69. nexus_dev-3.2.0/src/nexus_dev/templates/pre-commit-hook +33 -0
  70. nexus_dev-3.2.0/tests/__init__.py +1 -0
  71. nexus_dev-3.2.0/tests/benchmark_cases.json +49 -0
  72. nexus_dev-3.2.0/tests/chunkers/__init__.py +1 -0
  73. nexus_dev-3.2.0/tests/chunkers/test_base.py +117 -0
  74. nexus_dev-3.2.0/tests/chunkers/test_docs_chunker.py +106 -0
  75. nexus_dev-3.2.0/tests/chunkers/test_java_chunker.py +99 -0
  76. nexus_dev-3.2.0/tests/chunkers/test_javascript_chunker.py +120 -0
  77. nexus_dev-3.2.0/tests/chunkers/test_python_chunker.py +129 -0
  78. nexus_dev-3.2.0/tests/chunkers/test_registry.py +91 -0
  79. nexus_dev-3.2.0/tests/conftest.py +261 -0
  80. nexus_dev-3.2.0/tests/unit/__init__.py +1 -0
  81. nexus_dev-3.2.0/tests/unit/test_agents.py +202 -0
  82. nexus_dev-3.2.0/tests/unit/test_cli.py +1854 -0
  83. nexus_dev-3.2.0/tests/unit/test_config.py +146 -0
  84. nexus_dev-3.2.0/tests/unit/test_connection_manager.py +517 -0
  85. nexus_dev-3.2.0/tests/unit/test_database.py +402 -0
  86. nexus_dev-3.2.0/tests/unit/test_database_operations.py +518 -0
  87. nexus_dev-3.2.0/tests/unit/test_dynamic_agents.py +190 -0
  88. nexus_dev-3.2.0/tests/unit/test_embeddings.py +324 -0
  89. nexus_dev-3.2.0/tests/unit/test_embeddings_providers.py +168 -0
  90. nexus_dev-3.2.0/tests/unit/test_mcp_client.py +384 -0
  91. nexus_dev-3.2.0/tests/unit/test_mcp_config.py +523 -0
  92. nexus_dev-3.2.0/tests/unit/test_mcp_http_transport.py +120 -0
  93. nexus_dev-3.2.0/tests/unit/test_security.py +203 -0
  94. nexus_dev-3.2.0/tests/unit/test_server.py +1687 -0
  95. nexus_dev-3.2.0/uv.lock +2599 -0
@@ -0,0 +1,91 @@
1
+ ---
2
+ description: Complete a task and record learnings
3
+ ---
4
+
5
+ # Finish Task Workflow
6
+
7
+ Use this workflow after completing an implementation to ensure all knowledge is captured.
8
+
9
+ ## Steps
10
+
11
+ // turbo-all
12
+
13
+ 1. **Review the work done**
14
+ - What feature/fix was implemented?
15
+ - Were there any mistakes or backtracking during development?
16
+ - What were the key design decisions?
17
+
18
+ 2. **Check for uncaptured insights**
19
+ ```
20
+ search_insights("<topic related to this work>")
21
+ ```
22
+
23
+ If you made mistakes or backtracked but didn't record them yet:
24
+ ```
25
+ record_insight(
26
+ category="mistake", # or "backtrack", "discovery", "optimization"
27
+ description="<what happened>",
28
+ reasoning="<your thinking>",
29
+ correction="<how you fixed it>"
30
+ )
31
+ ```
32
+
33
+ 3. **Record the implementation**
34
+ ```
35
+ record_implementation(
36
+ title="<feature/fix title>",
37
+ summary="<what was built>",
38
+ approach="<how it was built>",
39
+ design_decisions=[
40
+ "Chose X over Y because...",
41
+ "Used pattern Z for..."
42
+ ],
43
+ files_changed=["list", "of", "modified", "files"]
44
+ )
45
+ ```
46
+
47
+ 4. **Verify it was saved**
48
+ ```
49
+ search_implementations("<feature name>")
50
+ ```
51
+
52
+ ## When to Use
53
+
54
+ - After completing a user-requested feature
55
+ - After finishing a complex refactor
56
+ - After fixing a significant bug
57
+ - When you want to ensure nothing was missed
58
+
59
+ ## Example
60
+
61
+ After implementing authentication:
62
+
63
+ ```
64
+ # Check if already captured
65
+ search_insights("authentication")
66
+
67
+ # Record any mistakes made
68
+ record_insight(
69
+ category="mistake",
70
+ description="Used bcrypt 4.0 which has breaking API changes",
71
+ reasoning="Assumed latest version would be compatible",
72
+ correction="Downgraded to bcrypt 3.2 based on project dependencies"
73
+ )
74
+
75
+ # Record the implementation
76
+ record_implementation(
77
+ title="Add JWT Authentication",
78
+ summary="Implemented JWT-based authentication with refresh tokens",
79
+ approach="Used PyJWT library with RSA256 signing, Redis for token blacklist",
80
+ design_decisions=[
81
+ "Chose JWT over sessions for stateless API",
82
+ "Used Redis for blacklist due to TTL support and speed",
83
+ "Implemented refresh token rotation for security"
84
+ ],
85
+ files_changed=[
86
+ "src/auth/jwt_handler.py",
87
+ "src/auth/middleware.py",
88
+ "src/api/routes/auth.py"
89
+ ]
90
+ )
91
+ ```
@@ -0,0 +1,46 @@
1
+ ---
2
+ description: Index new files after creating important modules
3
+ ---
4
+
5
+ # Index New Code Workflow
6
+
7
+ Use this workflow after creating new important files to add them to the knowledge base.
8
+
9
+ ## Steps
10
+
11
+ 1. After creating a new file, index it:
12
+ ```
13
+ index_file("<path/to/new/file.py>")
14
+ ```
15
+
16
+ 2. Verify it was indexed:
17
+ ```
18
+ search_code("<main function or class name from new file>")
19
+ ```
20
+
21
+ ## When to Index
22
+
23
+ **DO index:**
24
+ - New modules with reusable functions or classes
25
+ - New API endpoints or handlers
26
+ - Configuration files with important settings
27
+ - Important utility functions
28
+
29
+ **DON'T index (automatically handled by reindex):**
30
+ - Test files
31
+ - Generated files
32
+ - Temporary or scratch files
33
+
34
+ ## Bulk Reindex
35
+
36
+ To reindex the entire project:
37
+ // turbo
38
+ ```bash
39
+ cd /Users/you/Projects/nexus-dev && nexus-reindex --yes
40
+ ```
41
+
42
+ ## When to Use
43
+
44
+ - After creating a new important source file
45
+ - After major refactoring that changes file structure
46
+ - When you notice search results are stale
@@ -0,0 +1,44 @@
1
+ ---
2
+ description: Record a debugging lesson after solving a problem
3
+ ---
4
+
5
+ # Record Lesson Workflow
6
+
7
+ Use this workflow after solving a non-trivial bug or problem to save it for future reference.
8
+
9
+ ## Steps
10
+
11
+ 1. Identify the problem you just solved
12
+ - What error or unexpected behavior occurred?
13
+ - What file(s) were affected?
14
+
15
+ 2. Document the solution:
16
+ ```
17
+ record_lesson(
18
+ problem="<clear description of the problem>",
19
+ solution="<how you fixed it>",
20
+ context="<file path or additional context>"
21
+ )
22
+ ```
23
+
24
+ 3. Verify the lesson was recorded:
25
+ ```
26
+ search_lessons("<keywords from your problem>")
27
+ ```
28
+
29
+ ## Example
30
+
31
+ ```
32
+ record_lesson(
33
+ problem="TypeError: Cannot read property 'id' of undefined when fetching user",
34
+ solution="Added null check before accessing user.id, return early if user is undefined",
35
+ context="src/services/user_service.py line 45"
36
+ )
37
+ ```
38
+
39
+ ## When to Use
40
+
41
+ - After fixing a bug that took more than a few minutes
42
+ - After solving a tricky edge case
43
+ - After debugging a configuration issue
44
+ - After resolving a dependency conflict
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: Search the knowledge base before implementing a feature
3
+ ---
4
+
5
+ # Search Before Implementing Workflow
6
+
7
+ Use this workflow before writing new code to find existing implementations and patterns.
8
+
9
+ ## Steps
10
+
11
+ 1. Search for similar existing code:
12
+ ```
13
+ search_code("<feature or function description>")
14
+ ```
15
+
16
+ 2. Check documentation for guidance:
17
+ ```
18
+ search_docs("<topic or configuration>")
19
+ ```
20
+
21
+ 3. Look for relevant lessons:
22
+ ```
23
+ search_lessons("<potential issues in this area>")
24
+ ```
25
+
26
+ 4. Review results and identify:
27
+ - Existing patterns to follow
28
+ - Potential pitfalls to avoid
29
+ - Related code that might need updates
30
+
31
+ ## Example: Implementing User Authentication
32
+
33
+ ```
34
+ # Find existing auth code
35
+ search_code("authentication login")
36
+
37
+ # Check for auth documentation
38
+ search_docs("authentication setup")
39
+
40
+ # Look for past auth issues
41
+ search_lessons("authentication error")
42
+ ```
43
+
44
+ ## When to Use
45
+
46
+ - Before implementing any new feature
47
+ - Before refactoring existing code
48
+ - When you're unsure how something is currently done
49
+ - When joining a new area of the codebase
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Start a coding session with Nexus-Dev knowledge base
3
+ ---
4
+
5
+ # Start Session Workflow
6
+
7
+ Use this workflow at the beginning of any coding session to load context from the knowledge base.
8
+
9
+ ## Steps
10
+
11
+ 1. Get project context to understand what's indexed:
12
+ ```
13
+ get_project_context()
14
+ ```
15
+
16
+ 2. If working on a specific area, search for relevant code:
17
+ ```
18
+ search_code("<feature or component name>")
19
+ ```
20
+
21
+ 3. Check for any relevant lessons from past debugging:
22
+ ```
23
+ search_lessons("<area you're working on>")
24
+ ```
25
+
26
+ ## When to Use
27
+
28
+ - At the start of any new coding session
29
+ - When switching to a different part of the codebase
30
+ - Before implementing a new feature
@@ -0,0 +1,122 @@
1
+ # Nexus-Dev CI Pipeline
2
+ # =====================
3
+ # Validates code quality, runs tests, and publishes coverage
4
+
5
+ name: CI
6
+
7
+ on:
8
+ push:
9
+ branches: [main, develop]
10
+ pull_request:
11
+ branches: [main]
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ lint:
19
+ name: Code Quality
20
+ runs-on: ubuntu-latest
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Set up Python 3.13
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: '3.13'
29
+
30
+ - name: Cache pip dependencies
31
+ uses: actions/cache@v4
32
+ with:
33
+ path: ~/.cache/pip
34
+ key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
35
+ restore-keys: |
36
+ ${{ runner.os }}-pip-
37
+
38
+ - name: Install dependencies
39
+ run: |
40
+ python -m pip install --upgrade pip
41
+ pip install -e ".[dev]"
42
+
43
+ - name: Run linter (ruff)
44
+ run: ruff check src/ tests/
45
+
46
+ - name: Check formatting (ruff format)
47
+ run: ruff format --check src/ tests/
48
+
49
+ - name: Run type checker (mypy)
50
+ run: mypy src/
51
+
52
+ test:
53
+ name: Tests
54
+ runs-on: ubuntu-latest
55
+ needs: lint
56
+
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+
60
+ - name: Set up Python 3.13
61
+ uses: actions/setup-python@v5
62
+ with:
63
+ python-version: '3.13'
64
+
65
+ - name: Cache pip dependencies
66
+ uses: actions/cache@v4
67
+ with:
68
+ path: ~/.cache/pip
69
+ key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
70
+ restore-keys: |
71
+ ${{ runner.os }}-pip-
72
+
73
+ - name: Install dependencies
74
+ run: |
75
+ python -m pip install --upgrade pip
76
+ pip install -e ".[dev]"
77
+
78
+ - name: Run tests with coverage
79
+ run: |
80
+ pytest tests/ -v \
81
+ --cov=nexus_dev \
82
+ --cov-report=xml \
83
+ --cov-report=term-missing \
84
+ --cov-fail-under=45
85
+
86
+ - name: Upload coverage to Codecov
87
+ uses: codecov/codecov-action@v5
88
+ with:
89
+ token: ${{ secrets.CODECOV_TOKEN }}
90
+ files: ./coverage.xml
91
+ flags: unittests
92
+ name: nexus-dev-coverage
93
+ fail_ci_if_error: false
94
+ verbose: true
95
+
96
+ build:
97
+ name: Build Package
98
+ runs-on: ubuntu-latest
99
+ needs: test
100
+
101
+ steps:
102
+ - uses: actions/checkout@v4
103
+
104
+ - name: Set up Python 3.13
105
+ uses: actions/setup-python@v5
106
+ with:
107
+ python-version: '3.13'
108
+
109
+ - name: Install build dependencies
110
+ run: |
111
+ python -m pip install --upgrade pip
112
+ pip install build
113
+
114
+ - name: Build package
115
+ run: python -m build
116
+
117
+ - name: Upload build artifacts
118
+ uses: actions/upload-artifact@v4
119
+ with:
120
+ name: dist
121
+ path: dist/
122
+ retention-days: 7
@@ -0,0 +1,114 @@
1
+ name: Create Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: 'Version number (e.g., v1.0.0)'
8
+ required: true
9
+ type: string
10
+
11
+ permissions:
12
+ contents: write
13
+ id-token: write
14
+
15
+ jobs:
16
+ prepare_release:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0
23
+ token: ${{ secrets.GITHUB_TOKEN }}
24
+
25
+ - name: Configure Git
26
+ run: |
27
+ git config user.name "github-actions[bot]"
28
+ git config user.email "github-actions[bot]@users.noreply.github.com"
29
+
30
+ - name: Check and Update Version
31
+ id: version_check
32
+ run: |
33
+ VERSION="${{ inputs.version }}"
34
+ # Remove 'v' prefix for pyproject.toml
35
+ VERSION_NO_V="${VERSION#v}"
36
+
37
+ # Get current version from pyproject.toml
38
+ # Assumes version = "x.y.z" format
39
+ CURRENT_VERSION=$(grep -m1 '^version = ' pyproject.toml | cut -d'"' -f2)
40
+
41
+ echo "Current version: ${CURRENT_VERSION}"
42
+ echo "Requested version: ${VERSION_NO_V}"
43
+
44
+ if [ "${CURRENT_VERSION}" = "${VERSION_NO_V}" ]; then
45
+ echo "Version is already correct in pyproject.toml"
46
+ echo "needs_update=false" >> "$GITHUB_OUTPUT"
47
+ else
48
+ echo "Updating pyproject.toml from ${CURRENT_VERSION} to ${VERSION_NO_V}"
49
+ sed -i "s/^version = \"${CURRENT_VERSION}\"/version = \"${VERSION_NO_V}\"/" pyproject.toml
50
+ echo "needs_update=true" >> "$GITHUB_OUTPUT"
51
+ fi
52
+
53
+ - name: Commit Version Update
54
+ if: steps.version_check.outputs.needs_update == 'true'
55
+ run: |
56
+ git add pyproject.toml
57
+ git commit -m "Bump version to ${{ inputs.version }}"
58
+ git push origin main
59
+
60
+ - name: Create and Push Tag
61
+ run: |
62
+ # Check if tag already exists locally
63
+ if git rev-parse "${{ inputs.version }}" >/dev/null 2>&1; then
64
+ echo "Tag ${{ inputs.version }} already exists locally, skipping creation"
65
+ else
66
+ git tag ${{ inputs.version }}
67
+ echo "Created tag ${{ inputs.version }}"
68
+ fi
69
+
70
+ # Push tag
71
+ git push origin ${{ inputs.version }} || {
72
+ echo "Failed to push tag, it might already exist remotely"
73
+ exit 1
74
+ }
75
+
76
+ - name: Create Release
77
+ uses: actions/github-script@v7
78
+ with:
79
+ script: |
80
+ const tagName = '${{ inputs.version }}';
81
+
82
+ // Check if release already exists
83
+ try {
84
+ const { data: existingRelease } = await github.rest.repos.getReleaseByTag({
85
+ owner: context.repo.owner,
86
+ repo: context.repo.repo,
87
+ tag: tagName
88
+ });
89
+ console.log(`Release ${tagName} already exists: ${existingRelease.html_url}`);
90
+ return;
91
+ } catch (error) {
92
+ if (error.status !== 404) {
93
+ throw error;
94
+ }
95
+ }
96
+
97
+ // Create the release
98
+ const { data: release } = await github.rest.repos.createRelease({
99
+ owner: context.repo.owner,
100
+ repo: context.repo.repo,
101
+ tag_name: tagName,
102
+ name: tagName,
103
+ draft: false,
104
+ prerelease: false,
105
+ generate_release_notes: true
106
+ });
107
+ console.log(`Created release ${release.html_url}`);
108
+
109
+ trigger_publish:
110
+ needs: prepare_release
111
+ uses: ./.github/workflows/release.yml
112
+ with:
113
+ tag_name: ${{ inputs.version }}
114
+ secrets: inherit
@@ -0,0 +1,77 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+ workflow_call:
8
+ inputs:
9
+ tag_name:
10
+ required: true
11
+ type: string
12
+
13
+ jobs:
14
+ pypi-publish:
15
+ name: Publish to PyPI
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ with:
22
+ ref: ${{ inputs.tag_name || github.ref }}
23
+
24
+ - name: Set up Python 3.13
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: '3.13'
28
+
29
+ - name: Install build dependencies
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ pip install build
33
+
34
+ - name: Build package
35
+ run: python -m build
36
+
37
+ - name: Publish package distributions to PyPI
38
+ uses: pypa/gh-action-pypi-publish@release/v1
39
+ with:
40
+ password: ${{ secrets.PYPI_API_TOKEN }}
41
+
42
+ docker-publish:
43
+ name: Publish to Docker Hub
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ with:
48
+ ref: ${{ inputs.tag_name || github.ref }}
49
+
50
+ - name: Set up Docker Buildx
51
+ uses: docker/setup-buildx-action@v3
52
+
53
+ - name: Login to Docker Hub
54
+ uses: docker/login-action@v3
55
+ with:
56
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
57
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
58
+
59
+ - name: Extract metadata (tags, labels) for Docker
60
+ id: meta
61
+ uses: docker/metadata-action@v5
62
+ with:
63
+ images: ${{ secrets.DOCKERHUB_USERNAME }}/nexus-dev
64
+ tags: |
65
+ type=raw,value=${{ inputs.tag_name }},enable=${{ inputs.tag_name != '' }}
66
+ type=raw,value=latest,enable=${{ inputs.tag_name != '' }}
67
+ type=semver,pattern={{version}},enable=${{ inputs.tag_name == '' }}
68
+ type=semver,pattern={{major}}.{{minor}},enable=${{ inputs.tag_name == '' }}
69
+ type=raw,value=latest,enable=${{ inputs.tag_name == '' && !contains(github.ref, '-') }}
70
+
71
+ - name: Build and push Docker image
72
+ uses: docker/build-push-action@v5
73
+ with:
74
+ context: .
75
+ push: true
76
+ tags: ${{ steps.meta.outputs.tags }}
77
+ labels: ${{ steps.meta.outputs.labels }}
@@ -0,0 +1,85 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ *.manifest
29
+ *.spec
30
+
31
+ # Installer logs
32
+ pip-log.txt
33
+ pip-delete-this-directory.txt
34
+
35
+ # Unit test / coverage reports
36
+ htmlcov/
37
+ .tox/
38
+ .nox/
39
+ .coverage
40
+ .coverage.*
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+ *.cover
45
+ *.py,cover
46
+ .hypothesis/
47
+ .pytest_cache/
48
+
49
+ # Translations
50
+ *.mo
51
+ *.pot
52
+
53
+ # Environments
54
+ .env
55
+ .venv
56
+ env/
57
+ venv/
58
+ ENV/
59
+ env.bak/
60
+ venv.bak/
61
+
62
+ # IDE
63
+ .idea/
64
+ .vscode/
65
+ *.swp
66
+ *.swo
67
+ *~
68
+
69
+ # mypy
70
+ .mypy_cache/
71
+ .dmypy.json
72
+ dmypy.json
73
+
74
+ # ruff
75
+ .ruff_cache/
76
+
77
+ # Nexus-Dev specific
78
+ !.nexus/**
79
+ .nexus/mcp_config.json
80
+ nexus_config.json
81
+ ~/.nexus-dev/
82
+
83
+ # OS
84
+ .DS_Store
85
+ Thumbs.db
File without changes
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: Isolated Global Installation Support
3
+ timestamp: '2026-01-18T15:41:09.321153+00:00'
4
+ project_id: f959454c-12b6-4062-b411-59fa58f83777
5
+ files_changed:
6
+ - README.md
7
+ - docs/quick-start.md
8
+ - pyproject.toml
9
+ - src/nexus_dev/cli.py
10
+ - src/nexus_dev/templates/pre-commit-hook (moved)
11
+ related_plan: ''
12
+ ---
13
+
14
+ # Isolated Global Installation Support
15
+
16
+ ## Summary
17
+ Enabled isolated global installation of Nexus-Dev via pipx or uv by fixing resource packaging and path resolution issues.
18
+
19
+ ## Technical Approach
20
+ Reorganized resource files into the package source tree, updated CLI path resolution using package-relative paths, and revised build metadata in pyproject.toml. Recommended pipx/uv for isolated global installation.
21
+
22
+ ## Design Decisions
23
+
24
+ - Moved templates to `src/nexus_dev/templates` to ensure seamless packaging without complex data-file mapping.
25
+ - Used `Path(__file__).parent` for robust path resolution regardless of installation location.
26
+ - Recommended `pipx` to avoid the 'sourcing venv' friction reported by the user.
27
+
28
+ ## Files Changed
29
+
30
+ - `README.md`
31
+ - `docs/quick-start.md`
32
+ - `pyproject.toml`
33
+ - `src/nexus_dev/cli.py`
34
+ - `src/nexus_dev/templates/pre-commit-hook (moved)`
File without changes