@tenyokjs/devdevian-cli 0.6.0-alpha.1 → 0.6.1-alpha.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 +16 -0
- package/VERSIONS.md +7 -0
- package/bin/devdevian.mjs +13 -1
- package/lib/help.mjs +40 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,6 +12,22 @@ Login opens a browser. Compare the code shown in the terminal, sign in to Devdev
|
|
|
12
12
|
|
|
13
13
|
Version-by-version changes and the customization roadmap: [CLI version history](VERSIONS.md).
|
|
14
14
|
|
|
15
|
+
## A look inside
|
|
16
|
+
|
|
17
|
+
Actual CLI captures from isolated demonstration accounts. Your terminal uses your real forum account and permissions.
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
<details>
|
|
22
|
+
<summary>Code review and appearance</summary>
|
|
23
|
+
|
|
24
|
+

|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
</details>
|
|
28
|
+
|
|
29
|
+
Run `devdevian --help` for script commands and workspace shortcuts. Interactive help has a large wordmark and selective accents; `NO_COLOR=1` keeps it uncolored, narrow terminals use a compact heading, and redirected output stays plain.
|
|
30
|
+
|
|
15
31
|
## Live workspace
|
|
16
32
|
|
|
17
33
|
The default `devdevian` command and `devdevian tui` open an alternate terminal screen. Navigation, conversations, inline forms, previews and search update in that screen; exiting restores your normal terminal. The blue and purple layout adapts to the terminal size, with compact navigation below 90 columns. Minimum size: 60 columns × 18 rows.
|
package/VERSIONS.md
CHANGED
|
@@ -8,6 +8,13 @@ Every published npm artifact has a unique immutable version. We record each vers
|
|
|
8
8
|
|
|
9
9
|
**0.6.0 brings Projects and Events into the terminal**, using the same hosted data and permissions as the browser.
|
|
10
10
|
|
|
11
|
+
## 0.6.1-alpha.1 — A clearer first impression
|
|
12
|
+
|
|
13
|
+
- Added a large terminal wordmark and selective blue/violet accents to `--help`. Compact terminals, `NO_COLOR`, redirected output and JSON help remain readable without ANSI decoration.
|
|
14
|
+
- Help now points to the interactive Projects/Events commands and actions. CLI documentation includes real terminal captures and install/login/workspace guidance.
|
|
15
|
+
- The website introduces the CLI near the top, with keyboard-accessible screenshot tabs, copyable install/review commands and GitHub documentation links. A cached public-only activity counter updates while visible and respects reduced motion.
|
|
16
|
+
- No schema migration, account/credential change or production-data reset. The CLI package and web/API keep independent versions.
|
|
17
|
+
|
|
11
18
|
## 0.6.0-alpha.1 — Projects and Events
|
|
12
19
|
|
|
13
20
|
- Added paginated catalogs, text search and filter forms. Projects filter by topic, stage, owner and order; Events by topic, calendar date with viewer timezone, upcoming/past, participation and order.
|
package/bin/devdevian.mjs
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
loadAppearance,
|
|
24
24
|
saveAppearance,
|
|
25
25
|
} from "../lib/appearance.mjs";
|
|
26
|
+
import { renderHelp } from "../lib/help.mjs";
|
|
26
27
|
const version = packageInfo.version;
|
|
27
28
|
const options = {
|
|
28
29
|
host: { type: "string" },
|
|
@@ -113,6 +114,9 @@ const help = `Devdevian CLI ${version} · alpha
|
|
|
113
114
|
devdevian review reopen POST_ID REVIEW_ID
|
|
114
115
|
devdevian communities [--page 2]
|
|
115
116
|
|
|
117
|
+
Inside the workspace: /projects, /project ID, /events, /event ID
|
|
118
|
+
N creates · F filters · E edits your publication · X opens actions
|
|
119
|
+
|
|
116
120
|
--theme NAME midnight | nebula | daylight | contrast
|
|
117
121
|
--accent NAME blue | violet | cyan | rose
|
|
118
122
|
--density NAME comfortable | compact
|
|
@@ -257,7 +261,15 @@ async function login(flags) {
|
|
|
257
261
|
}
|
|
258
262
|
async function execute(args, flags) {
|
|
259
263
|
if (flags.help) {
|
|
260
|
-
|
|
264
|
+
process.stdout.write(
|
|
265
|
+
renderHelp(help, {
|
|
266
|
+
tty: !!process.stdout.isTTY,
|
|
267
|
+
columns: process.stdout.columns || 80,
|
|
268
|
+
noColor:
|
|
269
|
+
process.env.NO_COLOR !== undefined || process.env.TERM === "dumb",
|
|
270
|
+
json: !!flags.json,
|
|
271
|
+
}) + "\n",
|
|
272
|
+
);
|
|
261
273
|
return;
|
|
262
274
|
}
|
|
263
275
|
if (flags.version) {
|
package/lib/help.mjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Static wordmark; no terminal probes, image protocols or account reads.
|
|
2
|
+
const font = {
|
|
3
|
+
D: ["████ ", "█ █", "█ █", "█ █", "████ "],
|
|
4
|
+
E: ["█████", "█ ", "████ ", "█ ", "█████"],
|
|
5
|
+
V: ["█ █", "█ █", "█ █", " █ █ ", " █ "],
|
|
6
|
+
I: ["█████", " █ ", " █ ", " █ ", "█████"],
|
|
7
|
+
A: [" ███ ", "█ █", "█████", "█ █", "█ █"],
|
|
8
|
+
N: ["█ █", "██ █", "█ █ █", "█ ██", "█ █"],
|
|
9
|
+
};
|
|
10
|
+
export function renderHelp(
|
|
11
|
+
text,
|
|
12
|
+
{ tty = false, columns = 80, noColor = false, json = false } = {},
|
|
13
|
+
) {
|
|
14
|
+
if (!tty || json) return text;
|
|
15
|
+
const paint = (value, color) =>
|
|
16
|
+
noColor ? value : `\x1b[38;5;${color}m${value}\x1b[0m`;
|
|
17
|
+
const banner =
|
|
18
|
+
columns >= 56
|
|
19
|
+
? Array.from({ length: 5 }, (_, row) =>
|
|
20
|
+
paint(
|
|
21
|
+
[..."DEVDEVIAN"].map((c) => font[c][row]).join(" "),
|
|
22
|
+
[111, 105, 141, 177, 183][row],
|
|
23
|
+
),
|
|
24
|
+
).join("\n")
|
|
25
|
+
: paint("DEVDEVIAN", 141);
|
|
26
|
+
const content = text
|
|
27
|
+
.split("\n")
|
|
28
|
+
.map((line) => {
|
|
29
|
+
if (line.startsWith("Devdevian CLI")) return paint(line, 183);
|
|
30
|
+
return line.replace(
|
|
31
|
+
/^( devdevian)(\s+[a-z]+(?:\s+(?:open|create|list|comment|thread|reply|resolve|reopen))?)?|(--[a-z][a-z-]*)/g,
|
|
32
|
+
(match, command, rest) =>
|
|
33
|
+
command
|
|
34
|
+
? paint(command, 111) + (rest ? paint(rest, 183) : "")
|
|
35
|
+
: paint(match, 147),
|
|
36
|
+
);
|
|
37
|
+
})
|
|
38
|
+
.join("\n");
|
|
39
|
+
return `\n${banner}\n\n${content}`;
|
|
40
|
+
}
|