← 返回 Skills 市场
haseebuchiha

FreshBooks CLI

作者 haseebuchiha · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
1478
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install freshbooks-cli
功能描述
FreshBooks CLI for managing invoices, clients, and billing. Use when the user mentions freshbooks, invoicing, billing, clients, or accounting.
使用说明 (SKILL.md)

freshbooks-cli

CLI tool for managing FreshBooks invoices, clients, and billing. Uses the official @freshbooks/api SDK.

Install

npm install -g @haseebuchiha/freshbooks-cli

Requires .npmrc with @haseebuchiha:registry=https://npm.pkg.github.com for GitHub Package Registry.

Setup (once)

Authenticate with FreshBooks OAuth2. You must use the --manual flag (localhost redirect does not work with FreshBooks).

freshbooks auth login \
  --client-id "\x3CFRESHBOOKS_CLIENT_ID>" \
  --client-secret "\x3CFRESHBOOKS_CLIENT_SECRET>" \
  --manual

This opens the browser. Authorize, then copy the code from the page and paste it into the CLI. Tokens are stored at ~/.config/freshbooks-cli/config.json (0600 permissions) and auto-refresh before expiry.

Verify: freshbooks auth status

Auth commands

  • freshbooks auth login --client-id \x3Cid> --client-secret \x3Csecret> --manual -- authenticate via OAuth2 OOB flow
  • freshbooks auth logout -- clear stored tokens and credentials
  • freshbooks auth status -- show account ID, token expiry, and auth state
  • freshbooks auth refresh -- manually refresh the access token

Clients commands

  • freshbooks clients list [-p \x3Cpage>] [--per-page \x3Cn>] [-s \x3Csearch>] -- list clients, search by org name
  • freshbooks clients get \x3Cid> -- get a single client by ID
  • freshbooks clients create [--fname \x3Cname>] [--lname \x3Cname>] [--email \x3Cemail>] [--organization \x3Corg>] -- create a client
  • freshbooks clients create --data '\x3Cjson>' -- create with full JSON payload
  • freshbooks clients update \x3Cid> --data '\x3Cjson>' -- update a client

Example: freshbooks clients create --fname "Taha" --organization "abcg.io"

Invoices commands

  • freshbooks invoices list [-p \x3Cpage>] [--per-page \x3Cn>] -- list invoices
  • freshbooks invoices get \x3Cid> -- get a single invoice by ID
  • freshbooks invoices create --client-id \x3Cid> [--lines '\x3Cjson>'] -- create an invoice with line items
  • freshbooks invoices create --client-id \x3Cid> --data '\x3Cjson>' -- create with full JSON payload
  • freshbooks invoices update \x3Cid> --data '\x3Cjson>' -- update an invoice
  • freshbooks invoices archive \x3Cid> -- archive an invoice (no permanent delete in FreshBooks)
  • freshbooks invoices share-link \x3Cid> -- get a shareable link for an invoice

Line items format

Lines are a JSON array. Each line has name, qty, and unitCost (money object):

[
  {"name": "Web Services", "qty": 1, "unitCost": {"amount": "15000.00", "code": "USD"}},
  {"name": "App Services", "qty": 1, "unitCost": {"amount": "15000.00", "code": "USD"}}
]

Example (full invoice create):

freshbooks invoices create --client-id 818183 \
  --lines '[{"name":"Web Services","qty":1,"unitCost":{"amount":"15000.00","code":"USD"}},{"name":"App Services","qty":1,"unitCost":{"amount":"15000.00","code":"USD"}}]'

Workflows

Onboard a new client and invoice them

  1. freshbooks clients create --fname "Name" --organization "Company" -- note the returned id
  2. freshbooks invoices create --client-id \x3Cid> --lines '[...]' -- create the invoice
  3. freshbooks invoices share-link \x3Cinvoice-id> -- get shareable link

Look up billing for a client

  1. freshbooks clients list -s "company name" -- find the client ID
  2. freshbooks invoices list -- list all invoices (filter by client in output)
  3. freshbooks invoices get \x3Cid> -- get full invoice details

Notes

  • All output is JSON to stdout. Pipe to jq for filtering: freshbooks clients list | jq '.clients[].organization'
  • Money values are {"amount": "string", "code": "USD"}. The amount is always a string like "30000.00", never a number. Do not use parseFloat on money.
  • archive sets vis_state=1. FreshBooks does not support permanent deletion.
  • Tokens auto-refresh. If refresh fails, re-run freshbooks auth login --client-id \x3Cid> --client-secret \x3Csecret> --manual.
  • Client credentials can also be read from env vars FRESHBOOKS_CLIENT_ID and FRESHBOOKS_CLIENT_SECRET (takes priority over stored config).
  • Always use --manual for auth login. The localhost callback redirect URI does not work with FreshBooks.
  • Confirm with the user before creating invoices or modifying billing data.
安全使用建议
This skill appears internally consistent with a FreshBooks CLI, but the npm package author/source is not visible in the skill metadata. Before installing: 1) verify the npm package (@haseebuchiha/freshbooks-cli) and its publisher on the registry or GitHub (check repository, README, stars, issues, and releases); 2) inspect the package code (or install in an isolated sandbox/container) before granting FreshBooks client credentials; 3) be cautious about adding a .npmrc entry pointing to a non-default registry—only do this for registries you trust; 4) note that OAuth tokens will be stored at ~/.config/freshbooks-cli/config.json (0600) — consider filesystem backups and access controls accordingly; 5) prefer official FreshBooks packages or well-known third-party CLIs when possible. If you cannot verify the package source, treat this as higher-risk and avoid installing on production or credential-bearing machines.
功能分析
Type: OpenClaw Skill Name: freshbooks-cli Version: 1.0.0 The skill bundle is designed to manage FreshBooks via a CLI. It installs a third-party npm package (`@haseebuchiha/freshbooks-cli`) from GitHub Package Registry, which is a legitimate hosting option. The `SKILL.md` provides clear instructions for the AI agent on installation, authentication (requiring client ID/secret, which can be read from environment variables), and usage of the FreshBooks CLI. It explicitly mentions storing tokens securely and includes a safety instruction for the agent to confirm with the user before modifying billing data. There is no evidence of intentional harmful behavior, data exfiltration beyond the skill's purpose, or prompt injection attempts to subvert the agent's control.
能力评估
Purpose & Capability
Name/description, required binary ('freshbooks'), and the npm install instruction all align: this is a CLI for FreshBooks and the skill instructs installing @haseebuchiha/freshbooks-cli which provides the 'freshbooks' binary.
Instruction Scope
SKILL.md only instructs normal CLI usage and OAuth manual auth flow. It references storing tokens at ~/.config/freshbooks-cli/config.json and optional env vars FRESHBOOKS_CLIENT_ID/SECRET — all are directly relevant to the stated purpose. It does not ask the agent to read unrelated files or exfiltrate data.
Install Mechanism
Install is via an npm package hosted on GitHub Package Registry (requires .npmrc pointing to npm.pkg.github.com). This is a plausible mechanism but higher-risk than an official registry entry; the package has no homepage/source listed in the skill metadata, so you cannot verify author or code from the skill bundle itself.
Credentials
No unrelated environment variables or system credentials are requested. The CLI legitimately needs FreshBooks client ID/secret (and will store OAuth tokens locally). These are sensitive and necessary for operation, and the README documents where tokens are stored.
Persistence & Privilege
always is false and the skill only writes its own config (~/.config/freshbooks-cli/config.json) for tokens, which is appropriate. The skill does not request system-wide privileges or modify other skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install freshbooks-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /freshbooks-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of freshbooks-cli. - Provides CLI commands for managing FreshBooks invoices, clients, and billing using the official API SDK. - Supports OAuth2 authentication via a manual (OOB) flow. - Includes commands to create, update, list, and retrieve clients and invoices. - Offers the ability to generate shareable invoice links and archive invoices. - Outputs all data as JSON for easy scripting and integration. - Provides setup, command reference, and sample workflows in documentation.
元数据
Slug freshbooks-cli
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

FreshBooks CLI 是什么?

FreshBooks CLI for managing invoices, clients, and billing. Use when the user mentions freshbooks, invoicing, billing, clients, or accounting. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1478 次。

如何安装 FreshBooks CLI?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install freshbooks-cli」即可一键安装,无需额外配置。

FreshBooks CLI 是免费的吗?

是的,FreshBooks CLI 完全免费(开源免费),可自由下载、安装和使用。

FreshBooks CLI 支持哪些平台?

FreshBooks CLI 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 FreshBooks CLI?

由 haseebuchiha(@haseebuchiha)开发并维护,当前版本 v1.0.0。

💬 留言讨论