theamify-cli 2.2.3 → 2.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/README.md +23 -1
- package/package.json +1 -1
- package/src/cli.js +12 -7
- package/src/commands/manage.js +30 -0
- package/vendor/theamify +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ theamify info <name> # details + terminal preview
|
|
|
22
22
|
theamify get <name> # download & cache a theme
|
|
23
23
|
theamify get --all # download every theme up front
|
|
24
24
|
sudo theamify use <name> # apply to GRUB + rebuild
|
|
25
|
-
theamify update # update
|
|
25
|
+
theamify update # update from npm, then update tools + re-download themes
|
|
26
26
|
theamify status # GRUB & dependency status
|
|
27
27
|
theamify doctor # diagnose install, GRUB, tools & dependencies
|
|
28
28
|
theamify upgrade # check for & install the latest npm version
|
|
@@ -40,6 +40,28 @@ theamify help # show all commands
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
+
## ✨ What's New (v2.3.0 — update from npm & Linux-only)
|
|
44
|
+
|
|
45
|
+
| Feature | Details |
|
|
46
|
+
|---|---|
|
|
47
|
+
| 🔄 **`theamify update` pulls from npm** | `theamify update` first checks the registry and offers to `npm install -g theamify-cli@latest`, *then* refreshes companion tools (chafa, grub-customizer) and re-downloads themes — matching `gitswitch update` |
|
|
48
|
+
| 🐧 **Linux-only by design** | theamify configures **GRUB**, which only exists on Linux. On other OSes the CLI refuses immediately with a clear message instead of failing halfway |
|
|
49
|
+
| 🧭 **Cross-platform CI** | CI matrices + documentation updated across all three CLI packages |
|
|
50
|
+
|
|
51
|
+
## ✨ What's New (v2.2.5 — doc refresh & command parity)
|
|
52
|
+
|
|
53
|
+
| Feature | Details |
|
|
54
|
+
|---|---|
|
|
55
|
+
| 📖 **README synced** | Every command + alias documented and verified against the live CLI: `list`/`ls`, `info`/`show`, `get`/`fetch`/`download`, `use`/`apply`/`set`, `remove`/`rm`/`uncache`, `add`/`del`/`delete`, `update`, `open`, `status`, `doctor`, `upgrade`/`self-update`, `repair`, `browse`/`wizard`/`install`, `uninstall`, `clean`/`purge-cache`, `version`, `help` |
|
|
56
|
+
| 🗑️ **Uninstall contract** | After `theamify uninstall`, `theamify` reports `command not found` (new terminal) — clear the current shell's cache with `hash -r` |
|
|
57
|
+
|
|
58
|
+
## ✨ What's New (v2.2.4 — command-not-found clarity)
|
|
59
|
+
|
|
60
|
+
| Feature | Details |
|
|
61
|
+
|---|---|
|
|
62
|
+
| 💡 **Current-terminal hint** | After uninstall, `theamify` is fully deleted — a **new terminal** reports `bash: theamify: command not found`. If your *current* shell still says `No such file or directory`, that's bash's cached command path — clear it with `hash -r` |
|
|
63
|
+
| 🗑️ **Still removes everything** | Every runtime, theme, GRUB theme, npm package, `~/.local/bin/theamify` shadow and PATH marker |
|
|
64
|
+
|
|
43
65
|
## ✨ What's New (v2.2.3 — complete uninstall)
|
|
44
66
|
|
|
45
67
|
| Feature | Details |
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -2,8 +2,7 @@ import { defineCommand, runMain } from 'citty';
|
|
|
2
2
|
import pc from 'picocolors';
|
|
3
3
|
import { createRequire } from 'node:module';
|
|
4
4
|
import { runThemeBrowser } from './wizard/browse.js';
|
|
5
|
-
import { runDoctor, runStatus, runUninstallWizard, runSelfUpgrade, runRepair } from './commands/manage.js';
|
|
6
|
-
import { updateManagedTools } from './lib/tools.js';
|
|
5
|
+
import { runDoctor, runStatus, runUninstallWizard, runSelfUpgrade, runRepair, runFullUpdate } from './commands/manage.js';
|
|
7
6
|
import { runEngine } from './core/engine.js';
|
|
8
7
|
|
|
9
8
|
const require = createRequire(import.meta.url);
|
|
@@ -35,7 +34,7 @@ ${pc.bold('Usage:')}
|
|
|
35
34
|
theamify get <name> Download & cache a theme
|
|
36
35
|
theamify get --all Download every theme
|
|
37
36
|
theamify use <name> Apply theme to GRUB ${pc.dim('[sudo]')}
|
|
38
|
-
theamify update [<name>]
|
|
37
|
+
theamify update [<name>] Update from npm, then tools + re-download themes
|
|
39
38
|
theamify remove <name> Clear local cache (keeps registry entry)
|
|
40
39
|
theamify add <github-url> Add a theme to the registry
|
|
41
40
|
theamify del <name> Remove a theme from the registry
|
|
@@ -73,6 +72,14 @@ const main = defineCommand({
|
|
|
73
72
|
async run({ args }) {
|
|
74
73
|
const [cmd, ...rest] = args._;
|
|
75
74
|
|
|
75
|
+
// theamify configures GRUB, which only exists on Linux. Refuse other OSes
|
|
76
|
+
// up-front with a clear message instead of failing halfway through.
|
|
77
|
+
if (process.platform !== 'linux') {
|
|
78
|
+
console.error(pc.red('theamify is Linux-only: it manages GRUB boot themes, and GRUB does not exist on this OS.'));
|
|
79
|
+
process.exitCode = 1;
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
76
83
|
// citty parses `-V` as a boolean flag into args.V (never reached via args._);
|
|
77
84
|
// treat it as a version request like the other aliases.
|
|
78
85
|
if (args.V) {
|
|
@@ -114,10 +121,8 @@ const main = defineCommand({
|
|
|
114
121
|
case 'uninstall':
|
|
115
122
|
return runUninstallWizard();
|
|
116
123
|
case 'update':
|
|
117
|
-
//
|
|
118
|
-
|
|
119
|
-
await updateManagedTools();
|
|
120
|
-
return forwardEngine(['update', ...rest]);
|
|
124
|
+
// Full update: pull the latest CLI from npm, then update tools + themes.
|
|
125
|
+
return runFullUpdate(rest);
|
|
121
126
|
case 'use':
|
|
122
127
|
case 'apply':
|
|
123
128
|
case 'set':
|
package/src/commands/manage.js
CHANGED
|
@@ -85,6 +85,7 @@ export async function runStatus() {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/** `theamify upgrade` — self-update the npm CLI if a newer version is published. */
|
|
88
|
+
/** `theamify upgrade` — check for & install the latest npm version. */
|
|
88
89
|
export async function runSelfUpgrade() {
|
|
89
90
|
const { outdated, latest, current } = await checkForUpdate();
|
|
90
91
|
if (!outdated) {
|
|
@@ -95,6 +96,34 @@ export async function runSelfUpgrade() {
|
|
|
95
96
|
await promptSelfUpdate();
|
|
96
97
|
}
|
|
97
98
|
|
|
99
|
+
/**
|
|
100
|
+
* `theamify update` — bring EVERYTHING up to date, exactly like gitswitch's
|
|
101
|
+
* `update`:
|
|
102
|
+
* 1. Pull the latest npm CLI from the registry (prompts, defaults to yes).
|
|
103
|
+
* 2. Then refresh companion tools (chafa, grub-customizer).
|
|
104
|
+
* 3. Then re-download all cached themes.
|
|
105
|
+
* @param {string[]} rest forwarded theme args (e.g. a single theme name)
|
|
106
|
+
*/
|
|
107
|
+
export async function runFullUpdate(rest = []) {
|
|
108
|
+
const { outdated, latest, current } = await checkForUpdate();
|
|
109
|
+
if (outdated) {
|
|
110
|
+
console.log(pc.cyan(`A newer version (v${latest}) is published — you have v${current}.`));
|
|
111
|
+
const updated = await promptSelfUpdate();
|
|
112
|
+
if (updated) {
|
|
113
|
+
console.log(pc.yellow('theamify CLI updated. Re-run `theamify update` (or just `theamify`) to continue updating tools & themes.'));
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
console.log(pc.dim('Continuing — keeping current CLI version.'));
|
|
117
|
+
} else {
|
|
118
|
+
console.log(pc.green(`theamify CLI is on the latest version (v${current}).`));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const { updateManagedTools } = await import('../lib/tools.js');
|
|
122
|
+
await updateManagedTools();
|
|
123
|
+
const { runEngine } = await import('../core/engine.js');
|
|
124
|
+
await runEngine(['update', ...rest]);
|
|
125
|
+
}
|
|
126
|
+
|
|
98
127
|
/** `theamify repair` — fix a broken install by re-provisioning the engine/runtime. */
|
|
99
128
|
export async function runRepair() {
|
|
100
129
|
console.log(pc.bold('\n🔧 theamify Repair\n'));
|
|
@@ -209,4 +238,5 @@ export async function runUninstallWizard() {
|
|
|
209
238
|
`Uninstalled.${removedCount ? ` ${removedCount} runtime tree(s) + all downloaded themes removed.` : ''} ${themeNote} ${npmRemoved ? 'theamify-cli npm package removed — the theamify command is gone.' : 'theamify-cli npm package could not be removed automatically — run: npm uninstall -g theamify-cli'} Companion tools (chafa, grub-customizer) were kept for your use.`,
|
|
210
239
|
));
|
|
211
240
|
p.log.message(pc.dim('After uninstall, `theamify` reports: bash: theamify: command not found'));
|
|
241
|
+
p.log.message(pc.dim('If this terminal still shows "No such file or directory", clear bash\'s cached command path with: hash -r (or open a new terminal).'));
|
|
212
242
|
}
|
package/vendor/theamify
CHANGED
|
@@ -10,7 +10,7 @@ set -euo pipefail
|
|
|
10
10
|
# -----------------------------------------------------------------------------
|
|
11
11
|
# VERSION & TOOL NAME
|
|
12
12
|
# -----------------------------------------------------------------------------
|
|
13
|
-
readonly VERSION="2.
|
|
13
|
+
readonly VERSION="2.3.0"
|
|
14
14
|
readonly TOOL="theamify"
|
|
15
15
|
|
|
16
16
|
# -----------------------------------------------------------------------------
|