The Graft CLI
graft is Graft from the terminal. Anything the web app can do through the API, the CLI can do, with a sign-in that never asks for your password and commands you can pipe, script and schedule.
graft login --url https://your-graft-hostgraft entities listgraft orders list --json | jq '.[] | select(.status == "pending_payment")'What it is good for
Section titled “What it is good for”- Day-to-day management. Add a record, confirm an order, publish a form, invite a teammate, without opening the browser.
- Bulk work. Page through every submission, export every order, import a CSV, apply the same change to fifty records.
- Reports and scripts.
--jsonprints exactly what the API returns, sojq, spreadsheets and cron jobs work with it directly. - Several environments. Keep separate sign-ins for QA and production and switch with one flag.
- AI assistants. The Graft skill uses the CLI as its way in. See Scripting and automation.
Install
Section titled “Install”You need Node.js 20 or newer. There are no other dependencies.
npm install -g @graft/cligraft --versionIf you work from a checkout of the Graft repository instead, npm run cli -- <command> runs the same program from source, and npm run cli:build produces the installable build in cli/dist.
A two-minute tour
Section titled “A two-minute tour”graft login --url https://your-graft-host # approve the one-time code in your browsergraft whoami # who and where you aregraft help # the areas and flagsgraft commands # every command, with its endpointgraft describe orders transitions # what one command does, with examplesWhere to go next
Section titled “Where to go next”| If you want to… | Read |
|---|---|
| Sign in, switch workspace or use several servers | Signing in |
| Understand how commands, flags and output work | Using the CLI |
| See real tasks from start to finish | Walkthrough: run a workspace |
| Script it, use it in CI, or let an assistant use it | Scripting and automation |
| Look up one command | Command reference |
| Fix something that isn’t working | Troubleshooting |