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

@tryglen/cli

v0.9.4

Published

Glen CLI — memory for coding agents

Readme

@tryglen/cli

Glen CLI — shared team memory for coding agents.

Install

npm install -g @tryglen/cli
glen login

Commands

| Command | Description | |---|---| | glen login | Connect via browser sign-in; writes credentials and initial session state. | | glen logout | Sign out and remove credentials + session state. | | glen status | Show connection status, active org, incognito state, and CLI version. | | glen search "<query>" | Search the team's shared glen memory. | | glen incognito on\|off | Toggle incognito mode: while on, nothing is recorded (recall keeps working). | | glen org list | List your organizations; active one is marked with . | | glen org switch [slug] | Switch the active organization for this machine (interactive picker without slug). | | glen ingest [--agent <name>] | Ingest a turn from stdin — used by agent hooks (claude-code or codex). | | glen install [--agent <claude\|codex>] | Set up or update glen for detected coding agents (plugin + hooks); idempotent, so re-running repairs a broken setup. --claude-path <path> / --codex-path <path> point at a binary when auto-detection fails. | | glen update | Update the glen CLI and any installed glen plugins, and re-verify the Codex hook registration. Never installs a plugin that isn't already installed — that's glen install's job. | | glen doctor [--auto] | Print machine-readable status: lines (CLI version/latest/channel, login + org, per-agent plugin + hook state) plus remedy lines — the setup skill branches on them. --auto runs background updates silently (used by hooks). | | glen statusline | Output a single status line for the agent's UI status bar — used by hooks. | | glen session-start [--agent <name>] | Output hook JSON for the agent's SessionStart event — used by hooks. | | glen version | Print the CLI version. |

Files

| File | Description | |---|---| | ~/.glen/credentials.json | API key credential — mode 0600, never logged or sent to anyone but tryglen.com. | | ~/.glen/state.json | Client-owned session state: { activeOrgId, activeOrgSlug, activeOrgName, incognito }. Non-secret. |

The state file is what the CLI sends as x-glen-org-id / x-glen-incognito headers on every request. The server validates org membership on every call — no state is stored server-side.

Environment variables

| Variable | Default | Description | |---|---|---| | GLEN_BASE_URL | https://app.tryglen.com | Override the glen server URL (useful for local dev). | | GLEN_CREDENTIALS_PATH | ~/.glen/credentials.json | Override credentials file location. | | GLEN_STATE_PATH | ~/.glen/state.json | Override state file location. | | GLEN_NO_AUTO_UPDATE | unset | Set to 1 to disable automatic background updates. Also disabled when CI=true. |

Update behavior

The CLI uses layered silent auto-update so you stay current without thinking about it:

  1. Background TTL check (daily): once per 24 hours, when installed via npm globally, the CLI spawns a detached npm install -g @tryglen/cli@latest process that doesn't block your turn. A ~/.glen/update-check.json timestamp controls the cadence.
  2. SessionStart hook (glen doctor --auto): on every agent session start, the hook also triggers background update + plugin upgrade hints. Same detached, non-blocking approach.
  3. Server-driven 426 floor: if the server requires a newer CLI version (breaking API change), it responds with HTTP 426 Upgrade Required. The CLI then runs a synchronous self-update and re-execs your original command with GLEN_REEXEC=1 set to prevent infinite loops. If the update fails or you are below the minimum after re-exec, it exits with a message to run npm i -g @tryglen/cli@latest manually.

Escape hatches:

  • GLEN_NO_AUTO_UPDATE=1 disables all background update attempts.
  • CI=true (set automatically in GitHub Actions and most CI systems) also disables them.
  • The CLI only self-updates when installed globally via npm (it detects this by comparing the binary's real path against npm prefix -g). If you installed via another package manager, you get a hint to update with your own tooling instead.

Troubleshooting

glen status shows "not connected" Run glen login to authenticate via browser.

glen search / glen ingest prints "no active organization" Run glen org switch (or glen login if you've never connected) to pick an organization.

426 error in CI or non-npm installs The server requires a newer CLI version. Run npm i -g @tryglen/cli@latest (or equivalent for your package manager) and retry.

Stuck update lock If a previous update was interrupted, a stale lock can prevent future auto-updates:

rm -rf ~/.glen/update.lock

glen doctor for a full picture Run glen doctor to see your version, the latest available, install channel, and session state in one place.