{"id":46784318,"url":"https://github.com/rios0rios0/langforge","last_synced_at":"2026-05-19T21:09:01.687Z","repository":{"id":342178898,"uuid":"1173119902","full_name":"rios0rios0/langforge","owner":"rios0rios0","description":"Shared Go library providing language detection and ecosystem abstractions for Go, Java, Python, TypeScript, C#, and Terraform. Includes version reading/writing, dependency manifests, and update commands. Used by autobump and autoupdate.","archived":false,"fork":false,"pushed_at":"2026-04-03T21:03:00.000Z","size":130,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T22:28:22.335Z","etag":null,"topics":["clean-architecture","dependency-management","golang","language-detection","semantic-versioning"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rios0rios0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-05T03:00:50.000Z","updated_at":"2026-04-03T21:03:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rios0rios0/langforge","commit_stats":null,"previous_names":["rios0rios0/langforge"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/rios0rios0/langforge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rios0rios0%2Flangforge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rios0rios0%2Flangforge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rios0rios0%2Flangforge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rios0rios0%2Flangforge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rios0rios0","download_url":"https://codeload.github.com/rios0rios0/langforge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rios0rios0%2Flangforge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31812977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-architecture","dependency-management","golang","language-detection","semantic-versioning"],"created_at":"2026-03-10T01:09:43.540Z","updated_at":"2026-04-14T20:01:22.784Z","avatar_url":"https://github.com/rios0rios0.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003elangforge\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/rios0rios0/langforge/releases/latest\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/release/rios0rios0/langforge.svg?style=for-the-badge\u0026logo=github\" alt=\"Latest Release\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/rios0rios0/langforge/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/rios0rios0/langforge.svg?style=for-the-badge\u0026logo=github\" alt=\"License\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/rios0rios0/langforge/actions/workflows/default.yaml\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/rios0rios0/langforge/default.yaml?branch=main\u0026style=for-the-badge\u0026logo=github\" alt=\"Build Status\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://sonarcloud.io/summary/overall?id=rios0rios0_langforge\"\u003e\n        \u003cimg src=\"https://img.shields.io/sonar/coverage/rios0rios0_langforge?server=https%3A%2F%2Fsonarcloud.io\u0026style=for-the-badge\u0026logo=sonarqubecloud\" alt=\"Coverage\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://sonarcloud.io/summary/overall?id=rios0rios0_langforge\"\u003e\n        \u003cimg src=\"https://img.shields.io/sonar/quality_gate/rios0rios0_langforge?server=https%3A%2F%2Fsonarcloud.io\u0026style=for-the-badge\u0026logo=sonarqubecloud\" alt=\"Quality Gate\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.bestpractices.dev/projects/12091\"\u003e\n        \u003cimg src=\"https://img.shields.io/cii/level/12091?style=for-the-badge\u0026logo=opensourceinitiative\" alt=\"OpenSSF Best Practices\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA shared Go library providing language detection and ecosystem abstractions for multiple programming languages. Includes version reading/writing, dependency management, and build validation. Used by [autobump](https://github.com/rios0rios0/autobump) and [autoupdate](https://github.com/rios0rios0/autoupdate).\n\n## Features\n\n- **Language Detection**: Automatically detect project languages via manifest files and file extensions\n- **Version Management**: Read and write semantic versions across all supported ecosystems\n- **Dependency Management**: Read dependency manifests and run native update commands (go get, npm update, pip, etc.)\n- **Build Validation**: Run ecosystem-specific lint and build commands to verify project health\n- **Remote-Compatible Detection**: Pluggable `FileChecker` abstraction enables detection via GitHub/GitLab APIs without local filesystem access\n- **Registry Pattern**: `LanguageRegistry` with auto-detection and provider lookup for polyglot projects\n- **File Classification**: Extension-based file classifier for fast, deterministic language identification\n\n## Supported Ecosystems\n\n| Ecosystem       | Detection Files                                  | Version File     |\n|-----------------|--------------------------------------------------|------------------|\n| Go              | `go.mod`                                         | `go.mod`         |\n| Node/TypeScript | `package.json`, `yarn.lock`, `pnpm-lock.yaml`    | `package.json`   |\n| Python          | `pyproject.toml`, `setup.py`, `requirements.txt` | `pyproject.toml` |\n| Java (Gradle)   | `build.gradle`, `build.gradle.kts`               | `build.gradle`   |\n| Java (Maven)    | `pom.xml`                                        | `pom.xml`        |\n| C#              | `.csproj`, `.sln`                                | `.csproj`        |\n| Terraform       | `.tf`, `.hcl`                                    | `*.tf`           |\n\n## Installation\n\n```bash\ngo get github.com/rios0rios0/langforge\n```\n\n## Usage\n\n```go\nimport (\n    \"github.com/rios0rios0/langforge/pkg/infrastructure/registry\"\n)\n\n// Create registry with all built-in providers\nreg := registry.NewDefaultRegistry()\n\n// Auto-detect language from a local project directory\nprovider, err := reg.Detect(\"/path/to/repo\")\n\n// Or detect using a custom file checker (e.g., GitHub API)\nprovider, err := reg.DetectWithChecker(myRemoteFileChecker)\n\n// Detect all languages in a polyglot project\nproviders, err := reg.DetectAllWithChecker(myRemoteFileChecker)\n\n// Read version, dependencies, update, validate\nversion, err := provider.ReadVersion(\"/path/to/repo\")\ndeps, err := provider.ReadDependencies(\"/path/to/repo\")\n```\n\n## Architecture\n\n```\nlangforge/\n├── pkg/\n│   ├── domain/\n│   │   ├── entities/         # Language, Version, Dependency, FileChecker, Classifier\n│   │   └── repositories/     # LanguageProvider, LanguageDetector, VersionReader/Writer,\n│   │                         # DependencyReader, DependencyUpdater, BuildValidator\n│   ├── infrastructure/\n│   │   ├── languages/        # Go, Node, Python, Java (Gradle/Maven), C#, Terraform\n│   │   └── registry/         # LanguageRegistry with auto-detection and default setup\n│   └── support/\n│       ├── cmdexec/          # Shell command execution wrapper\n│       └── fileutil/         # File I/O helpers, LocalFileChecker\n└── test/\n    ├── builders/             # Test data builders (Version, Dependency, Provider)\n    └── doubles/              # Test doubles (stubs)\n```\n\n## Provider Interfaces\n\nThe library uses Go interface composition through the `LanguageProvider` contract:\n\n- **`LanguageDetector`**: Detects if a language is present in a directory\n- **`VersionReader`** / **`VersionWriter`**: Read and write semantic versions in ecosystem-specific files\n- **`DependencyReader`**: Parse dependency manifests and return structured dependency lists\n- **`DependencyUpdater`**: Run native ecosystem update commands\n- **`BuildValidator`**: Validate project builds and linting\n\nEach language provider composes these interfaces into a single `Provider` struct, enabling independent testing and reuse.\n\n## Contributing\n\nContributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\nSee [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frios0rios0%2Flangforge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frios0rios0%2Flangforge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frios0rios0%2Flangforge/lists"}