swadhinbiswas # Changelog Β· 1/17/2026
9eabb75
141 lines Β· 5.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CLI Reference - OpenCodeHub Docs</title>
    <meta name="description" content="OpenCodeHub CLI reference - Stack-first PR workflows">
    <link rel="icon" type="image/svg+xml" href="../public/logo.svg">
    <link
        href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
        rel="stylesheet">
    <link rel="stylesheet" href="styles.css">
</head>

<body>
    <header class="header">
        <a href="index.html" class="header-logo">
            <img src="../public/logo.svg" alt="OpenCodeHub" height="40">
        </a>
        <nav class="header-nav">
            <a href="getting-started.html">Getting Started</a>
            <a href="deployment.html">Deployment</a>
            <a href="cli.html">CLI</a>
            <a href="api.html">API</a>
        </nav>
    </header>

    <div class="layout">
        <aside class="sidebar">
            <div class="sidebar-section">
                <div class="sidebar-title">CLI</div>
                <nav class="sidebar-nav">
                    <a href="#installation" class="sidebar-link active">Installation</a>
                    <a href="#auth" class="sidebar-link">Authentication</a>
                    <a href="#stacked-prs" class="sidebar-link">Stacked PRs</a>
                    <a href="#commands" class="sidebar-link">All Commands</a>
                </nav>
            </div>
        </aside>

        <main class="main">
            <div class="content">
                <h1>πŸ’» CLI Reference</h1>
                <p>Stack-first PR workflows from your terminal.</p>

                <section id="installation">
                    <h2>πŸ“¦ Installation</h2>
                    <div class="command-line">
                        <span class="command-prompt">$</span>
                        <span class="command-text">npm install -g opencodehub-cli</span>
                    </div>
                    <div class="command-line">
                        <span class="command-prompt">$</span>
                        <span class="command-text">och --version</span>
                    </div>
                </section>

                <section id="auth">
                    <h2>πŸ” Authentication</h2>
                    <table>
                        <tr>
                            <td><code>och auth login</code></td>
                            <td>Interactive login</td>
                        </tr>
                        <tr>
                            <td><code>och auth login --token TOKEN</code></td>
                            <td>CI/CD token login</td>
                        </tr>
                        <tr>
                            <td><code>och auth whoami</code></td>
                            <td>Show current user</td>
                        </tr>
                        <tr>
                            <td><code>och auth logout</code></td>
                            <td>Clear credentials</td>
                        </tr>
                    </table>
                </section>

                <section id="stacked-prs">
                    <h2>πŸ“š Stacked PRs</h2>
                    <p>Create dependent pull requests that auto-update when parents change.</p>
                    <table>
                        <tr>
                            <td><code>och stack create &lt;name&gt;</code></td>
                            <td>Create new branch in stack</td>
                        </tr>
                        <tr>
                            <td><code>och stack view</code></td>
                            <td>View current stack</td>
                        </tr>
                        <tr>
                            <td><code>och stack submit</code></td>
                            <td>Push and create PRs</td>
                        </tr>
                        <tr>
                            <td><code>och stack sync</code></td>
                            <td>Rebase stack on main</td>
                        </tr>
                    </table>
                    <h3>Example</h3>
                    <pre><code>och stack create database-schema
git commit -m "Add tables"
och stack create auth-service  
git commit -m "Add auth"
och stack submit  # Creates 2 stacked PRs</code></pre>
                </section>

                <section id="commands">
                    <h2>πŸ“‹ All Commands</h2>
                    <table>
                        <tr>
                            <td><code>och init</code></td>
                            <td>Initialize repo for OpenCodeHub</td>
                        </tr>
                        <tr>
                            <td><code>och status</code></td>
                            <td>Show stack status</td>
                        </tr>
                        <tr>
                            <td><code>och sync</code></td>
                            <td>Sync with remote</td>
                        </tr>
                        <tr>
                            <td><code>och config list</code></td>
                            <td>List configuration</td>
                        </tr>
                    </table>
                </section>

                <footer
                    style="margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border-primary); text-align: center; color: var(--text-muted);">
                    <p>Made with ❀️ by <a href="https://github.com/swadhinbiswas">Swadhin Biswas</a></p>
                </footer>
            </div>
        </main>
    </div>
</body>

</html>