npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencodehub-cli

v1.1.1

Published

Stack-first PR workflows from your terminal - CLI for OpenCodeHub

Downloads

136

Readme

Why OCH

  • Fast command-line workflows for repositories, pull requests, issues, and reviews.
  • Stack-first branch/PR flow for multi-PR delivery.
  • Secure authentication model with OS credential storage support.
  • Built-in API tooling for scripting and automation.

Installation

npm install -g opencodehub-cli

Verify:

och --version
och --help

Quick Start

# 1) Authenticate
och auth login --url https://git.example.com

# 2) Inspect your setup
och config doctor

# 3) Push and open PR workflow
cd your-repo
och repo push

# 4) Create a pull request
och pr create --base main --title "feat: add onboarding"

Core Commands

  • och auth authentication (login, logout, status)
  • och config CLI settings and diagnostics (list, set, doctor)
  • och repo repository operations (create, clone, push, list)
  • och pr pull request lifecycle (create, list, view, merge, ...)
  • och stack stacked branch/PR workflows (create, submit, sync, ...)
  • och review code review + AI review flows
  • och issue issue management
  • och ci, och queue, och metrics, och insights, och notify, och automate
  • och api direct API requests (useful for scripts)

Run och <command> --help for full command options.

Authentication and Security

Login

och auth login --url https://git.example.com

For non-interactive environments:

och auth login --url https://git.example.com --token <PERSONAL_ACCESS_TOKEN>

Token storage behavior

  • OCH_TOKEN env var always takes precedence.
  • macOS: Keychain (security)
  • Linux: Secret Service (secret-tool)
  • Windows: DPAPI-encrypted storage via PowerShell
  • Fallback: local CLI config storage if secure backend is unavailable

Helpful environment variables

  • OCH_TOKEN: inject token from environment
  • OCH_HTTP_TIMEOUT_MS: HTTP timeout in ms (default 15000)
  • OCH_DISABLE_KEYCHAIN=1: disable credential backend (useful in CI/tests)

Configuration

Inspect current configuration:

och config list
och config path
och config doctor

Set values:

och config set serverUrl https://git.example.com
och config set defaultBranch main
och config set insecure false

Common Workflows

Repository lifecycle

# Create a remote repository
och repo create my-service --description "Internal API service"

# Clone repository
och repo clone acme/my-service

# Push local repository
och repo push --branch main

Pull request lifecycle

# Create PR from current branch
och pr create --base main --title "feat: add API pagination"

# List open PRs
och pr list --state open

# View PR details
och pr view 42

# Merge PR
och pr merge 42

Stack workflow

# Create first stack branch
och stack create auth-foundation

# Create subsequent branch
och stack create auth-ui

# Submit stack and create/update PRs
och stack submit

AI review workflow

# Trigger AI review
och review ai 42

# Wait for completion
och review ai 42 --wait

# Check latest review status
och review status 42

API mode for scripting

# Read current user
och api /user

# Create issue via API
och api /repos/acme/platform/issues -X POST -F title="Bug: timeout" -F body="Steps to reproduce"

CI Usage Example

name: OCH Automation
on: [push]

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"
      - run: npm install -g opencodehub-cli
      - run: |
          export OCH_TOKEN="${{ secrets.OCH_TOKEN }}"
          och config set serverUrl https://git.example.com
          och config doctor
          och repo push --branch main

Troubleshooting

Not logged in. Run 'och auth login' first.

  • Run och auth login --url <server>.
  • Or export OCH_TOKEN for automation.

Server URL not configured

  • Run och config set serverUrl https://git.example.com.

TLS / certificate issues

  • Use och config set caFile /path/to/ca.pem for custom CA.
  • Use och config set insecure true only for temporary debugging.

Validate setup end-to-end

och config doctor

Development

cd cli
npm install
npm run build
npm run test

License

MIT