@andespindola/brainlink 0.1.0-alpha.1 → 0.1.0-alpha.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 +10 -2
- package/dist/cli/main.js +9 -2
- package/docs/RELEASE.md +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ Requirements:
|
|
|
76
76
|
- npm
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
npm install -g @andespindola/brainlink
|
|
79
|
+
npm install -g @andespindola/brainlink@latest
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
The package installs two equivalent commands:
|
|
@@ -88,6 +88,14 @@ blink --help
|
|
|
88
88
|
|
|
89
89
|
Use `brainlink` when clarity matters. Use `blink` for faster daily terminal usage.
|
|
90
90
|
|
|
91
|
+
The npm package page may show `npm i @andespindola/brainlink`. That installs
|
|
92
|
+
Brainlink as a project dependency. Use `-g` when you want the terminal commands
|
|
93
|
+
available globally, or run it without a global install:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx @andespindola/brainlink@latest --help
|
|
97
|
+
```
|
|
98
|
+
|
|
91
99
|
## Agent Autonomous Setup
|
|
92
100
|
|
|
93
101
|
This section is written for agents. If you are an AI agent operating in a user workspace, use this workflow to install and use Brainlink without requiring the user to run commands manually.
|
|
@@ -101,7 +109,7 @@ command -v blink || command -v brainlink
|
|
|
101
109
|
If neither command exists, install it:
|
|
102
110
|
|
|
103
111
|
```bash
|
|
104
|
-
npm install -g @andespindola/brainlink
|
|
112
|
+
npm install -g @andespindola/brainlink@latest
|
|
105
113
|
```
|
|
106
114
|
|
|
107
115
|
Then verify:
|
package/dist/cli/main.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
-
import {
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
import { basename, dirname, join } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
4
6
|
import { registerReadCommands } from './commands/read-commands.js';
|
|
5
7
|
import { registerWriteCommands } from './commands/write-commands.js';
|
|
8
|
+
const readPackageVersion = () => {
|
|
9
|
+
const packagePath = join(dirname(fileURLToPath(import.meta.url)), '../../package.json');
|
|
10
|
+
const metadata = JSON.parse(readFileSync(packagePath, 'utf8'));
|
|
11
|
+
return metadata.version ?? '0.0.0';
|
|
12
|
+
};
|
|
6
13
|
const program = new Command();
|
|
7
14
|
const cliName = basename(process.argv[1] ?? 'brainlink');
|
|
8
15
|
const displayName = cliName === 'blink' ? 'blink' : 'brainlink';
|
|
@@ -11,7 +18,7 @@ program
|
|
|
11
18
|
.name(displayName)
|
|
12
19
|
.alias(aliasName)
|
|
13
20
|
.description('Local-first knowledge memory for agents')
|
|
14
|
-
.version(
|
|
21
|
+
.version(readPackageVersion());
|
|
15
22
|
registerWriteCommands(program);
|
|
16
23
|
registerReadCommands(program);
|
|
17
24
|
program.parseAsync().catch((error) => {
|
package/docs/RELEASE.md
CHANGED
|
@@ -49,6 +49,7 @@ The preferred path is the `Publish npm` GitHub Actions workflow:
|
|
|
49
49
|
|
|
50
50
|
- GitHub Release `published`: runs checks, pack smoke, then publishes to npm with provenance.
|
|
51
51
|
- Manual `workflow_dispatch`: runs a dry run by default. Disable `dry_run` only for an intentional manual publish.
|
|
52
|
+
- Manual `workflow_dispatch` accepts an optional `dist_tag` override. Use `latest` only when the default npm install command should resolve to that version.
|
|
52
53
|
- Prerelease versions publish under their prerelease dist-tag, for example `0.1.0-alpha.1` publishes with `--tag alpha`.
|
|
53
54
|
|
|
54
55
|
For emergency local publishing of scoped public packages:
|
package/package.json
CHANGED