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 agent <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 agent <topic>.

Terminal window
npx @taskless/cli info

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

agent returns a recipe for an agent to follow; the commands below are what those recipes run.

Commands:

Topic Summary
init Install or upgrade the Taskless skill in detected tools, no questions asked
update Learn what an upgrade changed for existing rules, or record a reconciliation
info Show CLI version, installed tools, and auth status
detect Scan the repo for configured linters, languages, and rule styles (offline)
check Run rules against your codebase
auth Manage authentication with taskless.io
rule Create, improve, and delete rules
onboard Guided post-install pass that surfaces rule candidates from your project
verify Check that a rule has the components its engine requires
test Run a rule’s tests, after verifying the rule itself
demo Write an example rule into this project
feedback Answer or dismiss the short survey a recipe occasionally invites

Running the CLI with no sub-command in a terminal opens the install wizard; init is that install without the wizard, for agents, scripts, and CI.

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

These are recipe-only topics, reachable as npx @taskless/cli agent <topic> rather than as bare commands.

Topic Summary
route Decide which recipe authors a rule. Start here
create-legacy-rule Author a rule in a linter the repo already uses, in that tool’s dialect
create-sg-rule Author a local ast-grep rule over code (no login)
create-vale-rule Author a local Vale rule over prose (no login)
create-runtime-rule The runtime engine, and why it needs Taskless Cloud
create-remote-rule Generate a rule via the Taskless service (login)
improve-rule Iterate on an existing rule
delete-rule Remove a rule and its tests
ci Wire 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 agent detect for its recipe. Run npx @taskless/cli agent (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. On check it skips runtime rules; your sg and vale rules still run, since they need no account either way. It 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 agent <topic>.