OpenCommit CLI #5

Open
opened 2026-04-11 22:04:41 +02:00 by mvdkleijn · 0 comments
Owner

1. What

The development of OpenCommit CLI, a command-line interface designed to provide a seamless transition for developers migrating from GitHub to our instance. The tool will replicate the core user experience and command structure of the gh (GitHub CLI), allowing users to perform essential repository operations (e.g., viewing issues, managing PRs, checking status) through a familiar syntax.

The technical approach involves utilizing the open source GitHub CLI (gh) as a functional foundation. Forking or refactoring its core architecture and re-implementing the API communication layer using the forgejo-sdk to interact with our OpenCommit API/Forgejo instance.

2. Why

The primary barrier to migrating from GitHub to an independent Forgejo-based instance is often "workflow friction". The loss of familiar tooling and command-line automation. By providing a CLI that mirrors the gh experience, we significantly lower the cognitive load and operational cost for developers moving their projects to our platform. This tool hopefully transforms the migration from a disruptive change into a simple reconfiguration of an existing, trusted workflow.

3. Boundaries

  • In-Scope:
    • Forking/refactoring the GitHub CLI codebase to adapt its command structure for OpenCommit.
    • Implementing authentication and configuration management (e.g., oc auth login) via forgejo-sdk.
    • Mapping core gh commands (like gh issue list, gh pr create, gh repo view) to their equivalent Forgejo/OpenCommit API endpoints.
    • Providing a "transition guide" specifically for users replacing gh with oc.
  • Out-of-Scope:
    • Replicating the entirety of the GitHub CLI feature set (we will focus only on high-impact, common workflow commands).
    • Building a full GUI or Web-based alternative to the CLI.
    • Modifying the underlying Forgejo/OpenCommit API architecture itself (the CLI is a consumer, not a provider).

4. Definition of Done

  • Functional MVP: A working binary that allows users to authenticate and perform at least three core operations: viewing repository info, listing issues, and checking pull request status.
  • SDK Integration: Successful implementation of all API interactions using the forgejo-sdk to ensure native compatibility with our infrastructure.
  • Command Parity: Documentation exists showing a direct "translation table" (e.g., If you used gh issue list, now use oc issue list).
  • Seamless Authentication: A user can go from zero-config to an authenticated state using only the CLI, without needing manual browser-based token copying if possible.
  • Automated Testing: A suite of integration tests that verify command outputs match the expected API responses from the OpenCommit instance.
## 1. What The development of **OpenCommit CLI**, a command-line interface designed to provide a seamless transition for developers migrating from GitHub to our instance. The tool will replicate the core user experience and command structure of the `gh` (GitHub CLI), allowing users to perform essential repository operations (e.g., viewing issues, managing PRs, checking status) through a familiar syntax. The technical approach involves utilizing the open source **GitHub CLI (`gh`)** as a functional foundation. Forking or refactoring its core architecture and re-implementing the API communication layer using the `forgejo-sdk` to interact with our OpenCommit API/Forgejo instance. ## 2. Why The primary barrier to migrating from GitHub to an independent Forgejo-based instance is often "workflow friction". The loss of familiar tooling and command-line automation. By providing a CLI that mirrors the `gh` experience, we significantly lower the cognitive load and operational cost for developers moving their projects to our platform. This tool hopefully transforms the migration from a disruptive change into a simple reconfiguration of an existing, trusted workflow. ## 3. Boundaries * **In-Scope:** * Forking/refactoring the GitHub CLI codebase to adapt its command structure for OpenCommit. * Implementing authentication and configuration management (e.g., `oc auth login`) via `forgejo-sdk`. * Mapping core `gh` commands (like `gh issue list`, `gh pr create`, `gh repo view`) to their equivalent Forgejo/OpenCommit API endpoints. * Providing a "transition guide" specifically for users replacing `gh` with `oc`. * **Out-of-Scope:** * Replicating the *entirety* of the GitHub CLI feature set (we will focus only on high-impact, common workflow commands). * Building a full GUI or Web-based alternative to the CLI. * Modifying the underlying Forgejo/OpenCommit API architecture itself (the CLI is a consumer, not a provider). ## 4. Definition of Done * [ ] **Functional MVP:** A working binary that allows users to authenticate and perform at least three core operations: viewing repository info, listing issues, and checking pull request status. * [ ] **SDK Integration:** Successful implementation of all API interactions using the `forgejo-sdk` to ensure native compatibility with our infrastructure. * [ ] **Command Parity:** Documentation exists showing a direct "translation table" (e.g., *If you used `gh issue list`, now use `oc issue list`*). * [ ] **Seamless Authentication:** A user can go from zero-config to an authenticated state using only the CLI, without needing manual browser-based token copying if possible. * [ ] **Automated Testing:** A suite of integration tests that verify command outputs match the expected API responses from the OpenCommit instance.
mvdkleijn changed title from CLI to OpenCommit CLI 2026-04-11 23:04:08 +02:00
Sign in to join this conversation.
No description provided.