Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@findagent/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@findagent/cli
The findagent command-line installer for the FindAgent
cross-LLM agent marketplace. One command installs a published agent into Claude,
ChatGPT, Gemini, or Cursor.
Installation
# Install globally
npm i -g @findagent/cli
# …or run ad-hoc without installing
npx @findagent/cli <command>Usage
# Install an agent into Claude Code (default target)
findagent install pr-reviewer
# Pin a version and target Cursor
findagent install pr-reviewer@1.2.0 --llm cursor
# Preview what would be written, no filesystem changes
findagent install pr-reviewer --llm claude --dry-run
# Authenticate (needed for paid / gated agents)
findagent login # OAuth device flow (opens the /device page)
findagent login --token <jwt> # paste-a-token fallback
findagent whoami
findagent logout--llm targets
| Target | Aliases | Lands in |
|---|---|---|
claude |
claude-code |
.claude/agents/ |
chatgpt |
openai, gpt |
.findagent/chatgpt/ |
gemini |
google |
.findagent/gemini/ |
cursor |
— | .cursor/rules/ |
custom |
generic |
.findagent/ |
Configuration
| Env var | Default | Purpose |
|---|---|---|
FINDAGENT_API |
https://beta.findagent.cloud |
API base (override for staging) |
NO_COLOR |
— | Disable ANSI color output |
Credentials are stored owner-only (mode 0600) in the OS config dir:
- macOS / Linux:
$XDG_CONFIG_HOME/findagent/auth.json(or~/.config/findagent/) - Windows:
%APPDATA%\findagent\auth.json
Parity with the web installer
The CLI and the web installer at /install/<slug> produce the identical
install artifact. Both consume the same marketplace endpoint
(GET /api/v1/agents/<slug>/install-bundle?llm=<target>), whose response shape
is the shared installBundleResponseSchema in @findagent/schema. The server
renders the findagent/v1 manifest and per-LLM files; the CLI decodes the
returned files[] and writes them verbatim.
Paid agents are gated the same way as the web flow: an unpurchased paid agent
returns 402 and the CLI refuses with a clear message instead of writing
anything.
Authentication — device flow
findagent login (without --token) runs an OAuth 2.0 Device Authorization
Grant (RFC 8628), backed by these endpoints:
POST /api/auth/device/code→{ device_code, user_code, verification_uri, expires_in, interval }POST /api/auth/device/token→ polls;authorization_pending/slow_downuntil approval, then{ access_token, refresh_token? }
The CLI prints a user_code and the verification_uri (the /device confirm
page); approve there in the browser and the CLI completes the poll automatically.
findagent login --token <jwt> remains as a paste-a-token fallback. See
src/lib/device-flow.ts for the full contract.