Skip to content

Taskless CLI

The Taskless CLI (@taskless/cli) manages rules, runs checks, and installs the agent skill. It ships as an npm package and runs via npx without a global install.

  • For humans: run npx @taskless/cli (no args) to install or update Taskless in this repository.
  • For agents: the installed skill is a thin router. When an agent needs to act, it runs npx @taskless/cli help <topic> to fetch the canonical recipe (Goal, Preconditions, Steps, Schema, Errors, See Also) and follows it.

The docs site covers the human-facing surface. For the full machine-readable recipe behind any sub-command, run npx @taskless/cli help <topic>.

Terminal window
npx @taskless/cli info

Most CLI topics have a corresponding help recipe. Run npx @taskless/cli help <topic> for the full recipe.

Commands:

TopicSummary
initInstall or update the Taskless skill in detected tools (interactive)
updateNon-interactive equivalent of init
infoShow CLI version, installed tools, and auth status
detectScan the repo for configured linters, languages, and rule styles (offline)
checkRun rules against your codebase
authManage authentication with taskless.io
ruleCreate, improve, and delete rules
onboardGuided post-install pass that surfaces rule candidates from your project

Authoring recipes. Where a new rule is authored and routed, plus wiring checks into CI (see Authoring Rules):

TopicSummary
routeDecide where a rule is authored (existing / static / remote)
existingAuthor a rule in a linter the repo already uses
staticAuthor a local ast-grep rule on this machine (no login)
remoteGenerate a rule via the Taskless service (login)
ciWire taskless check into your CI (see Continuous Integration)

Run npx @taskless/cli detect --json to see the repo scan detect produces, or npx @taskless/cli help detect for its recipe. Run npx @taskless/cli help (no args) for the live topic list.

--anonymous is a top-level flag accepted on every command. It forces local-only behavior on rule create and rule improve (skipping the Taskless API), makes check run only static rules (skipping runtime rules), is a no-op on most other commands, and errors on auth login. Pass it to keep everything on-device without sending anything to taskless.io.

When you pass --json and a command fails, the CLI emits a stable error shape with a code field (e.g., AUTH_REQUIRED, NO_GITHUB_REMOTE, RULE_GENERATION_FAILED). Recipes can branch on this code without parsing prose. For the per-topic error catalog, see the Errors section in npx @taskless/cli help <topic>.