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

@clawapps/cli

v0.6.0

Published

ClawApps CLI - Login and manage your ClawApps account from the terminal

Readme

@clawapps/cli

npm version License: MIT Node.js

A command-line tool for authenticating with the ClawApps platform. Sign in via Google or Apple directly from your terminal — tokens are stored locally for use by AI agents and scripts.

Install

npm install -g @clawapps/cli

Commands

clawapps login

Sign in with Google or Apple. Opens a browser for OAuth, then stores tokens locally. If already logged in, auto-refreshes the token and extends the session.

$ clawapps login
Opening browser for login...
✔ Logged in as [email protected]

clawapps whoami

Show current account info. Auto-refreshes expired tokens.

$ clawapps whoami
ClawApps Account
──────────────────────────────
Name:     Username
Email:    [email protected]
ID:       xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Provider: google

clawapps token

Print current valid access token. Auto-refreshes if expired. Designed for scripting.

$ clawapps token
eyJhbGciOiJIUzI1NiIs...

Use in scripts:

curl -H "Authorization: Bearer $(clawapps token)" https://api.clawapps.ai/api/v1/...

clawapps credit

Open credit recharge page in browser.

$ clawapps credit
Opening credit recharge page...
Page opened in your browser.

clawapps membership

Open membership subscription page in browser.

$ clawapps membership
Opening membership subscription page...
Page opened in your browser.

clawapps payment-grant <skill_id>

Open payment grant page for a skill. Starts a local callback server to receive the payment token after authorization.

$ clawapps payment-grant c0ff42a9-2b54-48b3-b570-cb16be363ad6
Opening payment grant page...
Waiting for payment confirmation...

Payment grant confirmed!
Payment Token: 8d6d2e514eb241559a4dfcb3176ce3a4
Auto Payment: disabled

clawapps logout

Sign out and clear local credentials.

$ clawapps logout
Logged out successfully.

How It Works

clawapps login
  → Local HTTP server starts on localhost (random port)
  → Browser opens for OAuth (Google or Apple)
  → Callback returns tokens to local server
  → Credentials saved to ~/.clawapps/credentials.json (0600)

clawapps token
  → Load local credentials
  → Validate access token via API
  → If expired, auto-refresh using refresh token
  → Output valid access token to stdout

Credentials

Tokens are stored at ~/.clawapps/credentials.json with file permissions 0600.

{
  "provider": "google",
  "access_token": "eyJ...",
  "refresh_token": "eyJ...",
  "logged_in_at": "2026-03-12T11:00:00.000Z"
}

Project Structure

clawapps-cli/
├── bin/claw.js                    # Entry point
├── src/
│   ├── index.ts                   # Commander setup
│   ├── commands/
│   │   ├── login.ts               # OAuth flow with auto-refresh
│   │   ├── logout.ts              # Clear credentials
│   │   ├── whoami.ts              # User info with auto-refresh
│   │   ├── token.ts               # Print valid access token
│   │   ├── credit.ts              # Open credit page
│   │   ├── membership.ts          # Open membership page
│   │   ├── payment-grant.ts       # Payment authorization flow
│   │   └── helpers/
│   │       └── ensure-token.ts    # Token validation & refresh
│   ├── auth/
│   │   ├── login-server.ts        # Login callback server
│   │   ├── payment-server.ts      # Payment callback server
│   │   ├── server.ts              # Google OAuth callback server
│   │   ├── google.ts              # Google OAuth URL builder
│   │   ├── apple.ts               # Apple OAuth URL builder
│   │   └── exchange.ts            # Token exchange
│   ├── lib/
│   │   ├── config.ts              # API endpoints & constants
│   │   ├── credentials.ts         # Read/write credentials
│   │   ├── api.ts                 # HTTP request helpers
│   │   └── types.ts               # TypeScript interfaces
│   └── html/
│       ├── callback.ts            # OAuth callback HTML templates
│       └── logo-data.ts           # Logo (base64 embedded)
├── package.json
└── tsconfig.json

Development

npm install          # Install dependencies
npm run build        # Compile TypeScript
npm run dev          # Watch mode
node bin/claw.js     # Run locally

Requirements

  • Node.js >= 18 (uses native fetch)

Related

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Commit your changes (use Conventional Commits)
  4. Push and open a Pull Request

License

MIT - Copyright 2026 ClawApps