Skip to main content

Install

Or, with Node.js 22 or later: npm install -g https://app.withmethod.ai/downloads/method-ai-hq-sdk-latest.tgz. The package is served by Method, not by the npm registry.

Learn

Your coding agent reads method authoring before it writes or edits a Method.

Commands

Common commands

Exit codes of method run: 0 completed, 1 failed, 2 needs human input, 3 an observer could not confirm an external change (unconfirmed). METHOD_SERVER or --server URL selects another server. An installed CLI checks for a newer release once a day and installs it in the background, with no message; the next command uses it. METHOD_NO_UPDATE=1 turns this off. A resumed run uses the release that started it.

Several accounts on one computer

method login always opens the approval page. The account that approves becomes the current account: a new account is added, and an account that this computer already has gets a new credential. The other accounts stay signed in. To add another account, open the approval link where you are signed in to that account, for example in a private window. You do not switch accounts by hand. A Method or comparison file with an id: line always uses the account that owns it, whichever account is current. A new file with no id: line uses the current account. Its runs, judgments, fixes, publishes and comparisons all use the same account. method status names the current account (person and workspace) and lists the other signed-in accounts. method logout signs out of the current account only, and says which account is current after it.

Guides