freee CLI
Look things up before answering
CLI is self-documenting. Always run these instead of guessing:
freee accounting ls [filter]-- list endpoints (filter by keyword).freee accounting get <path> --help-- show params for GET.freee accounting post <path> --help-- show params/body for POST.freee accounting <path> --help-- list available methods.
Install
If freee command is not found, ask the user to install the Go binary from this repository's GitHub Releases or build it with go build -o freee ..
Authentication
freee auth login to authenticate (opens browser).
For remote shells, use freee auth login --remote or freee configure --remote and set up port forwarding first:
ssh -L 54321:127.0.0.1:54321 <user>@<remote-host>.
Use --no-open when the CLI should print the auth URL without opening a browser.
Tokens are auto-refreshed. If 401 error occurs, run freee auth login again.
API Calls
freee accounting get deals limit==10
freee accounting post deals -d '{"type":"income","issue_date":"2025-01-15","details":[{"tax_code":1,"amount":10000}]}'
freee accounting post deals -d @body.json
cat body.json | freee accounting post deals -d -
freee accounting delete deals/123
service: accounting, hr, invoice, pm, sm
path: shorthand OK (deals = /api/1/deals)
Recipes
recipes/deal-operations.md-- 取引recipes/expense-application-operations.md-- 経費申請recipes/hr-employee-operations.md-- 人事労務recipes/hr-attendance-operations.md-- 勤怠recipes/invoice-operations.md-- 請求書recipes/receipt-operations.md-- ファイルアップロードrecipes/pm-operations.md-- 工数管理recipes/sm-operations.md-- 販売管理recipes/troubleshooting.md-- トラブルシューティング