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

@thanaen/ado-cli

v0.6.0

Published

Lightweight Azure DevOps CLI for repos, work items, pull requests, and builds

Readme

@thanaen/ado-cli

Lightweight CLI for Azure DevOps REST workflows (repos, branches, work items, PRs, builds).

Why this exists

This project provides a tiny scriptable command layer over the Azure DevOps API so automation agents and developers can run common actions quickly.

Requirements

  • Node.js 18+ (runtime for the published npm package)
  • An Azure DevOps Personal Access Token (PAT)

For development you also need Bun (used for builds, tests, and scripts).

Configuration

Set environment variables before running commands:

  • DEVOPS_PAT (required)
  • ADO_COLLECTION_URL (default: https://dev.azure.com/<your-org>)
  • ADO_PROJECT (default: <your-project>)
  • ADO_REPO (default: <your-repository>)
  • ADO_INSECURE=1 (optional; only for self-signed TLS environments)

Example:

export DEVOPS_PAT="***"
export ADO_COLLECTION_URL="https://dev.azure.com/acme"
export ADO_PROJECT="MyProject"
export ADO_REPO="MyRepo"

On-prem / localserver example:

export DEVOPS_PAT="***"
export ADO_COLLECTION_URL="https://localserver/DefaultCollection"
export ADO_PROJECT="ExampleProject"
export ADO_REPO="Example Repository"
export ADO_INSECURE=1

Install

Global install (CLI available as ado):

npm i -g @thanaen/ado-cli

Usage

ado help
ado smoke

Commands

  • -v, --version
  • init [--local]
  • config
  • smoke
  • repos
  • branches [repo]
  • workitem-get <id> [--raw] [--expand=all|fields|links|relations]
  • workitems-recent [top] [--tag=<tag>] [--type=<work-item-type>] [--state=<state>]
  • workitem-comments <id> [top] [--top=<n>] [--order=asc|desc]
  • workitem-comment-add <id> --text="..." [--file=path]
  • workitem-comment-update <id> <commentId> --text="..." [--file=path]
  • prs [status] [top] [repo]
  • pr-get <id> [repo]
  • pr-create --title=... --source=... --target=... [--description=...] [--repo=...] [--work-items=123,456] [--tags=tag-a,tag-b]
  • pr-update <id> [--title=...] [--description=...] [--repo=...] [--work-items=123,456] [--tags=tag-a,tag-b]
  • pr-cherry-pick <id> --target=... [--topic=branch-name] [--repo=...]
  • pr-approve <id> [repo]
  • pr-autocomplete <id> [repo]
  • builds [top]

Examples:

# 20 derniers bugs taggés "bot"
ado workitems-recent 20 --type=Bug --tag=bot

# Bugs "bot" encore en état New
ado workitems-recent --type=Bug --tag=bot --state=New

# Mettre à jour un commentaire existant (dédup)
ado workitem-comment-update 20485 12527 --file=./comment.md

npm publication (GitHub Actions)

The repository includes a workflow at .github/workflows/npm-publish.yml.

It can publish in two ways:

  • automatically when a GitHub Release is published
  • manually with Run workflow (workflow_dispatch)

Required repository secret

  • NPM_TOKEN: npm automation token allowed to publish @thanaen/ado-cli

Release prep

  • bump package.json version before creating the release/tag

Workflow behavior

Before publishing, the workflow runs:

  • bun run fmt:check
  • bun run lint
  • bun run typecheck
  • bun test
  • npm pack --dry-run

Then it publishes with:

npm publish --access public --provenance

Agent skill included

A reusable agent skill is included at:

  • skills/ado-workflows/SKILL.md

This helps AI coding agents run consistent Azure DevOps workflows using this CLI.

Development

Setup

bun install          # installs deps + sets up git hooks via lefthook

Scripts

| Script | Description | | -------------------- | ------------------------------------------ | | bun run lint | Lint with oxlint (type-aware + type-check) | | bun run lint:fix | Lint and auto-fix safe issues | | bun run fmt | Format all files with oxfmt | | bun run fmt:check | Check formatting without writing | | bun test | Run tests | | bun run typecheck | Run tsc type-check (manual, not in hooks) | | bun run build | Compile to standalone binary | | bun run build:dist | Build Node CLI used for npm publication | | bun run prepack | Rebuild dist before npm pack/publish |

Quality gates (git hooks via Lefthook)

Pre-commit — runs on staged files, auto-fixes and re-stages:

  • oxfmt (format)
  • oxlint --type-aware --type-check --fix (lint + fix)

Editor

Install the recommended VS Code extension (oxc.oxc-vscode) when prompted. Format-on-save and lint fix-on-save are pre-configured in .vscode/settings.json.

Security notes

  • Never commit your PAT.
  • Prefer setting secrets through runtime environment injection.
  • ADO_INSECURE=1 should only be used in trusted internal environments.

Troubleshooting

  • 400 Bad Request - Invalid URL at startup usually means one of ADO_COLLECTION_URL, ADO_PROJECT, or ADO_REPO is still using placeholder defaults.
  • If strict TLS fails on internal servers, use ADO_INSECURE=1 only when appropriate for trusted self-signed endpoints.