Skip to content

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.

Terminal window
graft login --url https://your-graft-host
graft entities list
graft orders list --json | jq '.[] | select(.status == "pending_payment")'
  • 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. --json prints exactly what the API returns, so jq, 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.

You need Node.js 20 or newer. There are no other dependencies.

Terminal window
npm install -g @graft/cli
graft --version

If 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.

Terminal window
graft login --url https://your-graft-host # approve the one-time code in your browser
graft whoami # who and where you are
graft help # the areas and flags
graft commands # every command, with its endpoint
graft describe orders transitions # what one command does, with examples
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