--- import BaseLayout from "@/layouts/BaseLayout.astro"; import { Terminal, Cpu, GitBranch, Share2, Layers, CheckCircle2, GitPullRequest, Bug, Shield, Zap, Search, Settings, } from "lucide-react"; const commandGroups = [ { title: "Authentication", icon: Shield, color: "text-green-500", bg: "bg-green-500/10", commands: [ { cmd: "och auth login --url ", desc: "Login to OpenCodeHub" }, { cmd: "och auth status", desc: "Check authentication status" }, { cmd: "och auth logout", desc: "Logout from server" }, ], }, { title: "Repositories", icon: GitBranch, color: "text-blue-500", bg: "bg-blue-500/10", commands: [ { cmd: "och repo create ", desc: "Create a new repository" }, { cmd: "och repo clone ", desc: "Clone a repository" }, { cmd: "och repo push --branch main", desc: "Push to OpenCodeHub" }, { cmd: "och repo list", desc: "List your repositories" }, ], }, { title: "Pull Requests", icon: GitPullRequest, color: "text-purple-500", bg: "bg-purple-500/10", commands: [ { cmd: "och pr create --title \"feat: X\"", desc: "Create a pull request" }, { cmd: "och pr list --state open", desc: "List pull requests" }, { cmd: "och pr checkout ", desc: "Checkout a PR locally" }, { cmd: "och pr merge ", desc: "Merge a pull request" }, ], }, { title: "Stacked PRs", icon: Layers, color: "text-primary", bg: "bg-primary/10", commands: [ { cmd: "och stack create ", desc: "Create stacked branch" }, { cmd: "och stack submit", desc: "Push & create/update PRs" }, { cmd: "och stack sync", desc: "Rebase stack on main" }, { cmd: "och stack log", desc: "Visualize stack tree" }, ], }, { title: "Issues", icon: Bug, color: "text-yellow-500", bg: "bg-yellow-500/10", commands: [ { cmd: "och issue create --title \"Bug: X\"", desc: "Create an issue" }, { cmd: "och issue list --state open", desc: "List issues" }, { cmd: "och issue close ", desc: "Close an issue" }, ], }, { title: "CI/CD & Merge Queue", icon: Zap, color: "text-cyan-500", bg: "bg-cyan-500/10", commands: [ { cmd: "och ci list", desc: "List pipeline runs" }, { cmd: "och queue add ", desc: "Add PR to merge queue" }, { cmd: "och queue list", desc: "View merge queue" }, ], }, { title: "Search & Config", icon: Search, color: "text-orange-500", bg: "bg-orange-500/10", commands: [ { cmd: "och search repos \"query\"", desc: "Search repositories" }, { cmd: "och config list", desc: "Show CLI configuration" }, { cmd: "och config set serverUrl ", desc: "Set server URL" }, ], }, ]; const quickStart = [ { step: 1, title: "Install", code: "npm install -g opencodehub-cli" }, { step: 2, title: "Login", code: "och auth login --url http://your-server:3000" }, { step: 3, title: "Create Repo", code: "och repo create my-project --description \"My project\"" }, { step: 4, title: "Push Code", code: "och repo push --branch main" }, ]; ---
CLI v1.0

OpenCodeHub CLI

Manage repositories, pull requests, stacked PRs, and more from your terminal. A GitHub CLI-like experience for OpenCodeHub.

$ npm install -g opencodehub-cli

Quick Start

{quickStart.map((item) => (
{item.step}

{item.title}

{item.code}
))}

Commands

{commandGroups.map((group) => (

{group.title}

{group.commands.map((cmd) => (
{cmd.cmd} {cmd.desc}
))}
))}

Common Workflows

New Repository

$ och auth login --url http://your-server:3000
$ mkdir my-project && cd my-project
$ git init
$ och repo create my-project
$ # Add files, commit, then:
$ och repo push --branch main

Stacked PRs

$ och stack create feature/part-1
$ # Work on part 1...
$ och stack submit
$ och stack create feature/part-2
$ # Work on part 2...
$ och stack submit
$ och stack log

Daily Development

$ och git sync
$ och branch checkout feature-x
$ # Make changes, commit...
$ och git push
$ och pr create --title "feat: X"

Code Review

$ och pr list
$ och pr checkout 42
$ # Review code locally...
$ och pr merge 42

Run och --help for the full command reference.

Full Documentation →