@nolto/cli 0.5.0 → 0.6.1

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 CHANGED
@@ -1,6 +1,7 @@
1
1
  # @nolto/cli
2
2
 
3
- A thin MCP client CLI for [Nolto](https://nolto.app) — register plans and update progress from your terminal. The installed command is `nolto`.
3
+ The Nolto CLI keeps a repository's roadmap in sync with [Nolto](https://nolto.app).
4
+ The installed command is `nolto`.
4
5
 
5
6
  ## Quick Start
6
7
 
@@ -10,82 +11,62 @@ Run once without installing:
10
11
  npx @nolto/cli init
11
12
  ```
12
13
 
13
- Or install it (globally or as a devDependency) to get the `nolto` command:
14
+ Or install the CLI globally:
14
15
 
15
16
  ```bash
16
17
  npm install -g @nolto/cli
17
18
  nolto init
18
19
  ```
19
20
 
20
- Follow the prompts to configure your API token and default project. Then verify:
21
+ `nolto init` configures authentication, selects or creates a project, writes the
22
+ repo-local `nolto.json` binding, installs the bundled `roadmap-progress` skill,
23
+ and creates `.roadmap/roadmap.json` when needed.
24
+
25
+ For browser-based authentication without the rest of the repository setup:
21
26
 
22
27
  ```bash
23
- nolto whoami
28
+ nolto login
24
29
  ```
25
30
 
26
31
  ## Commands
27
32
 
28
- ### Setup
33
+ ### Setup and Authentication
29
34
 
30
35
  ```bash
31
- nolto init # Interactive setup
32
- nolto whoami # Show current auth/config state
36
+ nolto init [--force] # Interactive project and repository setup
37
+ nolto login [--force] # Authenticate in the browser and save the API token
38
+ nolto whoami # Show resolved auth/config state and project count
33
39
  ```
34
40
 
35
- ### Repo Binding
36
-
37
- Bind the current repository to a Nolto project by writing a `nolto.json` at the repo root:
41
+ ### Repository Binding
38
42
 
39
43
  ```bash
40
- nolto link <projectId> # Write nolto.json and commit it to share with your team
41
- nolto link --show # Show the current binding (path, projectId, source)
42
- nolto link --unlink # Remove the projectId key from nolto.json
44
+ nolto link <projectId> # Write or update nolto.json at the repository root
45
+ nolto link --show # Show the current binding and its source
46
+ nolto link --unlink # Remove projectId from nolto.json
43
47
  ```
44
48
 
45
- Once `nolto.json` is committed, every command in this repo automatically targets the correct project without needing `--project` or `NOLTO_PROJECT`.
46
-
47
- ### Project Management
48
-
49
- ```bash
50
- nolto project list
51
- nolto project register <name> [--description <text>] [--repository-url <url>]
52
- nolto project set-default <projectId>
53
- nolto project set-default <projectId> --local # Config file only, no MCP call
54
- ```
49
+ Commit `nolto.json` so everyone working in the repository targets the same Nolto
50
+ project.
55
51
 
56
- ### Plan Management
52
+ ### Roadmap Sync
57
53
 
58
54
  ```bash
59
- nolto plan list [--status not_started|in_progress|done|discarded]
60
- nolto plan get <planId>
61
- nolto plan register --file PLAN.md [--title <text>] [--status <status>] \
62
- [--planned-start <ISO>] [--planned-end <ISO>] \
63
- [--phases <json>] [--doc kind=path ...] \
64
- [--source-url <url>] [--source-hash <hex>] [--no-git]
65
- nolto plan status <planId> <status> [--message <text>]
66
- nolto plan review <planId> go|no_go [--summary <text>]
55
+ nolto sync # Push roadmap.json and linked plan Markdown
56
+ nolto watch [--debounce <ms>] # Watch registered repositories and auto-sync
57
+ nolto watch --install-service # Install the Linux systemd user service
67
58
  ```
68
59
 
69
- ### Phase Management
60
+ `sync` reads `.roadmap/roadmap.json`, validates schema v2, follows any linked plan
61
+ Markdown paths, and sends an idempotent full upsert to the bound project.
70
62
 
71
- ```bash
72
- nolto phase status <planId> <phaseId> <status> [--message <text>]
73
- nolto phase test <planId> <phaseId> passed|failed|skipped \
74
- [--round <n>] [--summary <text>]
75
- ```
76
-
77
- ### Document Upload
78
-
79
- ```bash
80
- nolto doc upload <planId> --file <path> --kind plan|final_report|review_report|test_report|other \
81
- [--phase <phaseId>] [--filename <name>]
82
- ```
63
+ `watch` uses the repository registry maintained by `nolto init`. Missing registered
64
+ repositories are skipped with a warning.
83
65
 
84
66
  ## Configuration
85
67
 
86
- ### Config File
87
-
88
- Location: `~/.config/nolto/config.json` (or `$XDG_CONFIG_HOME/nolto/config.json`), mode 0600.
68
+ The config file is `~/.config/nolto/config.json` (or
69
+ `$XDG_CONFIG_HOME/nolto/config.json`) and is written with mode 0600.
89
70
 
90
71
  ```json
91
72
  {
@@ -95,44 +76,35 @@ Location: `~/.config/nolto/config.json` (or `$XDG_CONFIG_HOME/nolto/config.json`
95
76
  }
96
77
  ```
97
78
 
98
- ### Environment Variables
79
+ Environment variables:
99
80
 
100
81
  | Variable | Description |
101
82
  |---|---|
102
83
  | `NOLTO_TOKEN` | API token |
103
84
  | `NOLTO_BASE_URL` | Base URL (default: `https://nolto.app`) |
104
- | `NOLTO_PROJECT` | Default project ID |
105
-
106
- ### Repo Binding File
85
+ | `NOLTO_PROJECT` | Default project ID fallback |
107
86
 
108
- `nolto.json` at the repository root pins the project for everyone who clones the repo:
87
+ Repository binding (`nolto.json`):
109
88
 
110
89
  ```json
111
- { "projectId": "00000000-0000-0000-0000-000000000001" }
90
+ {
91
+ "projectId": "00000000-0000-0000-0000-000000000001",
92
+ "roadmapSlug": "my-repository"
93
+ }
112
94
  ```
113
95
 
114
- **Precedence**: CLI flags > environment variables > `nolto.json` (repo binding) > config file > defaults
115
-
116
- ## Exit Codes
117
-
118
- | Code | Meaning |
119
- |---|---|
120
- | 0 | Success |
121
- | 1 | MCP tool error (`result.isError: true` or JSON-RPC error) |
122
- | 2 | Local input validation error (bad args, file errors, etc.) |
123
- | 3 | Auth error (no token / 401 / 403) |
124
- | 4 | Rate limit (429) — message includes Retry-After seconds |
125
- | 5 | Network / DNS / connection error |
96
+ Precedence: CLI flags > environment variables > `nolto.json` > config file > defaults.
126
97
 
127
98
  ## JSON Output
128
99
 
129
- Add `--json` for machine-readable output (results to stdout, errors to stderr):
100
+ Use the global `--json` option for machine-readable command output:
130
101
 
131
102
  ```bash
132
- nolto plan list --json | jq '.[].id'
103
+ nolto --json whoami
104
+ nolto --json sync
133
105
  ```
134
106
 
135
- Errors are written to stderr as a structured envelope:
107
+ Errors are written to stderr:
136
108
 
137
109
  ```json
138
110
  {
@@ -145,15 +117,16 @@ Errors are written to stderr as a structured envelope:
145
117
  }
146
118
  ```
147
119
 
148
- Fields: `message` (string), `exitCode` (number), `status` (HTTP status when known, optional), `hint` (optional guidance).
149
-
150
- ## Rate Limits
151
-
152
- The MCP server enforces **60 requests/minute per user**. Each CLI command uses approximately 3 HTTP round-trips (initialize + initialized + tools/call), giving an effective throughput of **~20 commands/minute**.
153
-
154
- ## SDK Note
120
+ ## Exit Codes
155
121
 
156
- This CLI uses `@modelcontextprotocol/sdk ^1.29.0` for Streamable HTTP transport. Keep in lockstep with the server SDK version for protocol compatibility.
122
+ | Code | Meaning |
123
+ |---|---|
124
+ | 0 | Success |
125
+ | 1 | Unexpected command failure |
126
+ | 2 | Local input or file validation error |
127
+ | 3 | Authentication or authorization error |
128
+ | 4 | Rate limit response |
129
+ | 5 | Network, DNS, or server error |
157
130
 
158
131
  ## License
159
132