rpforge
React Portal from the terminal. rpforge (alias rpf) works with ServiceNow instances that run React Portal:
instance profiles and sign-in, new draft portals, portals as local files you edit and push, a local preview with live
data (rpf dev), app packs onto other instances, live lookups, built-in Claude Code skills, health checks, and the Forge MCP server.
Needs Node 24 or newer, and React Portal on the instance with Forge enabled. Every call runs as your ServiceNow
user through the instance's Forge API, so your React Portal roles apply. rpforge never publishes a portal and never
deletes a record.
npm i -g @quixomatic/rpf
rpforge auth add dev --instance acme-dev --kind oauth-code
rpforge auth login dev
rpforge doctor
rpforge init # a new draft portal and its local workspace, step by step
cd hr-portal
rpforge status # local changes, instance changes, conflicts
rpforge check # format, lint, the instance compile, the push dry run
rpforge push # the dry run, then the confirmed push of exactly that plan
rpf dev # preview the portal locally; saving a file updates the page
rpforge seed ./hr-portal --profile test # an app pack onto another instance (plan first)
rpforge skills install # the agent skills into .claude/skills
claude mcp add forge -- rpforge mcp --profile dev
Commands
|
|
auth add \| list \| use \| remove \| login \| logout \| status |
Profiles: an instance and a sign-in (basic, oauth-password, oauth-client, oauth-code, bearer, apikey, mtls, session). Secrets are encrypted at rest under a key in the OS keyring |
doctor |
The instance, versions, kill switch, capabilities, local tools |
init |
A new draft portal in an application and update set you pick, pulled into a workspace |
pull, status, diff, resolve, check, push, rename |
The workspace loop: one portal as files (portal.mjs, components/, themes/, assets/), three-way status, two-step pushes with plan hashes |
new component <ns>/<key> |
Scaffolds a component folder with every file its kind needs (a widget: main.tsx with useServer, server.js, options.schema.json, styles.css, serverMode: "on-demand"); --from <example> starts from an example |
orient |
What an agent should know before working: the hard rules, the workspace, the instance (version, features), the component anatomy card, the examples, a catalog summary and a reading list; --topic <id> expands one block |
examples, examples show <id> [file], examples copy <id> |
Small, complete, original React Portal setups in the exact workspace formats (widget with a server script, options, primitive + utility, header slots, a bespoke layout, list and record pages, a side panel, a theme, a component workspace) |
seed <pack> |
Puts an app pack onto an instance that doesn't have its portal yet: preflight, one plan, then the empty draft and the push, all in the target update set |
portals, components, docs, api, themes |
Read-only lookups on the instance; themes generate makes contrast-checked tokens from a brand color locally |
skills install \| update \| list |
The built-in react-portal and react-portal-theme skills for Claude Code |
dev |
A local preview of the workspace's portal: components compiled on your machine, live instance data through a session rpf holds, saving a file updates the page. A diagnostics dock shows problems, staged server scripts, server calls, record watch and caches |
preview [route] |
Opens a route of the running rpf dev server in a browser rpf controls (read-only: rpf refuses its writes), waits until it's idle, and reports problems, console errors and server calls; --screenshot, --a11y, --show, --attach <cdp url> |
mcp |
The Forge MCP server on stdio, with a profile's settings. Includes orientation, examples and scaffold_component (local, they work without the instance), and the dev_* tools: drive the workspace's rpf dev page like a user (open, click, type, press, scroll, evaluate, accessibility tree, console, network, screenshots), in a read-only browser |
rpforge <command> --help lists every flag. For agents and CI: --json (one JSON document on stdout),
--no-interactive, --yes, --dry-run, and fixed exit codes (0 ok, 1 refused or failed, 2 usage, 3 sign-in,
4 Forge off or incompatible, 5 network).
Documentation
The full guide ships with React Portal on your instance: rpforge CLI in the Studio section of the React Portal
docs, or from the terminal:
rpforge docs read studio/rpforge
rpforge docs read studio/rpf-dev
rpforge docs read studio/forge-mcp
Compatibility
rpforge has its own version. The instance reports a Forge API level, and rpforge checks it on every command: an
older React Portal is refused with "update React Portal on the instance", a newer one gets a warning to update
rpforge. rpforge doctor shows both. rpforge 0.1 and 0.2 speak Forge API level 1 (React Portal 1.53.0 or later). What changed: CHANGELOG.md.
License
MIT, copyright TurboForge LLC, for this package. React Portal itself (the ServiceNow application) is a separate,
proprietary product: its component records are fetched from your instance with your own rights and are never part of
this package. The rpf dev host bundles React, Base UI, lucide, TanStack, sonner, cva, clsx, tailwind-merge,
dnd-kit, Recharts, CodeMirror and TipTap, under their own licenses (MIT, ISC, Apache-2.0 for cva, BSD-3-Clause parts
in Recharts' d3 build); their notices are in assets/dev-host/THIRD_PARTY_NOTICES.txt. The React Portal
logo in the host kit is a trademark: the license covers the code, not the mark for use in other products.