@workser/cli 0.2.6 → 0.3.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/dist/index.js +703 -86
- package/package.json +1 -1
- package/skills/workser/SKILL.md +12 -13
- package/skills/workser/reference/tasks.md +82 -0
- package/skills/workser/reference/version-control.md +66 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workser/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Workser CLI — give your local AI agent native DevOps & infrastructure on Workser. The agent runs `workser …` to provision, deploy, and manage real apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/skills/workser/SKILL.md
CHANGED
|
@@ -5,19 +5,16 @@ description: Provision, deploy, and operate the current Workser app. Use when th
|
|
|
5
5
|
|
|
6
6
|
# Workser — ship & run the current app from the terminal
|
|
7
7
|
|
|
8
|
-
You have the `workser` CLI.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
(which handles auth and shows the user what you're doing).
|
|
13
|
-
|
|
14
|
-
For writing code, keep using your normal tools. Use `workser` for the last mile.
|
|
8
|
+
You have the `workser` CLI. Use it to operate the **one project** Workser Orbit has
|
|
9
|
+
linked to this directory — infrastructure, config, shipping — **on the user's own
|
|
10
|
+
account**, through the Orbit app, which handles auth and shows them what you're
|
|
11
|
+
doing. For writing code, keep using your normal tools.
|
|
15
12
|
|
|
16
13
|
## Read one guide, not all of them
|
|
17
14
|
|
|
18
|
-
This page is the index.
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
This page is the index. `workser help <topic>` prints one focused guide, about a
|
|
16
|
+
screen long. Find your row, run that **one** command — you pay for every line you
|
|
17
|
+
load.
|
|
21
18
|
|
|
22
19
|
| You need to… | Commands | Run |
|
|
23
20
|
| --- | --- | --- |
|
|
@@ -25,6 +22,7 @@ command. Don't print them all; you are paying for every line you load.
|
|
|
25
22
|
| Follow the project's brand — colours, fonts, logo | `design …` | `workser help brand` |
|
|
26
23
|
| Provision or query Postgres; list end users | `db …`, `auth …` | `workser help database` |
|
|
27
24
|
| Deploy, set env vars, read logs, check a domain | `deploy`, `env …`, `logs`, `versions`, `domain`, `open` | `workser help deploy` |
|
|
25
|
+
| Save work before a risky change, undo it, sync this folder | `checkpoint`, `restore`, `sync` | `workser help version-control` |
|
|
28
26
|
| Put files in the project's bucket | `storage …` | `workser help storage` |
|
|
29
27
|
| Read or write products, orders, customers, deals | `business …` | `workser help business` |
|
|
30
28
|
| Use the project's own Neon buckets or functions | `neon …` | `workser help neon` |
|
|
@@ -35,9 +33,8 @@ command. Don't print them all; you are paying for every line you load.
|
|
|
35
33
|
| Record finished output, or ask the user a question | `artifact …`, `ask` | `workser help deliverables` |
|
|
36
34
|
| Control this machine — files, shell, screen, browser | `tool …` | `workser help computer-use` |
|
|
37
35
|
|
|
38
|
-
`workser help`
|
|
39
|
-
|
|
40
|
-
`workser <command> --help` is generated from the implementation.
|
|
36
|
+
`workser help` lists them all; `workser <command> --help` gives exact flags. Both
|
|
37
|
+
come from the CLI itself, so they match the version you are running.
|
|
41
38
|
|
|
42
39
|
## Orientation (no guide needed)
|
|
43
40
|
|
|
@@ -123,6 +120,8 @@ workser board close <id> --json # 9. the Board now matches reality
|
|
|
123
120
|
- `no_project` → no project is linked here; the user links it in Orbit.
|
|
124
121
|
- `owner_only` → an owner action; tell the user to do it in Orbit, then continue.
|
|
125
122
|
- `awaiting_approval` → user must approve in Orbit; then retry.
|
|
123
|
+
- `needs_local_app` → this machine has no Workser app, so folder commands
|
|
124
|
+
can't run. Say so; don't reach for `git` instead.
|
|
126
125
|
|
|
127
126
|
Keep the user informed in plain language ("Provisioned a database and deployed —
|
|
128
127
|
it's live at <url>"), not raw JSON.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
topic: tasks
|
|
3
|
+
title: Project tasks & subtasks
|
|
4
|
+
summary: The ticket you are working inside: read it, break it into steps, and ask before starting.
|
|
5
|
+
commands: [task]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Project tasks & subtasks
|
|
9
|
+
|
|
10
|
+
A **project task** is a ticket the owner filed. You are usually running inside
|
|
11
|
+
one — Orbit sets `WORKSER_PROJECT_TASK_ID` on your process, so every command
|
|
12
|
+
below defaults to it and you rarely pass an id at all.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
workser task list [--status <value>] [--label <value>] [--limit <n>]
|
|
16
|
+
workser task show [id] # the task you are in, with its steps
|
|
17
|
+
|
|
18
|
+
workser task subtask add <title> [--role <value>] [--kind <value>]
|
|
19
|
+
[--note <text>] [--app <id...>]
|
|
20
|
+
[--infra <ref...>] [--scope <path...>]
|
|
21
|
+
[--depends-on <key...>]
|
|
22
|
+
workser task subtask list [taskId]
|
|
23
|
+
workser task subtask update <id> [--title|--note|--role|--kind|--scope]
|
|
24
|
+
workser task subtask remove <id>
|
|
25
|
+
|
|
26
|
+
workser task can-start [id] # may work begin? refuses until approved
|
|
27
|
+
workser task approval request # tell the owner the plan is ready
|
|
28
|
+
workser task move <id> <status>
|
|
29
|
+
workser task done [id] --summary <text>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## This is not `workser board`
|
|
33
|
+
|
|
34
|
+
`board` is the Orbit Board — a human's list of work items. `task` is the AI Tech
|
|
35
|
+
Team's own table. Filing your plan on the Board puts it somewhere the owner's
|
|
36
|
+
task page never reads: they see "created work item" and an empty plan. Use
|
|
37
|
+
`task subtask add`.
|
|
38
|
+
|
|
39
|
+
## Planning a task
|
|
40
|
+
|
|
41
|
+
Read the project first, then propose. One `subtask add` per step:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
workser task subtask add "Build the upload endpoint" \
|
|
45
|
+
--role api --kind service \
|
|
46
|
+
--note "Accept a file, work out its type, hand it to the right analyzer." \
|
|
47
|
+
--scope src/app/api/analyze/route.ts
|
|
48
|
+
|
|
49
|
+
workser task subtask add "Check every supported file type end to end" \
|
|
50
|
+
--role qa --depends-on RIZZ-15
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`--role` is one of: pm, architect, web, api, automation, qa.
|
|
54
|
+
`--kind` is what the step produces: data_reports, web, mobile, service,
|
|
55
|
+
automation, docs. It is not the same fact as the role — the same engineer
|
|
56
|
+
writing a screen, the docs for it and the service behind it is three kinds of
|
|
57
|
+
work.
|
|
58
|
+
|
|
59
|
+
`--scope` is what that step OWNS. Two steps naming the same file cannot run at
|
|
60
|
+
the same time, so keeping scopes apart is what lets the team work in parallel.
|
|
61
|
+
`--depends-on` takes the keys you read off `task show`.
|
|
62
|
+
|
|
63
|
+
Between three and six steps. If it needs more, say the task is too big instead.
|
|
64
|
+
The step that CHECKS work must not be the same role as the one that built it.
|
|
65
|
+
|
|
66
|
+
## Nothing runs until the owner approves
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
workser task can-start
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This exits non-zero, with the reason, until they have approved the plan — that
|
|
73
|
+
refusal is the product working, not an error to route around. Ask with
|
|
74
|
+
`workser task approval request`; only a person can answer.
|
|
75
|
+
|
|
76
|
+
## Finishing a step
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
workser task done --summary "The report now shows cost per KOL, with six months of history."
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Write the summary for someone who runs a business and does not read code.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
topic: version-control
|
|
3
|
+
title: Saving, undoing & syncing your work
|
|
4
|
+
summary: Checkpoint before risky edits, restore when they go wrong, sync with Workser.
|
|
5
|
+
commands: [checkpoint, restore, sync]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Saving, undoing & syncing your work
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
workser checkpoint ["what you're about to try"] # save the folder as it stands now
|
|
12
|
+
workser restore # go back to the newest checkpoint
|
|
13
|
+
workser restore --list # see the checkpoints you can go back to
|
|
14
|
+
workser restore <ref> # go back to a specific one
|
|
15
|
+
workser sync [--branch dev] [--app <id>] # reconcile this folder with Workser
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Why these exist instead of git
|
|
19
|
+
|
|
20
|
+
This folder is a git repository, but **the history is Workser's**. There is no
|
|
21
|
+
remote: code moves to and from Workser over its API as git bundles, using the
|
|
22
|
+
same session everything else here uses. No credential is read, and the user's
|
|
23
|
+
own git keys and identity are never touched.
|
|
24
|
+
|
|
25
|
+
That is what makes any of this work on a computer with no access to the
|
|
26
|
+
Workser-managed repository — which is every computer. Nobody has repo access;
|
|
27
|
+
the API does.
|
|
28
|
+
|
|
29
|
+
So the ordinary git verbs are wrong here, and these three replace them:
|
|
30
|
+
|
|
31
|
+
| Instead of | Run |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `git stash` | `workser checkpoint` |
|
|
34
|
+
| `git commit` | `workser checkpoint` |
|
|
35
|
+
| `git reset --hard` / `git checkout .` | `workser restore` |
|
|
36
|
+
| `git pull` / `git push` | `workser sync` |
|
|
37
|
+
|
|
38
|
+
Reading is always fine: `git log`, `git diff`, `git show`, `git status`.
|
|
39
|
+
|
|
40
|
+
## Notes that matter
|
|
41
|
+
|
|
42
|
+
- **Checkpoint before anything you might want to take back** — a refactor across
|
|
43
|
+
many files, a dependency upgrade, deleting something large. It costs a second.
|
|
44
|
+
- **`git stash` is the one that actually loses work.** Workser publishes what is
|
|
45
|
+
on disk, so a deploy while your changes are stashed ships the version *without
|
|
46
|
+
them* — and if the run is stopped between `stash` and `stash pop`, the user
|
|
47
|
+
opens their folder and their work is gone. `workser checkpoint` has neither
|
|
48
|
+
failure mode.
|
|
49
|
+
- **Restoring never discards anything.** The current state is saved first, then
|
|
50
|
+
the older state is restored on top. If you restore the wrong thing, restore
|
|
51
|
+
again. Say this to the user — it is the reason they can afford to say yes.
|
|
52
|
+
- **These are the same checkpoints as the app's Undo button.** One history, not
|
|
53
|
+
two: a checkpoint you take here appears in Workser, and vice versa.
|
|
54
|
+
- **`sync` pulls before it pushes.** If it reports `diverged`, both sides changed
|
|
55
|
+
and it stops rather than picking a winner — tell the user to resolve it in
|
|
56
|
+
Workser instead of forcing it.
|
|
57
|
+
- **These three need the Workser app running on this computer**, because they
|
|
58
|
+
work with files. If you get `needs_local_app`, you are on a machine that only
|
|
59
|
+
has the CLI and a token — say so rather than looking for a workaround. Every
|
|
60
|
+
read-only command (`projects`, `env`, `db`, `logs`, `status`) still works.
|
|
61
|
+
|
|
62
|
+
## Shipping is separate
|
|
63
|
+
|
|
64
|
+
`workser sync` reconciles the folder. `workser deploy` puts it in front of
|
|
65
|
+
users. Syncing does not deploy, and deploying does not require you to sync
|
|
66
|
+
first — deploy publishes what is on disk. See `reference/deploy.md`.
|