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

dcorner

v0.1.2

Published

Connect OpenCode to DoneCorner (dc-llm) in one command.

Readme

dcorner

Connect OpenCode to DoneCorner. Requires Node.js 18+ and an existing OpenCode 1.x or 2.x installation on PATH. Get a key at donecorner.ai/account.

npx dcorner setup
# Paste your DoneCorner key at the hidden prompt.
opencode

Setup checks /models for dc-llm, preserves existing JSON/JSONC settings and comments, stores the credential privately, and selects donecorner/dc-llm as the default model. The key is never placed in the provider configuration.

Commands

| Command | Purpose | |---|---| | dcorner setup | Configure the provider using a hidden key prompt. | | pbpaste \| dcorner setup --stdin | Read the key from stdin on macOS. | | dcorner setup --url https://host/v1 | Configure a different gateway. | | dcorner status | Check the saved endpoint and selected credential. | | dcorner --version | Print the canonical CLI version. |

Use npx dcorner instead of dcorner if you have not installed the package. DC_API_KEY is also supported for controlled environments. Avoid passing keys as command-line arguments, which can expose them in history and process lists. Remote endpoints require HTTPS; HTTP is supported for loopback testing.

Existing OpenCode installations

Setup detects the OpenCode major version:

  • 1.x: uses provider / npm / options and updates only the donecorner entry in OpenCode's auth.json, preserving other credentials.
  • 2.x: uses providers / package / settings and imports the key through stdin with opencode auth import --standalone. It activates the new key before removing old DoneCorner credentials. Standalone mode keeps your running OpenCode service separate from setup.

If multiple OpenCode installations are present, select the one you actually run:

DC_OPENCODE_BIN=/absolute/path/to/opencode npx dcorner setup
DC_OPENCODE_BIN=/absolute/path/to/opencode npx dcorner status

Use the same installation for setup and normal operation. The two major versions have different configuration formats; sharing a configuration between them can require a separate OpenCode migration.

The configuration directory is ~/.config/opencode unless XDG_CONFIG_HOME or OPENCODE_CONFIG_DIR overrides it. An explicit OPENCODE_CONFIG file is honored. An existing opencode.jsonc takes precedence over opencode.json. The previous configuration is saved as .bak; configuration and backup files use mode 0600 on POSIX. The original config is restored if credential setup fails. Failed network/key checks do not change configuration or credentials.

DC_URL overrides the saved endpoint. status otherwise uses the endpoint in configuration. Gateway response bodies and credential export errors are not printed, because either can contain secrets. POSIX file modes do not replace Windows ACLs; keep your OpenCode data directory private on Windows.

Python distribution

The source under packages/python provides the same CLI as a Python console command, bundling this JavaScript implementation. Python still needs Node.js 18+ and OpenCode. It does not download or install runtimes.

PyPI dcorner==0.0.1 was only a name reservation and has no command. npm 0.1.2 and the Python 0.0.2 distribution provide the setup CLI. Upgrade an older installation before running setup.

Development and release

cd packages/cli
npm ci
npm test
DC_TEST_REQUIRE_REAL=1 DC_TEST_OPENCODE=/path/to/opencode-v2 \
  DC_TEST_OPENCODE_V1=/path/to/opencode-v1 npm test
npm run build:python
npm pack

The integration tests use temporary HOME/XDG directories and a loopback gateway, with test credentials only. Set DC_TEST_TMP to choose the scratch directory. The Python bundle is generated from index.js with esbuild; rebuild it whenever the canonical CLI changes. Build the wheel with python -m build packages/python from the repository root. Review and publish the npm and Python artifacts through the respective release accounts after tests pass; builds do not publish them.

The compatibility suite also deletes its disposable config, credentials, state and cache between successful setup runs, verifies setup is missing, and repeats setup for both versions. It never deletes your real OpenCode configuration. For a release, rerun this suite through each installed package console command using DC_TEST_LAUNCHER=/absolute/path/to/dcorner.