@ramp/cli

中文文档
0.2.90发布于 2026/11/02MITCommonJS构建来源已验证

Install and launch the standalone Ramp CLI

原始使用文档
文档目录8 节
  1. Install
  2. Quick Start
  3. Commands
  4. Resources
  5. Global Flags
  6. Tool Flags
  7. Agent Mode
  8. License

@ramp/cli

CLI for Ramp's Developer API. Authenticate with OAuth, manage expenses, approve bills, book travel, and more — from your terminal or AI agent.

Install

npm install -g @ramp/cli

Or run directly without a global install:

npx @ramp/cli --help

Requires Node.js 22+ and npm 10+ (Python is not required). Supported platforms: macOS (Apple Silicon & Intel), Linux (glibc x64 & arm64), and Windows (x64).

For one-command Ramp Router setup, see @ramp/router (npx @ramp/router).

Quick Start

ramp auth login                              # OAuth via browser
ramp users me                                # Current user details
ramp bills search --query "Acme"             # Search bills by vendor name
ramp cards list                              # List your cards (card_state shows ACTIVE)
ramp transactions list --transactions_to_retrieve my_transactions
ramp transactions list --transactions_to_retrieve my_transactions --from_date 2025-01-01
ramp transactions list --transactions_to_retrieve my_transactions --rationale "Monthly review" --agent  # JSON output for scripting
ramp router                                  # Open the Router workspace
ramp update                                  # Update to the latest release

Commands

CommandDescription
authLogin, logout, check status
configGet/set CLI configuration
envShow or set default environment (sandbox/production)
profileShow, list, or switch credential profiles
routerConnect coding agents, manage keys and strategies
applicationsApply for a Ramp account
skillsBrowse and install agent skill instructions
updateUpdate the CLI to the latest release
feedbackSubmit feedback about the CLI

Resources

12 resources, each with their own tools:

ResourceTools
accountingcategories, category-options
billssearch, get, draft, pending, approve, attachments
cardslist, activate, lock (aliases also under funds)
fundslist, activate, creds, lock
generalcomment, explain, help-center
purchase-orderssearch, get
receiptsupload, attach
reimbursementslist, pending, submit, approve, edit
requestspending, approve
transactionslist, get, approve, edit, missing, flag-missing, explain-missing, memo-suggestions, trips
travellist, create, bookings, locations
userslist, me, org-chart

Usage: ramp <resource> <tool> [OPTIONS]

Global Flags

FlagDescription
--env, -eproduction (default) or sandbox
--output, -oOutput format: json or table
--agentMachine-readable JSON output (default when piped)
--humanHuman-readable table output (default in terminal)
--wideShow all columns in table output
--quiet, -qSuppress progress output
--no-inputDisable interactive prompts (for CI/scripts)

Tool Flags

FlagDescription
--json TEXTRaw JSON request body (bypasses flags)
--dry_run, -nPrint request without sending
--page_size NResults per page
--next_page_cursorResume pagination from previous response

Run ramp <resource> <tool> --help to see all available flags for a tool.

Agent Mode

--agent outputs JSON for scripting and AI agent consumption. Pipe to jq for processing:

ramp transactions list --transactions_to_retrieve my_transactions --rationale "Monthly review" --agent | jq '.data[0]'
ramp users me --rationale "Look up my user ID" --agent | jq '.data[0].user_id'

License

MIT — see https://github.com/ramp-public/ramp-cli for full documentation and source.

版本与发布记录

@ramp/cli 共发布 26 个版本,首次发布于 2026/10/16;过去 12 个月发布了 26 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.90latest2026/11/021 天前
0.2.892026/10/303 天前
0.2.882026/10/304 天前
0.2.872026/10/294 天前
0.2.862026/10/295 天前
0.2.852026/10/295 天前

关于 @ramp/cli 的常见问题

@ramp/cli 是什么?

安装并启动独立的Ramp CLI

如何安装 @ramp/cli?

在项目目录运行 npm install @ramp/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ramp,可以用 npx ramp 直接运行。

@ramp/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ramp__cli 是否存在。

@ramp/cli 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@ramp/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ramp/cli 可以商用吗?

@ramp/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ramp/cli 还在维护吗?

最新版本 0.2.90 发布于 2026/11/02(1 天前);至今共发布 26 个版本,其中过去 12 个月发布了 26 个;首次发布于 2026/10/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。