This is an n8n community node that provides integration with the GitLab Code Splitter API. It allows you to split GitLab repository code into manageable chunks for AI processing and analysis.
- System Operations: Health checks and supported language queries
- Code Splitting: Split individual code content into manageable chunks
- Repository Processing: Comprehensive GitLab repository code splitting with various filtering options
- Architectural Layer Support: Split code by architectural layers (domain, application, adapters, ports, tests, command)
- Custom Path Filtering: Include/exclude specific paths and file extensions
- Secure Authentication: URL parameter validation and API key support
Follow the installation guide in the n8n community nodes documentation.
npm install n8n-nodes-gitlab-code-splitter
Set up your GitLab Code Splitter API credentials:
-
API URL: The base URL of your GitLab Code Splitter API instance (default:
http://localhost:3000
) - API Key (required): Authentication key sent in X-API-Key header for all API requests
- Health Check: Verify API availability
- Get Languages: Retrieve supported programming languages
- Split: Split individual code content with customizable options
- Split All Files: Process all repository files
- Split by Layer: Process specific architectural layers
- Split by Path: Process files in custom paths
- GitLab URL: GitLab instance URL (validates URL format)
- Project ID: GitLab project identifier (group/project format)
- GitLab Token: Personal access token (validates token format: glpat-, gldt-, or gloas-)
- Branch: Git branch to process
- File Extensions: Specify file types to process
- Include Paths: Directory paths to include
- Exclude Paths: Directory paths to exclude (default: .git, vendor, node_modules)
- Max File Size: Maximum file size limit in bytes
- Max Tokens: Maximum tokens per chunk
- Overlap: Token overlap between chunks
- Min Chunk Size: Minimum chunk size in tokens
- Preserve Newlines: Whether to preserve newline characters
{
"resource": "system",
"operation": "healthCheck"
}
{
"resource": "repository",
"operation": "splitByLayer",
"layerType": "domain",
"gitlabUrl": "https://gitlab.com",
"projectId": "mygroup/myproject",
"token": "glpat-xxxxxxxxxxxxxxxxxxxx",
"branch": "main"
}
{
"resource": "code",
"operation": "split",
"code": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello, World!\")\n}",
"language": "go",
"filePath": "example.go"
}
- URL Validation: Ensures valid API URLs
- Token Format Validation: Validates GitLab token formats
-
Enhanced API Key Validation: Comprehensive API key validation including:
- Length constraints (10-200 characters)
- Character validation (alphanumeric, hyphens, underscores only)
- Placeholder/common invalid value detection
- Required X-API-Key header for all requests
- Secure Credential Storage: Uses n8n's secure credential system
npm install
npm run build
npm run lint
MIT
For issues and questions, please visit the GitHub repository.