Install
$ npm install -g reqraft# or run without installing:$ npx reqraft --help
Requires Node.js ≥ 18. The binary is reqraft. Run reqraft <command> --help for the options of any command.
Sign in
Reqraft uses the OAuth 2.0 Device Authorization flow — no passwords or tokens to copy by hand:
$ reqraft loginSigning in to https://reqraft.inOpen this URL to approve the login:https://reqraft.in/device?user_code=XXXX-XXXXYour device code: XXXX-XXXX
It prints a URL and a short code, opens your browser, and waits while you approve the request. If you belong to exactly one organization it becomes active automatically; otherwise pick one with reqraft org use <slug>. The credential is stored at ~/.reqraft/config.json (mode 0600).
For CI / headless use, set a token in the environment instead:
$ export REQRAFT_TOKEN="<token>"
Global flags
Global flags go before the subcommand, e.g. reqraft --json feature list.
--jsonMachine-readable JSON output, for scripting and CI.--api <url>Target a non-default deployment for this call (persisted on login).--org <slug>Run against a specific organization for this call.Configuration
The API base URL resolves in this order: --api flag → REQRAFT_API_URL env → stored config → default https://reqraft.in. Login always prints which deployment it targets, and only persists a URL you passed explicitly.
reqraft config listShow the effective configuration (token redacted).reqraft config set-api <url>Pin the CLI to a self-hosted or staging deployment.reqraft config unset-apiGo back to the default https://reqraft.in.reqraft config pathPrint the config file location.reqraft pingCheck the configured deployment is reachable (+ latency).reqraft whoamiSigned-in user, active org, and API URL.reqraft logoutRemove stored credentials from this machine.Organizations & workspace
reqraft org listOrganizations you belong to (* marks the active one).reqraft org use <slug>Set the active organization.reqraft project listProjects in the active organization.reqraft member listTeammates, roles, and email verification state.reqraft statusPipeline snapshot: features by status, review cycles.reqraft search <query>Search projects, features, tasks, PRDs, repos, reviews.Features
$ reqraft feature list [--status prd_ready] [--project <id>]$ reqraft feature create --title "Dark mode" --description "Add a theme toggle" [--priority high]$ reqraft feature show <featureId>$ reqraft feature clarify <featureId> "Target users are mobile web visitors"$ reqraft feature open <featureId>
Managers can drive the approval pipeline end to end:
# feature in review → approved$ reqraft feature approve <featureId> [--notes <notes>]# reject with a reason → blocked$ reqraft feature reject <featureId> "Needs a security review first"# approved → shipped 🚀$ reqraft feature ship <featureId>
PRDs
# trigger PRD generation / regeneration$ reqraft prd generate <featureId># print the PRD (markdown)$ reqraft prd show <featureId># approve the PRD → generates engineering tasks$ reqraft prd approve <featureId># save the PRD as a PDF$ reqraft prd download <featureId> [-o dark-mode.pdf]# email the PRD (PDF attached) to anyone$ reqraft prd share <featureId> --to pm@company.com --message "Please review"
prd share sends to teammates and outside addresses alike; teammates must have a verified email — check with reqraft member list.
AI prompts
Generate a copy-paste-ready implementation prompt for an AI coding agent — from a feature's approved PRD, or from a plain description with no PRD at all.
# the feature's implementation prompt (cached per tech stack)$ reqraft prompt feature <featureId> [--stack <stack>]# force a fresh generation (spends a generation credit)$ reqraft prompt feature <featureId> --regenerate# save it as markdown for your agent$ reqraft prompt feature <featureId> -o prompt.md# one-shot prompt from a plain message — no PRD needed$ reqraft prompt quick "a pomodoro timer web app" --stack "HTML + CSS + JS"
The prompt covers the goal, exact tech stack, files to create (and how they link), ordered build steps, inputs & outputs, and acceptance criteria. Omit --stack on quick and the AI picks a sensible minimal stack.
Tasks
reqraft task list <featureId>The feature's task board, grouped by status.reqraft task mineTasks assigned to you, across all organizations.reqraft task start <taskId>Move a task to in_progress.reqraft task done <taskId>Mark a task as done.reqraft task move <taskId> <status>Any move: todo, in_progress, done, blocked (--reason).reqraft task assign <taskId> <who>Assign by email, name, or "me".reqraft task notes <taskId>Read a task's discussion thread.reqraft task note <taskId> <text…>Add a note to the thread.Reviews
$ reqraft review list [--status passed|failed|running]$ reqraft review show <cycleId>$ reqraft review resolve <issueId>
Scripting & CI
Every command supports --json, so output pipes cleanly into jq:
# full ids of all features that are ready for PRD review$ reqraft --json feature list | jq -r '.[] | select(.status == "prd_ready") | .id'# fail a CI step if any AI review cycle failed$ test "$(reqraft --json review list --status failed | jq length)" = "0"
In CI, authenticate with REQRAFT_TOKEN and pin the deployment with REQRAFT_API_URL — no interactive login needed.
Troubleshooting
Login opens the wrong URL (an old dev or staging domain).
The CLI is pinned to another deployment. Check with reqraft config list, reset with reqraft config unset-api, then reqraft login again.
“You're not signed in” or 401 errors.
Your token expired or belongs to a different deployment — run reqraft login.
“Select an organization before accessing this resource.”
Run reqraft org use <slug> once, or pass --org <slug> per command.
No browser opens on login.
Headless environments can't spawn a browser — open the printed URL on any device and enter the device code.
How it works
The CLI is a thin, fully type-safe tRPC client against the same API the web app uses; its types are derived from the server's router, so the CLI can never drift from the API. Authentication rides on BetterAuth's device grant and bearer tokens.
Ready to try it? Create an account and run reqraft login.