Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.5.0

### Features

- **Update issues from JSON** — `plane issue update --from-json <file|->` reads distinct updates from a JSON file or standard input and applies them in one process. The CLI validates the input before writing, reuses project and workspace lookups, and reports individual results in input order. `--dry-run` previews the requests. A failed row gives the command a nonzero exit status while other valid rows can succeed.

## 0.4.6

Fixes the rewrite workflow gaps reported on 2026-10-20.
Expand All @@ -18,18 +24,18 @@ The v0.4.5 changes below were implemented locally but were not published separat

### Validation

- **Validation:** 167 tests passed; 7 opt-in live tests skipped. Build, lint, formatting, and package install/smoke verification passed (installed version `0.4.6`). Regression tests cover outgoing HTML, empty updates, parent assignment/clearing, method selection, dry-run, errors, and no cross-method fallback. Live page PUT verification on the reporting instance remains pending; its version and endpoint were not supplied.
- **Validation:** 167 tests passed and 7 opt-in live tests were skipped. The build, lint, formatting, and an offline install and smoke test of the v0.4.6 tarball passed. Regression tests cover outgoing HTML, empty updates, parent assignment and clearing, method selection, dry-run output, and error handling. A separate live check confirmed page updates via `PUT` on one configured Plane instance.

## 0.4.5 (included in 0.4.6)

Makes the `page` command surface work against Plane's commercial API (Plane Cloud, Commercial/Airgapped Editions), which serves project pages on the token-authenticated `/api/v1` API, and makes the CLI honest about the two operations no edition's public API exposes (update/delete — [makeplane/plane#8598](https://github.com/makeplane/plane/issues/8598)). Community self-hosted instances keep the existing 404 behavior: they don't ship the endpoint at all. See [pages-support-root-cause.md](context/research/lessons-learned/pages-support-root-cause.md) (2026-10-09 addendum). Implemented against the documented API shapes with mocked-transport unit tests; live verification against a Cloud/Commercial instance is pending.
Added support for the project-page operations documented at the time for Plane Cloud and Commercial/Airgapped editions on the token-authenticated `/api/v1` API. The Community self-hosted instance tested at the time returned 404. Mocked-transport tests cover the documented API behavior. Live verification against a Cloud or Commercial instance is pending.

### Features
- **`plane page archive <page>` / `plane page unarchive <page>`** — the documented page lifecycle operations (`POST`/`DELETE …/pages/{id}/archive/`, 204 No Content responses; bodyless POST via a new internal `postVoid` client verb). Accepts name or UUID like `get` does, supports `--dry-run` and `--json` (success envelope `{ success, action, pageId, projectId, workspace }`), and is the supported alternative to delete.
- **`page create` commercial-correct body** — the documented create endpoint requires `description_html`, so it is always sent (default `<p></p>` when no `--content`); a contentless create is no longer a 400 against commercial instances. New `--access <0|1>` option (0 = public, default; 1 = private), validated before any network call.

### Error Messages
- **`page update` / `page delete` report the real limitation** — a 404/405 on those routes now wraps into a message stating that Plane's public API does not expose page update/delete on any edition, pointing at `plane page archive` and upstream issue #8598, instead of a misleading "page not found". The request is still attempted first, so an instance running a Plane version that merges the upstream PRs (#8669/#8865/#9528) keeps working with zero CLI changes; other statuses propagate untouched. `--help` descriptions updated to match.
- **`page update` / `page delete` diagnostics** — added specific messages for 404 and 405 responses based on the API documentation available at the time. The v0.4.6 behavior above supersedes those messages. [Original upstream issue](https://github.com/makeplane/plane/issues/8598)

### Polish
- **`capabilities.pages` reports the operation level** — when the pages probe succeeds, `discover context`/`issue-inputs` include `operations: ["list", "get", "create", "archive"]` (static per the documented public API; `archive` covers both directions of the archive/unarchive sub-endpoint); unsupported/unknown keeps `{ supported, reason }` plus `operations: []` for schema stability.
Expand Down
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Unofficial CLI for [Plane](https://plane.so) — manage your workspace, projects, and issues from any terminal or IDE.

![Version](https://img.shields.io/badge/version-0.4.6-blue)
![Version](https://img.shields.io/badge/version-0.5.0-blue)
![License](https://img.shields.io/badge/license-MIT-green)
![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)
![Platform](https://img.shields.io/badge/platform-windows%20%7C%20linux%20%7C%20mac-lightgrey)
Expand All @@ -16,7 +16,7 @@ Works with self-hosted Plane instances and Plane Cloud. Token-based auth — no
Requires Node.js 20+ and npm.

```bash
npm install -g https://github.com/VidGuiCode/plane-cli/releases/download/v0.4.6/plane-cli-0.4.6.tgz
npm install -g https://github.com/VidGuiCode/plane-cli/releases/download/v0.5.0/plane-cli-0.5.0.tgz
plane --version
plane login
```
Expand Down Expand Up @@ -95,6 +95,33 @@ plane issue update PROJ-42 --parent none

Page update defaults to `PUT`, which accepts a title, content, or both; content replaces the whole page body. Omitted fields are not sent. For older instances that require PATCH, pass `--method PATCH`. Dry-run previews the selected method; the CLI never falls back to another method automatically. Parent changes, including clearing, accept a single issue only.

### Update issues from JSON (v0.5.0)

Use `--from-json` to update multiple issues with different field values in one command. Pass a file path or use `-` to read from standard input.

```bash
plane issue update --from-json updates.json --dry-run
plane issue update --from-json - --json < updates.json
```

The input is a nonempty JSON array. Each object requires `issue` and at least one update field. All fields take strings except `assignee`, `label`, and `labelId`, which take nonempty arrays of nonblank strings.

| Field | Value |
|---|---|
| `issue` | A single issue ref, such as a project-qualified ref, a sequence number in the active project, or a UUID, written as a string. |
| `title`, `name` | Replacement issue title. `title` takes precedence when both are supplied. |
| `description`, `descriptionHtml` | Text or raw HTML. Use one of these fields. An empty string clears the description. |
| `priority` | `urgent`, `high`, `medium`, `low`, or `none`. |
| `state` | State name or ID in the issue's project. |
| `assignee` | Assignee names, emails, or `me`. |
| `label`, `labelId` | Label names or UUIDs. The supplied labels replace the existing set. |
| `parent` | Parent issue ref or `none` to clear it. |
| `due`, `start` | Dates in `YYYY-MM-DD` format or `none` to clear the date. |

Use `--workspace` and `--project` to set the context for the batch. `--from-json` is mutually exclusive with a positional issue ref and individual update flags. Invalid input structure stops the entire batch before writes begin. If an issue resolves more than once, each row targeting it fails. Other rows can proceed when a row fails to resolve or update. Any failed row gives the command a nonzero exit status. The CLI checks the response after each PATCH, so a verification failure can occur after the server has applied changes.

`--json` returns `updated` and `failed` counts and a `results` array in input order. Each result includes `issue`, `status` (`updated`, `failed`, or `planned`), and any resolved `issueId` and `projectId`. Failed rows include `error`. `--dry-run` always returns JSON, leaves `updated` at zero, and shows the `method`, `path`, and `body` for each `planned` row without sending the PATCH requests.

<details>
<summary><strong>Global flags</strong></summary>

Expand Down
3 changes: 1 addition & 2 deletions dist/commands/issue.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Command } from "commander";
import type { PlaneIssue } from "../core/types.js";
export declare function assertIssueUpdateRoundTrip(issue: PlaneIssue, body: Record<string, unknown>): void;
export { assertIssueUpdateRoundTrip } from "../core/issue-update.js";
export declare function createIssueCommand(): Command;
/**
* Resolve the `--columns` value to a validated list of column keys, defaulting
Expand Down
2 changes: 1 addition & 1 deletion dist/commands/issue.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading