@taskless/cli 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -195
- package/dist/index.js +13167 -17243
- package/dist/prompts/index.d.ts +89 -0
- package/dist/prompts/recipes.d.ts +89 -0
- package/dist/prompts.js +53 -0
- package/dist/recipes-C_i98mTO.js +6975 -0
- package/dist/rules/capabilities.d.ts +311 -0
- package/dist/schemas/rules-create.d.ts +18 -0
- package/dist/schemas/rules-improve.d.ts +21 -0
- package/dist/util/invocation.d.ts +42 -0
- package/package.json +24 -13
package/README.md
CHANGED
|
@@ -1,235 +1,105 @@
|
|
|
1
1
|
# @taskless/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@taskless/cli)
|
|
4
|
+
[](https://github.com/taskless/cli/actions/workflows/validate.yml?query=branch%3Amain)
|
|
5
|
+
[](https://www.npmjs.com/package/@taskless/cli-nightly)
|
|
6
|
+
[](https://github.com/errata-ai/vale/releases)
|
|
7
|
+
[](https://github.com/ast-grep/ast-grep/releases)
|
|
4
8
|
|
|
5
|
-
CLI companion for [Taskless](https://taskless.io). Designed to
|
|
9
|
+
CLI companion for [Taskless](https://taskless.io). Designed to work with agent skills to add constraints that improve coding agent output.
|
|
6
10
|
|
|
7
|
-
##
|
|
11
|
+
## Install
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
|
-
|
|
11
|
-
npx @taskless/cli@latest info
|
|
12
|
-
|
|
13
|
-
# pnpm
|
|
14
|
-
pnpm dlx @taskless/cli@latest info
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Commands
|
|
18
|
-
|
|
19
|
-
### `taskless info`
|
|
20
|
-
|
|
21
|
-
Outputs CLI version, tool status, and login info as JSON to stdout:
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"version": "0.0.3",
|
|
26
|
-
"tools": [],
|
|
27
|
-
"loggedIn": true,
|
|
28
|
-
"auth": { "user": "jake", "email": "jake@example.com", "orgs": ["my-org"] }
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### `taskless init`
|
|
33
|
-
|
|
34
|
-
Launches an interactive wizard that detects supported tool directories in the
|
|
35
|
-
current project (`.claude/`, `.opencode/`, `.cursor/`, `.agents/`), asks which
|
|
36
|
-
tools to enable Taskless for, and walks through the auth tradeoff before
|
|
37
|
-
writing anything. Running `taskless` with no subcommand in a TTY also launches
|
|
38
|
-
this wizard. Without a TTY, bare `taskless` prints a short context preamble
|
|
39
|
-
followed by the topic index from `taskless help`.
|
|
40
|
-
|
|
41
|
-
In v0.7+, there is exactly one skill (`taskless`) and one command (`tskl`) —
|
|
42
|
-
no opt-in selection needed.
|
|
43
|
-
|
|
44
|
-
The skill and command content is written **once** to a canonical store in
|
|
45
|
-
`.taskless/skills/` and `.taskless/commands/`. Each enabled tool directory
|
|
46
|
-
receives only a thin reference stub — an ordinary file with a delegating body,
|
|
47
|
-
never a symlink — so there is a single source of truth and no drift between
|
|
48
|
-
copies. Stale layouts from earlier versions (full per-tool copies, symlinks)
|
|
49
|
-
are converged into stubs automatically on the next `init`/`update`.
|
|
50
|
-
|
|
51
|
-
For CI and scripted installs, pass `--no-interactive` to skip all prompts:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
taskless init # interactive wizard (default in a TTY)
|
|
55
|
-
taskless init --no-interactive # scripted install, no prompts
|
|
14
|
+
npx @taskless/cli
|
|
56
15
|
```
|
|
57
16
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
skills and commands during this diff. Cancelling the wizard at any step
|
|
62
|
-
(Ctrl-C) aborts cleanly with no filesystem changes.
|
|
63
|
-
|
|
64
|
-
### `taskless onboard`
|
|
65
|
-
|
|
66
|
-
Post-install discovery flow that helps a fresh user go from zero rules to a
|
|
67
|
-
useful starter set. Run it after `taskless init`. The CLI prints an
|
|
68
|
-
agent-facing recipe that walks the host AI tool through scanning the
|
|
69
|
-
codebase, agent-memory files (CLAUDE.md / AGENTS.md / .cursorrules),
|
|
70
|
-
recent PR review comments (when `gh` is available), and issue tracker
|
|
71
|
-
tickets (when a relevant MCP is wired in) for high-signal rule
|
|
72
|
-
candidates, then surfaces them as a bullet list the user can choose to
|
|
73
|
-
materialize via `taskless rule create`.
|
|
17
|
+
Run with no arguments in a terminal to launch the installer, which detects the
|
|
18
|
+
agent tools in your project (Claude Code, Cursor, OpenCode) and installs into
|
|
19
|
+
each of them. For scripted installs, skip the prompts:
|
|
74
20
|
|
|
75
21
|
```bash
|
|
76
|
-
taskless
|
|
77
|
-
taskless onboard --force # re-run even when previously marked complete
|
|
78
|
-
taskless onboard --mark-complete # record completion in .taskless/taskless.json
|
|
79
|
-
# (invoked by the agent after explicit user
|
|
80
|
-
# confirmation; never automatically)
|
|
22
|
+
npx @taskless/cli init --no-interactive
|
|
81
23
|
```
|
|
82
24
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Only the agent writes it, and only with the user's explicit confirmation.
|
|
86
|
-
`taskless init` does not set it. Pass `--force` to re-run regardless of the
|
|
87
|
-
current value.
|
|
88
|
-
|
|
89
|
-
After a successful `taskless init`, the CLI prints a one-line trailer
|
|
90
|
-
pointing the user at this command. The trailer wording adapts to the
|
|
91
|
-
install plan: when the install included slash commands (Claude Code or
|
|
92
|
-
Cursor), it mentions `/tskl onboard` along with the Taskless skill and the
|
|
93
|
-
bare CLI; when the install only wrote skills (OpenCode, Codex, the
|
|
94
|
-
`.agents/` fallback), it mentions the skill and the bare CLI only.
|
|
25
|
+
New to Taskless? Run `npx @taskless/cli onboard` after installing. It walks your
|
|
26
|
+
agent through your codebase and suggests a starter set of rules.
|
|
95
27
|
|
|
96
|
-
|
|
28
|
+
## How to Use via Agents
|
|
97
29
|
|
|
98
|
-
|
|
30
|
+
Installing adds one skill (`taskless`) and one slash command (`/tskl`). The skill
|
|
31
|
+
body is a small router: your agent fetches the canonical recipe for whatever you
|
|
32
|
+
asked for, then follows it.
|
|
99
33
|
|
|
100
|
-
```bash
|
|
101
|
-
taskless check # human-readable output, scans whole project
|
|
102
|
-
taskless check --json # JSON output
|
|
103
34
|
```
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
directories — useful for CI workflows that only want to check changed files.
|
|
107
|
-
Paths that don't exist on disk (e.g. files deleted in a diff) are silently
|
|
108
|
-
filtered, so raw git-diff output can be piped in directly:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
taskless check src/foo.ts src/bar.ts
|
|
112
|
-
taskless check $(git diff --name-only main...HEAD) # PR-only scan
|
|
113
|
-
taskless check $(git diff --cached --name-only) # pre-commit scan
|
|
35
|
+
/tskl create a rule that bans console.log
|
|
36
|
+
/tskl add taskless to CI
|
|
114
37
|
```
|
|
115
38
|
|
|
116
|
-
|
|
39
|
+
Plain language works too: "write a taskless rule for X", "run taskless check",
|
|
40
|
+
"taskless login" all engage the skill. You rarely need to run the CLI yourself.
|
|
117
41
|
|
|
118
|
-
|
|
42
|
+
To see what the agent sees, run `npx @taskless/cli agent` for the topic index, or
|
|
43
|
+
`npx @taskless/cli agent <topic>` for a full recipe.
|
|
119
44
|
|
|
120
|
-
|
|
45
|
+
## Taskless Check (CI and Constraints)
|
|
121
46
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
47
|
+
`taskless check` runs your rules against the codebase. It exits `0` when nothing
|
|
48
|
+
error-severity matched and `1` when something did, so it drops straight into a
|
|
49
|
+
pipeline:
|
|
125
50
|
|
|
126
51
|
```bash
|
|
127
|
-
|
|
128
|
-
|
|
52
|
+
npx @taskless/cli check # scan everything
|
|
53
|
+
npx @taskless/cli check $(git diff --name-only main...HEAD) # PR-only scan
|
|
54
|
+
npx @taskless/cli check --json # machine-readable
|
|
129
55
|
```
|
|
130
56
|
|
|
131
|
-
|
|
57
|
+
Paths that no longer exist are dropped silently, so raw `git diff` output can be
|
|
58
|
+
piped in without pre-filtering. Static rules need no login and make no network
|
|
59
|
+
calls, so CI needs no secrets. Runtime rules (which execute code) only run once
|
|
60
|
+
the server has verified their signature; otherwise they are reported as skipped
|
|
61
|
+
and never change the exit code.
|
|
132
62
|
|
|
133
|
-
|
|
63
|
+
Ask your agent to `/tskl add taskless to CI` and it will wire this into the CI
|
|
64
|
+
system you already use rather than replacing it.
|
|
134
65
|
|
|
135
|
-
|
|
66
|
+
## Why Teams Choose Taskless
|
|
136
67
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
68
|
+
- **Constraints, not suggestions.** Rules are real files in your repo, enforced
|
|
69
|
+
by ast-grep, Vale, and runtime checks: the same result every run, for every
|
|
70
|
+
agent and every human.
|
|
71
|
+
- **The same rules in the editor and in CI.** One command, one exit code.
|
|
72
|
+
- **Works with the agent you already have.** One skill installs into Claude Code,
|
|
73
|
+
Cursor, and OpenCode, plus the `/tskl` command wherever the tool supports slash
|
|
74
|
+
commands, with a plain `.agents/` fallback when none is detected.
|
|
75
|
+
- **Nothing to run locally.** No daemon, no install step in CI, no auth for the
|
|
76
|
+
checks that matter most.
|
|
140
77
|
|
|
141
|
-
|
|
78
|
+
## Docs
|
|
142
79
|
|
|
143
|
-
|
|
80
|
+
- [docs.taskless.io](https://docs.taskless.io): guides and reference
|
|
81
|
+
- [taskless.io](https://taskless.io): the product
|
|
82
|
+
- [github.com/taskless/cli](https://github.com/taskless/cli): source and issues
|
|
144
83
|
|
|
145
|
-
|
|
84
|
+
<details>
|
|
85
|
+
<summary><strong>Other</strong></summary>
|
|
146
86
|
|
|
147
|
-
|
|
148
|
-
topic (e.g. `taskless help rule create`), prints the full step-by-step recipe
|
|
149
|
-
for that operation, including an embedded JSON Schema for any `--from` input
|
|
150
|
-
and a table of stable error codes. Append `--anonymous` to fetch the
|
|
151
|
-
local-only variant where one exists (currently `rule create`/`rule improve`).
|
|
87
|
+
### Telemetry
|
|
152
88
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
### `--anonymous` flag
|
|
158
|
-
|
|
159
|
-
Recognized on every command. Behavior matrix:
|
|
160
|
-
|
|
161
|
-
- `rule create` / `rule improve` — exits with a pointer to
|
|
162
|
-
`taskless help <topic> --anonymous`. The local-only flow runs in the agent
|
|
163
|
-
per the recipe variant.
|
|
164
|
-
- `info` — skips the API/auth probe; reports local state only.
|
|
165
|
-
- `auth login` — rejected (auth commands cannot be anonymous).
|
|
166
|
-
- All others — accepted as no-op.
|
|
167
|
-
|
|
168
|
-
## For skill authors
|
|
169
|
-
|
|
170
|
-
Skills should detect the package manager by checking for lock files and invoke the CLI accordingly:
|
|
171
|
-
|
|
172
|
-
1. If `pnpm-lock.yaml` exists, use `pnpm dlx @taskless/cli@latest <command>`
|
|
173
|
-
2. Otherwise, use `npx @taskless/cli@latest <command>`
|
|
174
|
-
|
|
175
|
-
All commands output structured JSON to stdout by default. Parse with `JSON.parse()` and handle non-zero exit codes as errors.
|
|
176
|
-
|
|
177
|
-
## Developing
|
|
178
|
-
|
|
179
|
-
### Testing
|
|
89
|
+
The CLI reports anonymous usage (which command ran, whether it succeeded, how
|
|
90
|
+
long it took, and counts of findings. It never sends rule content, prompts, or
|
|
91
|
+
matched source. Disable it by setting either environment variable:
|
|
180
92
|
|
|
181
93
|
```bash
|
|
182
|
-
|
|
183
|
-
|
|
94
|
+
export TASKLESS_TELEMETRY_DISABLED=1
|
|
95
|
+
# or the cross-tool convention
|
|
96
|
+
export DO_NOT_TRACK=1
|
|
184
97
|
```
|
|
185
98
|
|
|
186
|
-
|
|
187
|
-
Integration tests that exercise the built binary (for example `detect`) run
|
|
188
|
-
against `dist/`, so run `pnpm --filter @taskless/cli build` first (or after any
|
|
189
|
-
source change) before invoking them directly.
|
|
190
|
-
|
|
191
|
-
**Two kinds of test, one of which is not fully automatable.** Most tests are
|
|
192
|
-
deterministic unit/integration checks. The route-honesty dataset
|
|
193
|
-
(`test/fixtures/route-eval.json`) is different: the actual routing decision is
|
|
194
|
-
made by an _agent_ following `help/route.txt`, so it cannot be asserted by a
|
|
195
|
-
code classifier. The automated test (`test/route-eval.test.ts`) therefore only
|
|
196
|
-
**guards the dataset** — that it stays structurally valid and balanced across
|
|
197
|
-
every route and both failure directions (over-claim / over-escalate). Running
|
|
198
|
-
the dataset _as an evaluation_ — feeding each case to an agent and scoring its
|
|
199
|
-
chosen destination — is a separate, manual calibration step with more setup; it
|
|
200
|
-
is not part of `pnpm test`. Keep the two distinct: the suite proves the fixtures
|
|
201
|
-
are well-formed; an agent run proves the recipe routes honestly.
|
|
202
|
-
|
|
203
|
-
### API base URL
|
|
204
|
-
|
|
205
|
-
The CLI resolves the API base URL in this order:
|
|
99
|
+
With either set, no client is created and no network request is made.
|
|
206
100
|
|
|
207
|
-
|
|
208
|
-
2. `~/.config/taskless/config.json` → `apiUrl` field
|
|
209
|
-
3. Default: `https://app.taskless.io/cli`
|
|
101
|
+
</details>
|
|
210
102
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
```bash
|
|
214
|
-
TASKLESS_API_URL=http://localhost:5173/cli taskless info
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### API schema introspection
|
|
218
|
-
|
|
219
|
-
All `/cli/api/*` endpoints support the `x-explain: 1` header. When present, the endpoint returns its JSON schema instead of executing — no authentication required.
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
# List available endpoints
|
|
223
|
-
curl -s -H "x-explain: 1" http://localhost:5173/cli/api
|
|
224
|
-
|
|
225
|
-
# Get the schema for rule generation
|
|
226
|
-
curl -s -H "x-explain: 1" -X POST http://localhost:5173/cli/api/rule
|
|
227
|
-
|
|
228
|
-
# Get the schema for rule status polling
|
|
229
|
-
curl -s -H "x-explain: 1" http://localhost:5173/cli/api/rule/any-id
|
|
230
|
-
|
|
231
|
-
# Get the schema for whoami
|
|
232
|
-
curl -s -H "x-explain: 1" http://localhost:5173/cli/api/whoami
|
|
233
|
-
```
|
|
103
|
+
---
|
|
234
104
|
|
|
235
|
-
|
|
105
|
+
MIT licensed.
|