saveinme 1.3.1 → 1.3.3

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
@@ -4,12 +4,20 @@
4
4
 
5
5
  ## Install
6
6
 
7
+ To install globally from npm:
8
+ ```bash
9
+ npm install -g saveinme
10
+ ```
11
+
12
+ Or for local development:
7
13
  ```bash
8
14
  cd path/to/saveinme
9
15
  npm install
10
- npm link # makes `saveinme` available globally in any terminal
16
+ npm link
11
17
  ```
12
18
 
19
+ > **Note:** Once installed, both the **`saveinme`** and **`sim`** commands are registered globally and can be used interchangeably in any terminal window!
20
+
13
21
  ## Commands
14
22
 
15
23
  > Both `saveinme` and `sim` can be used interchangeably!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saveinme",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Your personal terminal notebook — save anything, permanently.",
5
5
  "type": "module",
6
6
  "main": "./bin/saveinme.js",
package/src/display.js CHANGED
@@ -1,6 +1,13 @@
1
1
  import chalk from 'chalk';
2
2
  import boxen from 'boxen';
3
3
  import Table from 'cli-table3';
4
+ import { readFileSync } from 'fs';
5
+ import { join, dirname } from 'path';
6
+ import { fileURLToPath } from 'url';
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
10
+ const VERSION = pkg.version;
4
11
 
5
12
  // ─── Color palettes ────────────────────────────────────────────────────────────
6
13
 
@@ -48,8 +55,8 @@ export function formatDate(iso) {
48
55
 
49
56
  export function showHeader() {
50
57
  const logo =
51
- chalk.bold.cyanBright('💾 saveinme') +
52
- chalk.dim(' v1.0.0') +
58
+ chalk.bold.cyanBright('💾 saveinme (sim)') +
59
+ chalk.dim(` v${VERSION}`) +
53
60
  '\n' +
54
61
  chalk.dim('your personal terminal notebook');
55
62
 
@@ -135,11 +142,11 @@ export function showNotesList(notes, heading = null) {
135
142
  console.log(
136
143
  chalk.dim(
137
144
  `\n ${notes.length} note${notes.length !== 1 ? 's' : ''} saved` +
138
- ` · saveinme -c create` +
139
- ` · saveinme -cl paste clip` +
140
- ` · saveinme -v <title> view` +
141
- ` · saveinme -f <term> search` +
142
- ` · saveinme -h help\n`
145
+ ` · sim -c create` +
146
+ ` · sim -cl paste clip` +
147
+ ` · sim -v <title> view` +
148
+ ` · sim -f <term> search` +
149
+ ` · sim -h help\n`
143
150
  )
144
151
  );
145
152
  }
@@ -234,6 +241,8 @@ export function showHelp() {
234
241
  ================================================================================
235
242
  🚀 ${chalk.bold.yellow('COMMANDS CHEAT SHEET (QUICK OVERVIEW)')}
236
243
  ================================================================================
244
+ ${chalk.dim(' * Note: You can use "saveinme" or the shortcut "sim" interchangeably *')}
245
+
237
246
  ${chalk.bold.white('sim')} List all saved notes (pinned first)
238
247
  ${chalk.bold.white('sim -c')} [${chalk.italic('title')}] Create/edit a note interactively
239
248
  ${chalk.bold.white('sim -cl')} [${chalk.italic('title')}] Instantly save text from your clipboard