maiass 5.9.26 ā 5.9.33
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 +79 -292
- package/lib/version-command.js +14 -8
- package/maiass.mjs +4 -3
- package/package.json +1 -3
- package/maiass-standalone.cjs +0 -148
- package/maiass.cjs +0 -34
package/README.md
CHANGED
|
@@ -1,347 +1,134 @@
|
|
|
1
|
-
#
|
|
2
|
-
**Modular AI-Augmented Semantic Scribe**
|
|
1
|
+
# `|))` MAIASS (Node.js)
|
|
2
|
+
**Modular AI-Augmented Semantic Scribe** ā intelligent Git workflow automation
|
|
3
3
|
|
|
4
|
-
[](https://www.npmjs.com/package/maiass)
|
|
5
|
+
[](https://nodejs.org/)
|
|
5
6
|
[](LICENSE)
|
|
6
|
-
[](package.json)---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
---
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
MAIASS automates the repetitive parts of your Git workflow: staging, AI-powered commit messages, branch merging, version bumping, and changelog generation ā all from a single command.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
> Looking for the shell/Homebrew version? See [bashmaiass](https://github.com/vsmash/bashmaiass).
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
curl -L https://github.com/vsmash/maiass/releases/latest/download/maiass-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m) -o maiass
|
|
18
|
-
chmod +x maiass
|
|
19
|
-
./maiass --version
|
|
20
|
-
```
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
21
17
|
|
|
22
|
-
**From Source**:
|
|
23
18
|
```bash
|
|
24
|
-
|
|
25
|
-
cd nodemaiass && npm install && npm link
|
|
19
|
+
npm install -g maiass
|
|
26
20
|
```
|
|
27
21
|
|
|
28
|
-
|
|
22
|
+
Requires Node.js 18+.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
29
27
|
|
|
30
28
|
```bash
|
|
31
|
-
#
|
|
29
|
+
# First time in a project ā run setup
|
|
30
|
+
maiass --setup
|
|
31
|
+
|
|
32
|
+
# Everyday use ā commit, merge, bump patch version
|
|
32
33
|
maiass
|
|
33
34
|
|
|
34
35
|
# Specific version bumps
|
|
35
36
|
maiass minor # 1.2.3 ā 1.3.0
|
|
36
37
|
maiass major # 1.2.3 ā 2.0.0
|
|
37
|
-
maiass 2.1.0 # Set specific version
|
|
38
38
|
|
|
39
|
-
# Commit only
|
|
39
|
+
# Commit only, skip version management
|
|
40
40
|
maiass --commits-only
|
|
41
41
|
|
|
42
|
-
# Preview
|
|
43
|
-
maiass --dry-run
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### AI-Powered Commit Messages
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
# Enable AI features
|
|
50
|
-
maiass config set maiass_token "your_api_key"
|
|
51
|
-
maiass config set ai_mode "ask" (or "always" or "off")
|
|
52
|
-
|
|
53
|
-
# MAIASS will now suggest intelligent commit messages
|
|
54
|
-
maiass
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## ⨠Key Features- **š¤ AI-Powered Commit Messages**: AI integration for intelligent commit suggestions- **š Dual Changelog System**: User-facing and developer-facing changelogs- **š Complete Git Workflow**: Branch validation, commits, merges, and versioning- **š·ļø Smart Version Management**: Multiple version file support with semantic versioning- **š Cross-Platform**: Self-contained binaries for macOS, Linux, and Windows- **āļø Zero Configuration**: Works out of the box with sensible defaults- **šÆ JIRA Integration**: Automatic ticket detection from branch names
|
|
58
|
-
|
|
59
|
-
## ļæ½ Documentation
|
|
60
|
-
|
|
61
|
-
| Topic | Description |
|
|
62
|
-
|-------|-------------|
|
|
63
|
-
| **[Installation Guide](docs/installation-guide.md)** | Detailed installation instructions and binaries |
|
|
64
|
-
| **[Configuration](docs/configuration.md)** | Environment variables and project setup |
|
|
65
|
-
| **[Workflow Guide](docs/workflow.md)** | Complete workflow documentation |
|
|
66
|
-
| **[Commands Reference](docs/commands.md)** | All available commands and options |
|
|
67
|
-
| **[Cross-Platform Guide](docs/cross-platform.md)** | Platform-specific notes and compatibility |
|
|
68
|
-
| **[Development](docs/development.md)** | Contributing and development setup |
|
|
69
|
-
|
|
70
|
-
## š§ Supported Technologies
|
|
71
|
-
|
|
72
|
-
### Version File Formats- **package.json** (Node.js/npm projects)- **composer.json** (PHP/Composer projects)- **VERSION** files (plain text)- **Git tags only** (for projects without version files)
|
|
73
|
-
|
|
74
|
-
### Git Platforms- **GitHub** (public and private repositories)- **Bitbucket** (Cloud and Server)- **Any Git host** (core features work universally)
|
|
75
|
-
|
|
76
|
-
### AI Models- **GPT-4o** (recommended for complex projects)- **GPT-4** (balanced performance and cost)- **GPT-3.5-turbo** (fast and economical)
|
|
77
|
-
|
|
78
|
-
## š Platform Support
|
|
79
|
-
|
|
80
|
-
| Platform | Binary Available | Self-Contained |
|
|
81
|
-
|----------|------------------|----------------|
|
|
82
|
-
| **macOS Intel** | ā
`maiass-macos-intel` | ā
Node.js included |
|
|
83
|
-
| **macOS Apple Silicon** | ā
`maiass-macos-arm64` | ā
Node.js included |
|
|
84
|
-
| **Linux x64** | ā
`maiass-linux-x64` | ā
Node.js included |
|
|
85
|
-
| **Linux ARM64** | ā
`maiass-linux-arm64` | ā
Node.js included |
|
|
86
|
-
| **Windows x64** | ā
`maiass-windows-x64.exe` | ā
Node.js included |
|
|
87
|
-
| **Windows ARM64** | ā
`maiass-windows-arm64.exe` | ā
Node.js included |
|
|
88
|
-
|
|
89
|
-
## š Workflow Overview
|
|
90
|
-
|
|
91
|
-
MAIASS orchestrates a 4-phase intelligent workflow:
|
|
92
|
-
|
|
93
|
-
1. **Branch Detection & Validation** - Validates current branch and workflow requirements
|
|
94
|
-
2. **Commit Workflow** - AI-powered commit messages with JIRA integration
|
|
95
|
-
3. **Merge Management** - Handles branch merging and conflict resolution
|
|
96
|
-
4. **Version & Changelog** - Semantic versioning with dual changelog generation
|
|
97
|
-
|
|
98
|
-
## āļø Quick Configuration
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
# Enable AI features (global)
|
|
102
|
-
maiass config set --global maiass_token "your_api_key"
|
|
103
|
-
maiass config set --global ai_mode "ask"
|
|
104
|
-
|
|
105
|
-
# Project-specific branch override
|
|
106
|
-
maiass config set mainbranch "main"
|
|
107
|
-
|
|
108
|
-
# View current configuration
|
|
109
|
-
maiass config list
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## šÆ What Makes This Special?
|
|
113
|
-
|
|
114
|
-
### Intelligent Automation- **Smart Version Detection**: Automatically finds and updates version files- **Context-Aware AI**: Analyzes code changes for meaningful commit messages- **Dual Changelog System**: Clean user-facing + detailed developer changelogs
|
|
115
|
-
|
|
116
|
-
### Developer Experience- **Self-Contained Binaries**: No Node.js installation required- **Cross-Platform Compatibility**: Consistent behavior across all platforms- **Zero Configuration**: Works immediately with sensible defaults
|
|
117
|
-
|
|
118
|
-
### Enterprise Ready- **Security First**: API keys never stored in repositories- **CI/CD Integration**: Perfect for automated deployment pipelines- **GPL-3.0 Licensed**: Free and open source software
|
|
119
|
-
|
|
120
|
-
## š Related Projects- **[MAIASS (Bash)](https://github.com/vsmash/maiass)** - Original bash implementation- **[Homebrew Formula](https://github.com/vsmash/homebrew-maiass)** - Homebrew installation
|
|
121
|
-
|
|
122
|
-
## š¤ Contributing
|
|
123
|
-
|
|
124
|
-
We welcome contributions! Whether it's:- š **Bug reports** and feature requests- š **Documentation** improvements- š§ **Code contributions** and enhancements- š” **Ideas** for new features
|
|
125
|
-
|
|
126
|
-
See our [Development Guide](docs/development.md) to get started.
|
|
127
|
-
|
|
128
|
-
## š License
|
|
129
|
-
|
|
130
|
-
MAIASS is released under the [GNU General Public License v3.0](LICENSE). Free and open source software.
|
|
131
|
-
|
|
132
|
-
## š Links- **[GitHub Repository](https://github.com/vsmash/nodemaiass)**- **[Issue Tracker](https://github.com/vsmash/nodemaiass/issues)**- **[Releases](https://github.com/vsmash/nodemaiass/releases)**- **[Original MAIASS](https://github.com/vsmash/maiass)**---
|
|
133
|
-
|
|
134
|
-
**Ready to streamline your Git workflow?** Download MAIASS today and experience intelligent version management with AI-powered automation.
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
# Get the latest release
|
|
138
|
-
curl -L https://github.com/vsmash/maiass/releases/latest/download/maiass-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m) -o maiass && chmod +x maiass
|
|
139
|
-
```---
|
|
140
|
-
|
|
141
|
-
**Made with ā¤ļø for developers who want better Git workflows**
|
|
142
|
-
maiass version [major|minor|patch|version]
|
|
143
|
-
|
|
144
|
-
# Configuration
|
|
145
|
-
maiass config list
|
|
146
|
-
maiass config get <key>
|
|
147
|
-
maiass config set <key> <value>
|
|
148
|
-
|
|
149
|
-
# Environment info
|
|
150
|
-
maiass env
|
|
151
|
-
|
|
152
|
-
# Git information
|
|
153
|
-
maiass git-info
|
|
154
|
-
maiass git # Show git status and branch info
|
|
155
|
-
|
|
156
|
-
# Environment variables
|
|
157
|
-
maiass env # Show current environment
|
|
158
|
-
maiass env --json # Show environment as JSON
|
|
42
|
+
# Preview without making changes
|
|
43
|
+
maiass --dry-run patch
|
|
159
44
|
```
|
|
160
45
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
### Quick Setup
|
|
164
|
-
|
|
165
|
-
1. **Enable AI features** (optional):
|
|
166
|
-
```bash
|
|
167
|
-
# Set Maiass API key globally
|
|
168
|
-
maiass config --global maiass_token=your_api_key_here
|
|
169
|
-
```
|
|
46
|
+
---
|
|
170
47
|
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
# Override branch names for projects using 'main'
|
|
174
|
-
maiass config --project mainbranch=main
|
|
175
|
-
```
|
|
48
|
+
## AI Commit Messages
|
|
176
49
|
|
|
177
|
-
|
|
50
|
+
MAIASS uses its own proxy service for AI-powered commit message suggestions. On first run it creates an anonymous subscription automatically ā no sign-up required.
|
|
178
51
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
### Common Configuration Variables
|
|
52
|
+
To use a named account (for credit top-ups):
|
|
182
53
|
|
|
183
54
|
```bash
|
|
184
|
-
|
|
185
|
-
MAIASS_AI_TOKEN=your_api_key_here
|
|
186
|
-
MAIASS_AI_MODE=ask # ask, autosuggest, off
|
|
187
|
-
MAIASS_AI_MODEL=gpt-4 # AI model to use
|
|
188
|
-
|
|
189
|
-
# Branch Configuration (only set if different from defaults)
|
|
190
|
-
MAIASS_MAINBRANCH=main # Default: main
|
|
191
|
-
MAIASS_DEVELOPBRANCH=develop # Default: develop
|
|
192
|
-
MAIASS_STAGINGBRANCH=staging # Default: staging
|
|
193
|
-
|
|
194
|
-
# Workflow Settings
|
|
195
|
-
MAIASS_DEBUG=true # Enable debug output
|
|
196
|
-
MAIASS_VERBOSITY=normal # brief, normal, verbose
|
|
197
|
-
MAIASS_AUTO_TAG_RELEASES=true # Automatically tag releases (required for changelog)
|
|
198
|
-
|
|
199
|
-
# Changelog Configuration
|
|
200
|
-
MAIASS_CHANGELOG_PATH=CHANGELOG.md # Main changelog file path
|
|
201
|
-
MAIASS_CHANGELOG_NAME=CHANGELOG.md # Main changelog file name
|
|
202
|
-
MAIASS_CHANGELOG_INTERNAL_NAME.CHANGELOG_internal.md # Internal changelog file name
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## š Workflow Phases
|
|
206
|
-
|
|
207
|
-
MAIASS orchestrates a 4-phase workflow:
|
|
208
|
-
|
|
209
|
-
### 1. **Branch Detection & Validation**- Detects current branch and validates against workflow requirements- Auto-switches from main/staging to develop branch- Prompts for confirmation on release/main branches- Handles missing develop branch gracefully
|
|
210
|
-
|
|
211
|
-
### 2. **Commit Workflow**- Detects staged and unstaged changes- Offers AI-powered commit message suggestions- Supports multi-line commit messages- Prepends JIRA ticket numbers from branch names
|
|
212
|
-
|
|
213
|
-
### 3. **Merge to Develop**- Merges feature branches to develop for version management- Pulls latest changes from remote- Handles merge conflicts with clear error messages
|
|
214
|
-
|
|
215
|
-
### 4. **Version Management**- Detects version files (package.json, composer.json, etc.)- Bumps semantic versions (major.minor.patch)- Updates multiple version files simultaneously- Creates git tags for releases- **Generates dual changelogs**:
|
|
216
|
-
- `CHANGELOG.md`: Clean, user-facing format with JIRA tickets stripped
|
|
217
|
-
- `.CHANGELOG_internal.md`: Developer format with commit hashes, authors, and JIRA tickets- **Smart commit range detection**: Only includes commits since the last release tag- **Version replacement logic**: Replaces same-day patch versions instead of duplicating entries
|
|
218
|
-
|
|
219
|
-
## š Changelog System
|
|
220
|
-
|
|
221
|
-
MAIASS automatically generates two types of changelogs during version management:
|
|
222
|
-
|
|
223
|
-
### Main Changelog (`CHANGELOG.md`)
|
|
224
|
-
**User-facing format** with clean, readable entries:
|
|
225
|
-
```markdown
|
|
226
|
-
## 0.5.6
|
|
227
|
-
24 July 2025- Update Maiass Pipeline functionality
|
|
228
|
-
- feat: imported path package in maiass-pipeline
|
|
229
|
-
- docs: added comment about commit message formatting- Updated commit message filtering for maiass-pipeline
|
|
230
|
-
- feat: added code to clean up commit messages
|
|
231
|
-
- fix: removed empty lines and trailing newlines from each commit
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
### Internal Changelog (`CHANGELOG_internal.md`)
|
|
235
|
-
**Developer-facing format** with commit hashes, authors, and JIRA tickets:
|
|
236
|
-
```markdown
|
|
237
|
-
## 0.5.6
|
|
238
|
-
Thursday, 24 July 2025- d7ddba9 VEL-405 Update Maiass Pipeline functionality (Developer Name)- 5ea6d03 VEL-405 Updated commit message filtering for maiass-pipeline (Developer Name)
|
|
55
|
+
maiass config set MAIASS_AI_TOKEN your_api_key
|
|
239
56
|
```
|
|
240
57
|
|
|
241
|
-
|
|
58
|
+
AI mode is configured per-project in `.env.maiass`:
|
|
242
59
|
|
|
243
|
-
## šØ Examples
|
|
244
|
-
|
|
245
|
-
### Complete Feature Development Workflow
|
|
246
60
|
```bash
|
|
247
|
-
#
|
|
248
|
-
|
|
249
|
-
#
|
|
250
|
-
maiass minor --tag
|
|
251
|
-
|
|
252
|
-
# This will:
|
|
253
|
-
# - Detect you're on a feature branch
|
|
254
|
-
# - Run commit workflow with AI suggestions
|
|
255
|
-
# - Merge to develop branch
|
|
256
|
-
# - Bump minor version (1.0.0 ā 1.1.0)
|
|
257
|
-
# - Create git tag v1.1.0
|
|
61
|
+
MAIASS_AI_COMMITS=ask # ask each time (default)
|
|
62
|
+
MAIASS_AI_COMMITS=always # always use AI
|
|
63
|
+
MAIASS_AI_COMMITS=off # disable AI
|
|
258
64
|
```
|
|
259
65
|
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
# Just commit changes without version bumping
|
|
263
|
-
maiass --commits-only --auto-stage
|
|
66
|
+
---
|
|
264
67
|
|
|
265
|
-
|
|
266
|
-
maiass commit
|
|
267
|
-
```
|
|
68
|
+
## Key Features
|
|
268
69
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
maiass version --current
|
|
276
|
-
```
|
|
70
|
+
- **AI commit messages** ā analyses your diff and suggests a structured commit message
|
|
71
|
+
- **Version management** ā detects and bumps `package.json`, `composer.json`, `VERSION`, `.pbxproj` (Swift/Xcode), and more
|
|
72
|
+
- **Changelog generation** ā user-facing `CHANGELOG.md` and internal developer changelog
|
|
73
|
+
- **Branch workflow** ā feature ā develop ā staging ā main with merge handling
|
|
74
|
+
- **JIRA integration** ā ticket numbers auto-detected from branch names
|
|
75
|
+
- **First-run friendly** ā works immediately with sensible defaults, no blocking setup
|
|
277
76
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
### Custom Version Files
|
|
281
|
-
```bash
|
|
282
|
-
# Configure custom version file
|
|
283
|
-
maiass config --project version_primary_file=VERSION.txt
|
|
284
|
-
maiass config --project version_primary_type=text
|
|
285
|
-
```
|
|
77
|
+
---
|
|
286
78
|
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
# Update multiple files with same version
|
|
290
|
-
maiass config --project version_secondary_files="src/version.js,docs/VERSION"
|
|
291
|
-
```
|
|
79
|
+
## Configuration
|
|
292
80
|
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
# Different AI modes
|
|
296
|
-
maiass config --global ai_mode=autosuggest # Auto-suggest without asking
|
|
297
|
-
maiass config --global ai_mode=off # Disable AI
|
|
81
|
+
MAIASS uses `.env.maiass` files for configuration:
|
|
298
82
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
83
|
+
| File | Purpose |
|
|
84
|
+
|------|---------|
|
|
85
|
+
| `.env.maiass` | Project settings, committed to git |
|
|
86
|
+
| `.env.maiass.local` | Personal overrides, gitignored |
|
|
302
87
|
|
|
303
|
-
|
|
88
|
+
Run `maiass --setup` to configure a project interactively, or edit `.env.maiass` directly.
|
|
304
89
|
|
|
305
|
-
|
|
90
|
+
Common variables:
|
|
306
91
|
|
|
307
|
-
**"Not in a git repository"**
|
|
308
92
|
```bash
|
|
309
|
-
|
|
310
|
-
|
|
93
|
+
MAIASS_AI_COMMITS=ask
|
|
94
|
+
MAIASS_MODE=full # full or ai_only
|
|
95
|
+
MAIASS_MAIN_BRANCH=main
|
|
96
|
+
MAIASS_DEVELOP_BRANCH=develop
|
|
97
|
+
MAIASS_VERSION_PRIMARY_FILE=package.json
|
|
98
|
+
MAIASS_DEBUG=true # verbose output
|
|
311
99
|
```
|
|
312
100
|
|
|
313
|
-
|
|
314
|
-
```bash
|
|
315
|
-
# Check for supported version files
|
|
316
|
-
ls package.json composer.json VERSION
|
|
101
|
+
---
|
|
317
102
|
|
|
318
|
-
|
|
319
|
-
maiass config --project version_primary_file=your-version-file
|
|
320
|
-
```
|
|
103
|
+
## Supported Version File Formats
|
|
321
104
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
105
|
+
| Format | Example |
|
|
106
|
+
|--------|---------|
|
|
107
|
+
| npm | `package.json` |
|
|
108
|
+
| PHP/Composer | `composer.json` |
|
|
109
|
+
| WordPress | `style.css`, `plugin.php` |
|
|
110
|
+
| Plain text | `VERSION` |
|
|
111
|
+
| Swift/Xcode | `*.xcodeproj/project.pbxproj` |
|
|
327
112
|
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
# Enable verbose debugging
|
|
331
|
-
export MAIASS_DEBUG=true
|
|
332
|
-
maiass --dry-run
|
|
333
|
-
```
|
|
113
|
+
---
|
|
334
114
|
|
|
335
|
-
##
|
|
115
|
+
## Documentation
|
|
336
116
|
|
|
337
|
-
|
|
117
|
+
| Doc | Description |
|
|
118
|
+
|-----|-------------|
|
|
119
|
+
| [Configuration](docs/configuration.md) | All config variables and `.env.maiass` options |
|
|
120
|
+
| [Commands](docs/commands.md) | Full command reference |
|
|
121
|
+
| [Workflow](docs/workflow.md) | How the 4-phase pipeline works |
|
|
122
|
+
| [Setup](docs/setup.md) | Platform-specific setup notes |
|
|
123
|
+
| [API Reference](docs/api.md) | Internal module API |
|
|
124
|
+
| [Development](docs/development.md) | Contributing and dev setup |
|
|
338
125
|
|
|
339
|
-
|
|
126
|
+
---
|
|
340
127
|
|
|
341
|
-
##
|
|
128
|
+
## Contributing
|
|
342
129
|
|
|
343
|
-
|
|
130
|
+
Issues and PRs welcome. See [docs/development.md](docs/development.md) to get started.
|
|
344
131
|
|
|
345
|
-
##
|
|
132
|
+
## License
|
|
346
133
|
|
|
347
|
-
|
|
134
|
+
[GNU General Public License v3.0](LICENSE)
|
package/lib/version-command.js
CHANGED
|
@@ -212,14 +212,20 @@ async function handleVersionBump(bumpType, options) {
|
|
|
212
212
|
* @param {Object} args - Command arguments from yargs
|
|
213
213
|
*/
|
|
214
214
|
export async function handleVersionCommand(args) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
'
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
215
|
+
// args may be a raw argv array (from process.argv.slice) or a yargs-parsed object
|
|
216
|
+
let positionalArgs, dryRun, tag, tagMessage, force, current;
|
|
217
|
+
|
|
218
|
+
if (Array.isArray(args)) {
|
|
219
|
+
positionalArgs = args.filter(a => !a.startsWith('-'));
|
|
220
|
+
dryRun = args.includes('--dry-run');
|
|
221
|
+
tag = args.includes('--tag');
|
|
222
|
+
tagMessage = null;
|
|
223
|
+
force = args.includes('--force');
|
|
224
|
+
current = args.includes('--current');
|
|
225
|
+
} else {
|
|
226
|
+
({ _: positionalArgs, 'dry-run': dryRun, tag, 'tag-message': tagMessage, force, current } = args);
|
|
227
|
+
positionalArgs = positionalArgs || [];
|
|
228
|
+
}
|
|
223
229
|
|
|
224
230
|
try {
|
|
225
231
|
// If --current flag is used, just show current version info
|
package/maiass.mjs
CHANGED
|
@@ -42,7 +42,8 @@ import { bootstrapProject } from './lib/bootstrap.js';
|
|
|
42
42
|
|
|
43
43
|
// Simple CLI setup for pkg compatibility
|
|
44
44
|
const args = process.argv.slice(2);
|
|
45
|
-
|
|
45
|
+
// Skip flags (starting with -) to find the first meaningful argument
|
|
46
|
+
const firstArg = args.find(a => !a.startsWith('-'));
|
|
46
47
|
|
|
47
48
|
// Handle --setup/--bootstrap flag early
|
|
48
49
|
if (args.includes('--setup') || args.includes('--bootstrap')) {
|
|
@@ -251,10 +252,10 @@ if (args.includes('--help') || args.includes('-h') || command === 'help') {
|
|
|
251
252
|
case 'maiass':
|
|
252
253
|
// Handle the main MAIASS workflow
|
|
253
254
|
await handleMaiassCommand({
|
|
254
|
-
_: process.argv.slice(2).filter(arg => !arg.startsWith('
|
|
255
|
+
_: process.argv.slice(2).filter(arg => !arg.startsWith('-')),
|
|
255
256
|
'commits-only': args.includes('--commits-only') || args.includes('-c'),
|
|
256
257
|
'auto-stage': args.includes('--auto-stage'),
|
|
257
|
-
'auto': args.includes('--auto'),
|
|
258
|
+
'auto': args.includes('--auto') || args.includes('-a'),
|
|
258
259
|
'version-bump': versionBump,
|
|
259
260
|
'dry-run': args.includes('--dry-run') || args.includes('-d'),
|
|
260
261
|
force: args.includes('--force') || args.includes('-f'),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maiass",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.9.
|
|
4
|
+
"version": "5.9.33",
|
|
5
5
|
"description": "MAIASS - Modular AI-Augmented Semantic Scribe - Intelligent Git workflow automation",
|
|
6
6
|
"main": "maiass.mjs",
|
|
7
7
|
"bin": {
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"lib/",
|
|
15
15
|
"maiass.mjs",
|
|
16
|
-
"maiass.cjs",
|
|
17
|
-
"maiass-standalone.cjs",
|
|
18
16
|
"setup-env.js",
|
|
19
17
|
"README.md",
|
|
20
18
|
"LICENSE"
|
package/maiass-standalone.cjs
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* MAIASS: Modular AI-Augmented Semantic Scribe
|
|
4
|
-
* Standalone bundled version for distribution
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const fs = require('fs');
|
|
9
|
-
|
|
10
|
-
// Embedded version and config (updated during build)
|
|
11
|
-
const MAIASS_VERSION = "5.3.6";
|
|
12
|
-
const MAIASS_CONFIG = {
|
|
13
|
-
name: "maiass",
|
|
14
|
-
description: "MAIASS: Modular AI-Augmented Semantic Scribe - CLI tool for AI-augmented development",
|
|
15
|
-
version: MAIASS_VERSION
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// Simple argument parsing
|
|
19
|
-
const args = process.argv.slice(2);
|
|
20
|
-
const firstArg = args[0];
|
|
21
|
-
|
|
22
|
-
// Handle version flag
|
|
23
|
-
if (args.includes('--version') || args.includes('-v')) {
|
|
24
|
-
console.log(MAIASS_VERSION);
|
|
25
|
-
process.exit(0);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Handle help flag
|
|
29
|
-
if (args.includes('--help') || args.includes('-h') || firstArg === 'help') {
|
|
30
|
-
console.log(`\nMAIASS v${MAIASS_VERSION}`);
|
|
31
|
-
console.log('Modular AI-Augmented Semantic Scribe\n');
|
|
32
|
-
console.log('Usage: maiass [command] [options]\n');
|
|
33
|
-
console.log('Commands:');
|
|
34
|
-
console.log(' hello Print hello world');
|
|
35
|
-
console.log(' version Show version information');
|
|
36
|
-
console.log(' check-updates Check for available updates');
|
|
37
|
-
console.log('\nOptions:');
|
|
38
|
-
console.log(' --help, -h Show this help message');
|
|
39
|
-
console.log(' --version, -v Show version');
|
|
40
|
-
console.log('\nThis is a bundled Node.js version with limited functionality.');
|
|
41
|
-
console.log('For full features, install from source or use the bash version.');
|
|
42
|
-
console.log('\nHomepage: https://github.com/vsmash/maiass');
|
|
43
|
-
process.exit(0);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Simple color utilities
|
|
47
|
-
const colors = {
|
|
48
|
-
green: (text) => `\x1b[32m${text}\x1b[0m`,
|
|
49
|
-
cyan: (text) => `\x1b[36m${text}\x1b[0m`,
|
|
50
|
-
yellow: (text) => `\x1b[33m${text}\x1b[0m`,
|
|
51
|
-
red: (text) => `\x1b[31m${text}\x1b[0m`,
|
|
52
|
-
bold: (text) => `\x1b[1m${text}\x1b[0m`
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// Check for updates function
|
|
56
|
-
async function checkForUpdates() {
|
|
57
|
-
try {
|
|
58
|
-
console.log(colors.cyan('š Checking for MAIASS updates...'));
|
|
59
|
-
|
|
60
|
-
const https = require('https');
|
|
61
|
-
const url = 'https://api.github.com/repos/vsmash/maiass/releases/latest';
|
|
62
|
-
|
|
63
|
-
return new Promise((resolve, reject) => {
|
|
64
|
-
const req = https.get(url, {
|
|
65
|
-
headers: {
|
|
66
|
-
'User-Agent': 'MAIASS-CLI'
|
|
67
|
-
}
|
|
68
|
-
}, (res) => {
|
|
69
|
-
let data = '';
|
|
70
|
-
res.on('data', (chunk) => data += chunk);
|
|
71
|
-
res.on('end', () => {
|
|
72
|
-
try {
|
|
73
|
-
const release = JSON.parse(data);
|
|
74
|
-
const latestVersion = release.tag_name?.replace('v', '') || release.name;
|
|
75
|
-
|
|
76
|
-
if (latestVersion && latestVersion !== MAIASS_VERSION) {
|
|
77
|
-
console.log(colors.yellow(`š¦ Update available: ${MAIASS_VERSION} ā ${latestVersion}`));
|
|
78
|
-
console.log(colors.cyan('šŗ Update with: brew upgrade maiass'));
|
|
79
|
-
console.log(colors.cyan('š Or visit: https://github.com/vsmash/maiass/releases'));
|
|
80
|
-
} else {
|
|
81
|
-
console.log(colors.green('ā
You have the latest version!'));
|
|
82
|
-
}
|
|
83
|
-
resolve(true);
|
|
84
|
-
} catch (e) {
|
|
85
|
-
console.log(colors.yellow('ā ļø Could not parse update information'));
|
|
86
|
-
resolve(false);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
req.on('error', (err) => {
|
|
92
|
-
console.log(colors.yellow('ā ļø Could not check for updates (offline?)'));
|
|
93
|
-
resolve(false);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
req.setTimeout(5000, () => {
|
|
97
|
-
req.destroy();
|
|
98
|
-
console.log(colors.yellow('ā ļø Update check timed out'));
|
|
99
|
-
resolve(false);
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
} catch (error) {
|
|
103
|
-
console.log(colors.yellow('ā ļø Could not check for updates'));
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Command routing
|
|
109
|
-
async function main() {
|
|
110
|
-
const command = firstArg || 'hello';
|
|
111
|
-
|
|
112
|
-
switch (command) {
|
|
113
|
-
case 'hello':
|
|
114
|
-
console.log(colors.cyan('\nš Hello from MAIASS!'));
|
|
115
|
-
console.log(colors.bold(`Version: ${MAIASS_VERSION}`));
|
|
116
|
-
console.log('\nThis is the bundled Node.js version with basic functionality.');
|
|
117
|
-
console.log('For full features, see: https://github.com/vsmash/maiass');
|
|
118
|
-
|
|
119
|
-
// Auto-check for updates
|
|
120
|
-
console.log('');
|
|
121
|
-
await checkForUpdates();
|
|
122
|
-
break;
|
|
123
|
-
|
|
124
|
-
case 'version':
|
|
125
|
-
console.log(colors.bold(`MAIASS v${MAIASS_VERSION}`));
|
|
126
|
-
console.log(`Node.js ${process.version}`);
|
|
127
|
-
console.log(`Platform: ${process.platform} ${process.arch}`);
|
|
128
|
-
break;
|
|
129
|
-
|
|
130
|
-
case 'check-updates':
|
|
131
|
-
await checkForUpdates();
|
|
132
|
-
break;
|
|
133
|
-
|
|
134
|
-
default:
|
|
135
|
-
console.log(colors.red(`ā Unknown command: ${command}`));
|
|
136
|
-
console.log(colors.cyan('Run `maiass --help` for available commands.'));
|
|
137
|
-
console.log('\nNote: This bundled version has limited functionality.');
|
|
138
|
-
console.log('For full MAIASS features, install from source:');
|
|
139
|
-
console.log('https://github.com/vsmash/maiass');
|
|
140
|
-
process.exit(1);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// Run main function
|
|
145
|
-
main().catch(error => {
|
|
146
|
-
console.error(colors.red('ā Error:'), error.message);
|
|
147
|
-
process.exit(1);
|
|
148
|
-
});
|
package/maiass.cjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* CommonJS wrapper for maiass.mjs to ensure pkg compatibility
|
|
4
|
-
* This file serves as an entry point that pkg can properly handle
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Import the ES module using dynamic import with detailed error handling
|
|
8
|
-
(async () => {
|
|
9
|
-
try {
|
|
10
|
-
// Check if we're running in pkg environment
|
|
11
|
-
const isPkg = typeof process.pkg !== 'undefined';
|
|
12
|
-
|
|
13
|
-
if (isPkg) {
|
|
14
|
-
// In pkg environment, try different import approaches
|
|
15
|
-
console.log('Running in pkg environment, attempting ES module import...');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const module = await import('./maiass.mjs');
|
|
19
|
-
// console.log('ES module imported successfully');
|
|
20
|
-
} catch (error) {
|
|
21
|
-
console.error('Error starting maiass:');
|
|
22
|
-
console.error('Error type:', error.constructor.name);
|
|
23
|
-
console.error('Error message:', error.message);
|
|
24
|
-
console.error('Error stack:', error.stack);
|
|
25
|
-
|
|
26
|
-
// Check if it's a specific pkg-related error
|
|
27
|
-
if (error.message.includes('Invalid host defined options')) {
|
|
28
|
-
console.error('\nThis appears to be a pkg/yargs compatibility issue.');
|
|
29
|
-
console.error('Try running with Node.js directly: node maiass.cjs');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
process.exit(1);
|
|
33
|
-
}
|
|
34
|
-
})();
|