ramorie 1.7.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.
Files changed (3) hide show
  1. package/README.md +45 -0
  2. package/package.json +39 -0
  3. package/postinstall.js +125 -0
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # Ramorie CLI
2
+
3
+ AI-powered task and memory management CLI.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g ramorie
9
+ ```
10
+
11
+ ## Alternative Installation Methods
12
+
13
+ ### macOS / Linux (Homebrew)
14
+ ```bash
15
+ brew install terzigolu/tap/ramorie
16
+ ```
17
+
18
+ ### Direct Download
19
+ Download the latest release from [GitHub Releases](https://github.com/terzigolu/ramorie/releases).
20
+
21
+ ## Usage
22
+
23
+ ```bash
24
+ # Configure API connection
25
+ ramorie config set-api <your-api-key>
26
+
27
+ # List tasks
28
+ ramorie task list
29
+
30
+ # Create a task
31
+ ramorie task add "My new task"
32
+
33
+ # AI-powered features
34
+ ramorie task analyze <task-id>
35
+ ramorie memory add "Important note"
36
+ ```
37
+
38
+ ## Documentation
39
+
40
+ Full documentation available at [ramorie.com](https://ramorie.com)
41
+
42
+ ## License
43
+
44
+ MIT
45
+
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "ramorie",
3
+ "version": "1.7.0",
4
+ "description": "AI-powered task and memory management CLI",
5
+ "homepage": "https://ramorie.com",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/terzigolu/ramorie.git"
9
+ },
10
+ "license": "MIT",
11
+ "author": "terzigolu",
12
+ "bin": {
13
+ "ramorie": "./bin/ramorie"
14
+ },
15
+ "scripts": {
16
+ "postinstall": "node postinstall.js"
17
+ },
18
+ "keywords": [
19
+ "cli",
20
+ "task-management",
21
+ "ai",
22
+ "productivity",
23
+ "memory",
24
+ "notes",
25
+ "todo"
26
+ ],
27
+ "engines": {
28
+ "node": ">=14.0.0"
29
+ },
30
+ "os": [
31
+ "darwin",
32
+ "linux",
33
+ "win32"
34
+ ],
35
+ "cpu": [
36
+ "x64",
37
+ "arm64"
38
+ ]
39
+ }
package/postinstall.js ADDED
@@ -0,0 +1,125 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Ramorie CLI - postinstall script
5
+ *
6
+ * Downloads the correct binary for the current platform from GitHub releases.
7
+ * Uses only Node.js built-in modules (no external dependencies).
8
+ */
9
+
10
+ const https = require('https');
11
+ const fs = require('fs');
12
+ const path = require('path');
13
+ const { execSync } = require('child_process');
14
+
15
+ const VERSION = require('./package.json').version;
16
+ const REPO = 'terzigolu/ramorie';
17
+
18
+ // Platform/arch mapping
19
+ const PLATFORM_MAP = {
20
+ darwin: 'darwin',
21
+ linux: 'linux',
22
+ win32: 'windows'
23
+ };
24
+
25
+ const ARCH_MAP = {
26
+ x64: 'amd64',
27
+ arm64: 'arm64'
28
+ };
29
+
30
+ function download(url) {
31
+ return new Promise((resolve, reject) => {
32
+ const request = (url) => {
33
+ https.get(url, (response) => {
34
+ // Handle redirects
35
+ if (response.statusCode === 302 || response.statusCode === 301) {
36
+ request(response.headers.location);
37
+ return;
38
+ }
39
+
40
+ if (response.statusCode !== 200) {
41
+ reject(new Error(`Failed to download: ${response.statusCode}`));
42
+ return;
43
+ }
44
+
45
+ const chunks = [];
46
+ response.on('data', chunk => chunks.push(chunk));
47
+ response.on('end', () => resolve(Buffer.concat(chunks)));
48
+ response.on('error', reject);
49
+ }).on('error', reject);
50
+ };
51
+
52
+ request(url);
53
+ });
54
+ }
55
+
56
+ async function main() {
57
+ const platform = PLATFORM_MAP[process.platform];
58
+ const arch = ARCH_MAP[process.arch];
59
+
60
+ if (!platform || !arch) {
61
+ console.error(`āŒ Unsupported platform: ${process.platform}/${process.arch}`);
62
+ console.error('Please install manually from: https://github.com/terzigolu/ramorie/releases');
63
+ process.exit(0); // Don't fail npm install
64
+ }
65
+
66
+ const isWindows = process.platform === 'win32';
67
+ const ext = isWindows ? 'zip' : 'tar.gz';
68
+ const binaryName = isWindows ? 'ramorie.exe' : 'ramorie';
69
+
70
+ const assetName = `ramorie_${VERSION}_${platform}_${arch}.${ext}`;
71
+ const downloadUrl = `https://github.com/${REPO}/releases/download/v${VERSION}/${assetName}`;
72
+
73
+ const binDir = path.join(__dirname, 'bin');
74
+ const tempFile = path.join(__dirname, `ramorie-temp.${ext}`);
75
+ const binaryPath = path.join(binDir, binaryName);
76
+
77
+ console.log(`šŸ“¦ Installing Ramorie v${VERSION} for ${platform}/${arch}...`);
78
+
79
+ try {
80
+ // Ensure bin directory exists
81
+ if (!fs.existsSync(binDir)) {
82
+ fs.mkdirSync(binDir, { recursive: true });
83
+ }
84
+
85
+ // Download the archive
86
+ console.log(` Downloading...`);
87
+ const data = await download(downloadUrl);
88
+ fs.writeFileSync(tempFile, data);
89
+ console.log(' āœ“ Downloaded');
90
+
91
+ // Extract using system tools
92
+ console.log(' Extracting...');
93
+ if (isWindows) {
94
+ execSync(`powershell -command "Expand-Archive -Path '${tempFile}' -DestinationPath '${binDir}' -Force"`, { stdio: 'pipe' });
95
+ } else {
96
+ execSync(`tar -xzf "${tempFile}" -C "${binDir}"`, { stdio: 'pipe' });
97
+ }
98
+ console.log(' āœ“ Extracted');
99
+
100
+ // Make executable (Unix only)
101
+ if (!isWindows && fs.existsSync(binaryPath)) {
102
+ fs.chmodSync(binaryPath, 0o755);
103
+ }
104
+
105
+ // Cleanup
106
+ if (fs.existsSync(tempFile)) {
107
+ fs.unlinkSync(tempFile);
108
+ }
109
+
110
+ console.log(`\nāœ… Ramorie v${VERSION} installed successfully!`);
111
+ console.log(' Run "ramorie --help" to get started.\n');
112
+
113
+ } catch (error) {
114
+ console.error(`\nāš ļø Binary installation skipped: ${error.message}`);
115
+ console.error('\nAlternative installation methods:');
116
+ console.error(' • macOS/Linux: brew install terzigolu/tap/ramorie');
117
+ console.error(' • Windows: scoop install ramorie');
118
+ console.error(' • All: https://github.com/terzigolu/ramorie/releases');
119
+
120
+ // Don't fail the npm install
121
+ process.exit(0);
122
+ }
123
+ }
124
+
125
+ main();