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

@remotedraw/cli

v0.5.0

Published

Command-line tools for creating and inspecting RemoteDraw integrations.

Readme

RemoteDraw CLI

Set up RemoteDraw in a new or existing app from your terminal. The CLI guides you through choosing an integration, signs in through the RemoteDraw dashboard, creates the matching project and development API key, and writes starter code for your chosen stack.

Install

RemoteDraw requires Node.js 20 or newer. Use whichever package manager your project already uses — the CLI reads the project's lockfile and packageManager field, and prints its own next steps in that manager's commands.

npm install -g @remotedraw/cli     # npm
pnpm add -g @remotedraw/cli        # pnpm
bun add -g @remotedraw/cli         # bun
remotedraw --version

Yarn Berry has no global install, so run it straight from the registry — which also works everywhere else, when you would rather not install anything:

yarn dlx @remotedraw/cli   # Yarn
npx @remotedraw/cli@latest # npm
pnpm dlx @remotedraw/cli   # pnpm
bunx @remotedraw/cli       # bun

Start here

Run the guided setup:

remotedraw

In an existing project, the CLI detects local RemoteDraw configuration and shows commands to check the integration. For an unconfigured app, it suggests scan and init. Detection checks the current directory and ancestors up to the repository boundary, without network requests or a recursive scan.

In an empty directory, the setup wizard helps you choose a target, sender, SDK, and starter preset. Browser login starts only after you confirm creation. To deliberately create a separate app and cloud project, use remotedraw new.

To see the available integration paths without starting the wizard:

remotedraw guide

Language

The first interactive run asks which language the CLI should speak, listing each language under its own name:

? Language / Taal
❯ ◉ English    en
  ○ Nederlands nl

The answer is stored once in your user config directory and reused by every later command, so the question is asked once per machine rather than once per run. Change it at any time:

remotedraw language        # pick interactively, or list the current setting
remotedraw language nl     # set it directly

Non-interactive callers never see the prompt. A run without a stored choice, a TTY, or an override speaks English. To force a language for one command or for a whole CI job:

remotedraw doctor --language nl
REMOTEDRAW_LANGUAGE=nl remotedraw doctor

Precedence is --language (or --lang), then REMOTEDRAW_LANGUAGE / REMOTEDRAW_LANG, then the stored choice, then English. An unrecognized code fails with the list of supported languages rather than guessing.

Machine-readable output is always English regardless of the stored language: --format json on any command, and create-input --json. It is a data interchange format for CI and coding agents, not chrome for the operator, and enum values are identifiers that are never translated. Passing --language <code> on that same invocation is a deliberate request and does localize the human-readable label, summary, and explanation fields; a stored choice or an environment variable does not. JSON error.code values are declared at the point the error is raised, so they never change with language.

Localization covers CLI chrome only: prompts, help, summaries, doctor output, and error messages. Everything the CLI writes into your project stays English — generated code, comments, README files, package.json fields, and API request payloads. Those artifacts are committed, reviewed, diffed, and read by teammates and coding agents who may not share your CLI language, and they sit next to English API identifiers and documentation.

Currently shipping English and Dutch. A language is added by dropping one catalog file into src/locales/ and registering it in src/locales/index.ts; no call site changes, and anything a catalog omits falls back to English.

Create a new app

Start the interactive project creator:

remotedraw new

Or provide the setup choices directly:

remotedraw new \
  --app-name MyApp \
  --target web \
  --sender remotedraw-ios \
  --sdk react

Add RemoteDraw to an existing app

Run init from the project you want to update:

cd my-existing-app
remotedraw init

You can also choose the integration explicitly:

remotedraw init \
  --target web \
  --sender embedded-web \
  --sdk react

Before writing, the interactive flow shows a review and asks for explicit confirmation. Existing files are protected unless you intentionally pass --force.

Check an integration

Use doctor after setup or when troubleshooting:

remotedraw doctor

It checks the project configuration, installed packages, environment values, the installed CLI version, and—when credentials are available—the RemoteDraw API connection.

Without an override, commands talk to https://api.remotedraw.com. Doctor prints the API base URL it resolved and where that value came from, so a .env.local pointing at a non-production deployment is visible rather than silent.

Update the CLI

npm install -g pins the version it installed and never revisits it, so a global RemoteDraw CLI stays on whatever release you first installed:

remotedraw update           # install the latest published version
remotedraw update --check   # report it without installing

update detects whether the binary came from npm, pnpm, yarn, or bun — and whether it was run through npx/pnpm dlx/yarn dlx/bunx, which fetch the latest release every time and so have nothing to update — then runs that manager's own command. Other commands check the registry at most once a day and print a one-line notice when a newer version exists; that notice only appears on an interactive terminal, and REMOTEDRAW_CLI_NO_UPDATE_CHECK=1, CI, or NO_UPDATE_NOTIFIER disable it.

Useful account commands:

remotedraw login
remotedraw whoami
remotedraw logout

Generated files and credentials

Depending on your selected integration, new and init create or update:

  • remotedraw.config.json
  • .env.example
  • .env.local
  • starter files under src/remotedraw

The generated .env.local contains the project runtime values and should stay gitignored. The CLI adds the .env.local rule to the project's .gitignore before writing the key and writes the file with mode 0600. When the rule cannot be written, or git still does not ignore the file (already tracked, or a later rule re-includes it), the summary and the JSON warnings say so. The .gitignore rule is listed as written only when it is in place:

REMOTEDRAW_API_BASE_URL=https://api.remotedraw.com
REMOTEDRAW_PROJECT_ID=...
REMOTEDRAW_API_KEY=rd_sk_...

The account-level rd_cli_... credential is stored separately with restricted file permissions in $XDG_CONFIG_HOME/remotedraw/config.json or ~/.config/remotedraw/config.json. It is never copied into a project. Run remotedraw logout to revoke and remove it.

Use --offline when you only want local scaffolding and do not want to create a RemoteDraw cloud project.

Automation and coding agents

CI and coding agents should use the machine-readable, non-interactive flow:

remotedraw options --format json

remotedraw new \
  --non-interactive \
  --offline \
  --dry-run \
  --format json \
  --app-name AgentDesk \
  --target web \
  --sender remotedraw-ios \
  --sdk react \
  --preset sketch \
  --package-manager npm

remotedraw doctor --format json

--non-interactive prevents prompts and browser authorization. JSON dry runs return the resolved plan, defaults, files, warnings, cloud mode, and suggested next commands. Inspect the result before rerunning without --dry-run.

For authenticated CI provisioning, provide REMOTEDRAW_CLI_TOKEN as a secret.

The CLI can also print or install the RemoteDraw skill for coding agents:

remotedraw agent --print-skill
remotedraw agent --path .agents/skills/remotedraw --force
remotedraw agent --path .claude/skills/remotedraw --force

Before scaffolding into an existing app, read it first. scan names the web, server, and iOS projects in a tree, where an rd_sk_ key may live, any RemoteDraw wiring already present, the integration options that fit, and the product questions to settle with the user before building:

remotedraw scan --format json
remotedraw scan --path apps/customer-web

When the integration already has its files and only needs credentials, provision without scaffolding (and without --force):

remotedraw project create --name "Field Notes" --env server   # writes server/.env.local
remotedraw project create --name "Field Notes" --format json  # prints the key once

--env adds .env.local to the .gitignore next to it before creating the project, then writes the file with mode 0600 (an existing file is tightened before the key goes in). If that rule cannot be written, the command stops without creating a project or key. If git reports the file as tracked or re-included by a later rule, the text output and the JSON warning field say so.

Command reference

guide          Choose an integration path and SDK.
options        Print setup choices and compatibility metadata.
language       Choose the language of this CLI.
login          Authorize this computer through the dashboard.
logout         Revoke and remove this computer's CLI credential.
whoami         Show the signed-in RemoteDraw account.
new            Create a new app with RemoteDraw starter code.
init           Add RemoteDraw starter code to an existing project.
dev            Print the local sandbox workflow for an integration.
doctor         Check project config, packages, and environment variables.
create-input   Create or print a test input request payload.
examples       List or install example projects.
agent          Print or install the RemoteDraw agent skill.
scan           Read a codebase and propose where RemoteDraw fits.
project        Create a dashboard project and API key without scaffolding.

Run remotedraw <command> --help for command-specific options.

Links

Contributing

This section is for contributors working inside the RemoteDraw repository:

bun install
bun run cli -- --help
cd packages/cli
bun run verify:publish
npm pack --dry-run