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

@inquir/compute-cli

v0.1.2

Published

Workspace-first CLI for Inquir Compute.

Readme

@inquir/compute-cli

CLI for workspace-first Inquir Compute development.

Install

Global:

npm install -g @inquir/compute-cli

Or run with npx:

npx @inquir/compute-cli --help

Concepts

  • Function: a single compute unit with typed input/output (Zod schemas). Defined with defineFunction(). Run locally with inquir run, deployed and invoked remotely with inquir deploy / inquir invoke.
  • Pipeline: a declarative DAG of functions defined with definePipeline(). Registered in the codegen registry for client use; remote run/deploy for pipelines is handled by the backend.
  • Client: the generated TypeScript module at .inquir/generated/client.ts. Wraps remote invocation with schemas inferred from your source. Import it in your application code.
  • Source of truth: your local files under functionsDir and pipelinesDir. registry.json is a derived artifact rebuilt by inquir codegen — never hand-edit it.
  • Local ↔ remote link: each deployed remote function stores a linkedLocalName (your local asset name) and a sourceHash. inquir sync status compares hashes to detect drift.

Quick Start

inquir init
inquir codegen
inquir list
inquir run hello --payload '{"name":"World"}'

Authentication

The recommended way to authenticate on your own machine is a browser login, which mints a user-scoped Personal Access Token (PAT) bound to your account and stores it in ~/.inquir/config.json:

inquir login                 # opens your browser to approve this device
inquir whoami                # show the signed-in user + active workspace

inquir login prints a short code and opens a dashboard page; confirm the code matches and click Authorize. The CLI then receives its token automatically.

Other login modes:

inquir login --browserless   # print the URL + code instead of opening a browser
inquir login --token <pat>   # non-interactive (CI): use a PAT created in the dashboard
inquir login --name "my CI"  # label the device/token shown in the dashboard

Create and revoke PATs from the dashboard under API Keys → Personal Access Tokens. To sign out and remove the stored token: inquir logout.

A PAT can deploy to any workspace you belong to. A workspace-scoped API key is pinned to a single workspace and ignores workspace switching.

Workspaces

A single login works across every workspace you're a member of. List them and choose a default:

inquir workspaces            # list workspaces (active one marked with *)
inquir use <slug|id>         # set the active workspace for subsequent commands

Target a different workspace for a single command with --workspace:

inquir deploy hello --workspace acme-prod
inquir deploys hello --workspace acme-prod
inquir whoami --workspace acme-prod

Under the hood, user-scoped credentials send an X-Inquir-Workspace header; the server verifies your membership before honoring it.

Deploy a function (remote)

Once installed globally, deploying takes three steps:

# 1. Authenticate. Easiest on a workstation:
inquir login
#    For CI / scripts, export env vars for a one-off instead:
#      export INQUIR_API_URL="https://api.inquir.org"
#      export INQUIR_API_KEY="<api-key>"      # workspace-scoped key, or
#      export INQUIR_TOKEN="<personal-access-token>"

# 2. From your workspace (created by `inquir init`), deploy an asset by name.
inquir deploy hello                 # streams build/deploy logs, exits non-zero on failure

# 3. Invoke it remotely.
inquir invoke hello --payload '{"name":"World"}'

Get an API key from your Inquir Compute workspace settings. For CI, prefer the inquir-compute/deploy-action GitHub Action (supports keyless OIDC auth), or run inquir deploy --ci.

Commands

  • inquir init [--skip-install] - scaffold inquir.config.json, folders, and sample function.
  • inquir codegen - discover assets and generate .inquir/generated/client.ts + registry.json.
  • inquir list - list discovered local assets.
  • inquir run <asset> - run a local asset.
  • inquir debug <asset> - run locally with inspector enabled.
  • inquir login - authenticate the CLI (browser pairing, --browserless, or --token).
  • inquir logout - remove the stored token + active workspace for the current environment.
  • inquir whoami - show the signed-in user, active workspace, and role.
  • inquir workspaces - list the workspaces you belong to.
  • inquir use <slug|id> - set the active workspace for subsequent commands.
  • inquir invoke <asset> - invoke remote function by name / linked local name.
  • inquir deploy <asset> - package, upload, and deploy a function (async; streams build logs).
  • inquir deploys <function> - list deploy history for a remote function.
  • inquir status <deployId> - show a deploy's status (--follow to stream logs).
  • inquir rollback <function> [deployId] - roll back to a previous successful deploy.
  • inquir logs <asset> - show recent remote invocation history.
  • inquir sync status - compare local hashes with remote hashes (in-sync, drift, missing).

deploy flags

inquir deploy hello                 # package + async deploy, stream build logs
inquir deploy hello --environment staging
inquir deploy hello --no-logs       # queue and wait for completion without streaming
inquir deploy hello --ci            # plain output, non-zero exit on failure (for CI)
inquir deploy hello --dry-run       # validate + package only; no create/deploy
inquir deploy hello --json          # machine-readable result

Exit codes: 0 success, 1 deploy/validation error, 3 network/timeout error.

Global Flags

  • --config <path> - config file path or workspace directory.
  • --json - machine-readable output when supported.
  • --env <name> - select environment from auth config.
  • --workspace <slug|id> - target a specific workspace for this command (user-scoped login).

Global flags work in any position, for example both are valid:

inquir run hello --config ./inquir.config.json
inquir --config ./inquir.config.json run hello

Payload Input

run and invoke support:

  • --payload '{"k":"v"}'
  • --payload-file ./payload.json
  • stdin piping

Remote Auth / Environment

The CLI resolves each credential field independently, in this order (first match wins):

  1. CLI flags / --env <name> selection (and --workspace for the workspace)
  2. Environment variables (LAMBDA_* are legacy fallbacks):
    • INQUIR_API_URL, INQUIR_API_KEY
    • INQUIR_TOKEN — a Personal Access Token (takes precedence over apiKey)
    • INQUIR_WORKSPACE — active workspace (slug or id)
    • INQUIR_ENV — pick a named environment
  3. Selected environment in the config file
  4. Top-level config file values
  5. Default apiUrl of https://api.inquir.org (override with env/config for local dev)

When both a token (PAT) and an apiKey are present, the PAT wins. The active workspaceId is only applied to user-scoped credentials (PAT/session); for a workspace-scoped API key it is ignored unless you pass --workspace explicitly.

Config file locations:

  • ~/.inquir/config.json (preferred, written by inquir login / use)
  • ~/.lambda-cli/config.json (legacy fallback)

Example (written/managed by inquir login, inquir use, inquir logout):

{
  "apiUrl": "https://api.inquir.org",
  "token": "inq_pat_…",
  "workspaceId": "acme-prod",
  "user": { "id": "…", "email": "[email protected]", "name": "You" },
  "environments": {
    "staging": {
      "apiUrl": "https://staging.example.com",
      "apiKey": "staging-key"
    }
  }
}

Publishing to npm (maintainers)

The CLI (@inquir/compute-cli) depends on the SDK (@inquir/compute), so the SDK must be published first at a version satisfying the CLI's dependency range (dependencies["@inquir/compute"], currently ^0.1.0).

Prerequisites:

  • An npm account with publish access to the @inquir scope (create the org/scope on npmjs.com), then npm login.
  • Both packages declare "publishConfig": { "access": "public" }, so scoped packages publish publicly.
  • Each package's prepublishOnly rebuilds dist/ automatically; only dist/ ships (files: ["dist"]).

Steps (run from the repo root):

npm login

# 1) Publish the SDK first — the CLI resolves it from the public registry.
npm version <patch|minor|major> --workspace @inquir/compute
npm publish --workspace @inquir/compute

# 2) Publish the CLI. Ensure its @inquir/compute dependency range covers the
#    SDK version you just published, then:
npm version <patch|minor|major> --workspace @inquir/compute-cli
npm publish --workspace @inquir/compute-cli

Tips:

  • Preview the exact tarball contents without publishing: npm publish --dry-run --workspace @inquir/compute-cli.
  • The published bin is inquir (from dist/index.js, which keeps its #!/usr/bin/env node shebang).
  • After publishing, anyone can install and deploy:
npm install -g @inquir/compute-cli
inquir --help