Skip to content

Installing the Taskless CLI

The Taskless CLI (@taskless/cli) installs the agent skill, runs rules against your codebase, and generates new rules from the terminal. There is no global install. You run the installer once with npx, and every command after that goes through a launcher it writes into your project.

The Taskless CLI requires Node.js ^20.20.0 or >=22.22.0.

Terminal window
npx @taskless/cli # install, or upgrade
./.taskless/bin/cli.mjs <command> # everything else

The installer records its version in .taskless/taskless.json and writes a launcher, ./.taskless/bin/cli.mjs, that runs exactly that version. A project’s rules are reconciled against the CLI it records, so any other version refuses every command except init, info, auth, and feedback, with CLI_VERSION_MISMATCH. That covers npx, pnpm dlx, a devDependencies install, and any other way of starting it.

So npx @taskless/cli is for installing, upgrading, and logging in. Upgrade by running the installer again with the newer CLI, which moves the record, and commit that change together with any CI step or hook that pins a version. --allow-version-mismatches (or TASKLESS_ALLOW_VERSION_MISMATCHES=1) skips the refusal, knowing the rules may not match that CLI’s engines.

@taskless/cli does not belong in your package.json. The installer names any dependency on it and suggests removing it in favour of the launcher.

Some commands (like API-backed rule generation) require authentication. Log in using a browser-based device flow:

Terminal window
npx @taskless/cli auth login
  1. The CLI displays a URL and a short code (e.g., WDJB-MJHT).
  2. Open the URL in your browser and enter the code.
  3. Approve the authorization.

auth runs from any CLI version, so npx works here even in a project pinned to another one. Your agent can log you in too: it shows you the same URL and code and waits for your approval.

To log out:

Terminal window
./.taskless/bin/cli.mjs auth logout

Run each of these as ./.taskless/bin/cli.mjs <sub-command>.

Sub-Command Description
init The install, with no prompts: what scripts and agents run in place of the bare installer
update Learn what an upgrade changed for existing rules; --rules applies and records the walk
info Show CLI version, installed tools, and auth status
detect Scan the repo for linters, languages, rule styles, CI, hooks, and host tools (offline)
onboard Find and write starter rules from your code and its history, then publish a report
check Run rules against your codebase
check --json Run rules with machine-readable JSON output
validate <path> Check that a rule has the components its engine requires
verify <path> Run a rule’s fixtures, after validating the rule itself
report Draft, publish, or delete an unlisted report on tskl.es showing what your rules catch
rule create --from <file> Generate a new rule from a JSON request file
rule improve --from <file> Improve a rule Taskless issued, with natural language guidance
rule delete <id> Remove a rule and its fixtures
rule restore <id> Put an issued rule back to its current revision after it was edited
rule rollback <id> <revisionId> Make an earlier revision of an issued rule current
auth login Authenticate with taskless.io
auth logout Clear stored authentication
feedback Send the Taskless team feedback or a bug report, or answer or dismiss the rule survey
share Show a QR code for taskless.io
agent <topic> Return a recipe for an AI coding agent to follow

Running npx @taskless/cli with no sub-command in a terminal opens the installer.

Before CLI 0.13, validate was named verify and verify was named test. test and demo no longer exist.

agent <topic> returns a recipe, meaning instructions for a coding agent to follow. The other entries are the commands those instructions run. You will use both: your agent fetches agent route to work out where a rule belongs, then runs rule create to make it.

Run ./.taskless/bin/cli.mjs agent to see the live topic list, and ./.taskless/bin/cli.mjs agent <topic> for a full recipe.

Flag Effect
-d, --dir Set the working directory
--json Output as JSON
--allow-version-mismatches Run when the project records another CLI version or a newer layout (skips migrations)
-v, --version Print the version and exit

--anonymous is 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, because they need no account either way. It is a no-op on most other commands and errors on auth login.

Terminal window
./.taskless/bin/cli.mjs rule create --from request.json --anonymous

The CLI reports anonymous usage: which command ran, whether it succeeded, how long it took, and counts of findings. It never sends rule content, prompts, or matched source. Turn it off for yourself with TASKLESS_TELEMETRY_DISABLED=1, or for everyone working in the repository, CI included, with a top-level "telemetry": false in .taskless/taskless.json. Either way no client is created and no network request is made.

Run ./.taskless/bin/cli.mjs info to verify the CLI is working and see your login status.