@morphllm/morphcode 1.0.2 → 2.0.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/cli.js +27 -0
- package/package.json +11 -19
- package/README.md +0 -141
- package/bin/morphcode +0 -84
- package/morphllm-morphcode-1.0.1.tgz +0 -0
- package/postinstall.mjs +0 -122
package/cli.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require("child_process");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const os = require("os");
|
|
6
|
+
|
|
7
|
+
const platform = os.platform() === "win32" ? "windows" : os.platform();
|
|
8
|
+
const arch = os.arch() === "arm64" ? "arm64" : "x64";
|
|
9
|
+
const pkg = `@morphllm/morphcode-${platform}-${arch}`;
|
|
10
|
+
const ext = os.platform() === "win32" ? ".exe" : "";
|
|
11
|
+
|
|
12
|
+
let binPath;
|
|
13
|
+
try {
|
|
14
|
+
const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
|
|
15
|
+
binPath = path.join(pkgDir, `sa${ext}`);
|
|
16
|
+
} catch {
|
|
17
|
+
console.error(`Platform package ${pkg} not found. Install: npm i -g @morphllm/morphcode`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (!fs.existsSync(binPath)) {
|
|
22
|
+
console.error(`Binary not found at ${binPath}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const r = spawnSync(binPath, process.argv.slice(2), { stdio: "inherit" });
|
|
27
|
+
process.exit(r.status ?? 0);
|
package/package.json
CHANGED
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morphllm/morphcode",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
},
|
|
6
|
-
"
|
|
7
|
-
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
8
|
-
},
|
|
9
|
-
"version": "1.0.2",
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"description": "Morph Code — AI coding agent CLI",
|
|
5
|
+
"bin": { "morphcode": "./cli.js" },
|
|
6
|
+
"files": ["cli.js"],
|
|
10
7
|
"optionalDependencies": {
|
|
11
|
-
"@morphllm/morphcode-darwin-arm64": "
|
|
12
|
-
"@morphllm/morphcode-darwin-x64": "
|
|
13
|
-
"@morphllm/morphcode-
|
|
14
|
-
"@morphllm/morphcode-linux-
|
|
15
|
-
"@morphllm/morphcode-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"@morphllm/morphcode-linux-x64-baseline-musl": "1.0.1",
|
|
19
|
-
"@morphllm/morphcode-linux-x64-musl": "1.0.1",
|
|
20
|
-
"@morphllm/morphcode-windows-x64": "1.0.1",
|
|
21
|
-
"@morphllm/morphcode-windows-x64-baseline": "1.0.1"
|
|
22
|
-
}
|
|
8
|
+
"@morphllm/morphcode-darwin-arm64": "2.0.3",
|
|
9
|
+
"@morphllm/morphcode-darwin-x64": "2.0.3",
|
|
10
|
+
"@morphllm/morphcode-linux-arm64": "2.0.3",
|
|
11
|
+
"@morphllm/morphcode-linux-x64": "2.0.3",
|
|
12
|
+
"@morphllm/morphcode-windows-x64": "2.0.3"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT"
|
|
23
15
|
}
|
package/README.md
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# morphcode
|
|
2
|
-
|
|
3
|
-
AI-powered coding agent built for professional software development. morphcode leverages specialized sub-agents to deliver precise, contextual code modifications across your entire codebase.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
morphcode is a next-generation development tool that combines the power of our Dieter-0 coding model with an intelligent multi-agent architecture. Each task is handled by purpose-built sub-agents that understand your codebase structure, dependencies, and architectural patterns.
|
|
8
|
-
|
|
9
|
-
## Key Features
|
|
10
|
-
|
|
11
|
-
**Sub-Agent Architecture**
|
|
12
|
-
|
|
13
|
-
morphcode uses specialized sub-agents for different development tasks:
|
|
14
|
-
- Code exploration and analysis
|
|
15
|
-
- Implementation planning and design
|
|
16
|
-
- File editing and refactoring
|
|
17
|
-
- Testing and validation
|
|
18
|
-
- Documentation generation
|
|
19
|
-
|
|
20
|
-
Learn more about our sub-agent approach at [subagents.com](https://subagents.com)
|
|
21
|
-
|
|
22
|
-
**Dieter-0 Coding Model**
|
|
23
|
-
|
|
24
|
-
Powered by Dieter-0, our specialized coding model designed for building full-stack applications. Dieter-0 understands modern frameworks, database schemas, API patterns, and frontend-backend integration.
|
|
25
|
-
|
|
26
|
-
**Full-Stack Development**
|
|
27
|
-
|
|
28
|
-
Built specifically for full-stack application development:
|
|
29
|
-
- Frontend frameworks (React, Vue, Angular, Svelte)
|
|
30
|
-
- Backend services (Node.js, Python, Go, Rust)
|
|
31
|
-
- Database operations (PostgreSQL, MongoDB, Redis)
|
|
32
|
-
- API design and implementation
|
|
33
|
-
- CI/CD pipeline integration
|
|
34
|
-
|
|
35
|
-
## Installation
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npm install -g @morphllm/morphcode
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Or using yarn:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
yarn global add @morphllm/morphcode
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Quick Start
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
# Initialize morphcode in your project
|
|
51
|
-
morphcode init
|
|
52
|
-
|
|
53
|
-
# Start the coding agent
|
|
54
|
-
morphcode
|
|
55
|
-
|
|
56
|
-
# Run with specific task
|
|
57
|
-
morphcode "Add user authentication to the API"
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Usage
|
|
61
|
-
|
|
62
|
-
morphcode analyzes your codebase and delegates tasks to specialized sub-agents:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# Feature implementation
|
|
66
|
-
morphcode "Implement payment processing with Stripe"
|
|
67
|
-
|
|
68
|
-
# Refactoring
|
|
69
|
-
morphcode "Refactor the auth middleware to use JWT"
|
|
70
|
-
|
|
71
|
-
# Testing
|
|
72
|
-
morphcode "Add unit tests for the user service"
|
|
73
|
-
|
|
74
|
-
# Bug fixes
|
|
75
|
-
morphcode "Fix the race condition in the checkout flow"
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Platform Support
|
|
79
|
-
|
|
80
|
-
morphcode supports all major development platforms:
|
|
81
|
-
|
|
82
|
-
- **Linux**: x64, arm64 (glibc and musl)
|
|
83
|
-
- **macOS**: Apple Silicon (arm64), Intel (x64)
|
|
84
|
-
- **Windows**: x64
|
|
85
|
-
|
|
86
|
-
Platform-specific binaries are automatically installed based on your system.
|
|
87
|
-
|
|
88
|
-
## Pricing
|
|
89
|
-
|
|
90
|
-
**Free until February 1, 2025**
|
|
91
|
-
|
|
92
|
-
morphcode and the Dieter-0 model are available at no cost through February 1, 2025. After this date, usage-based pricing will apply. Early users will receive preferential pricing and additional free usage credits.
|
|
93
|
-
|
|
94
|
-
## Architecture
|
|
95
|
-
|
|
96
|
-
morphcode uses a sophisticated multi-agent system where each agent specializes in specific development tasks:
|
|
97
|
-
|
|
98
|
-
1. **Explore Agent**: Analyzes codebases to understand structure and patterns
|
|
99
|
-
2. **Plan Agent**: Designs implementation strategies and architectural changes
|
|
100
|
-
3. **Code Agent**: Executes precise file modifications and refactoring
|
|
101
|
-
4. **Test Agent**: Validates changes and generates test coverage
|
|
102
|
-
5. **Review Agent**: Performs code quality checks and security analysis
|
|
103
|
-
|
|
104
|
-
This architecture ensures that complex development tasks are broken down into manageable subtasks, each handled by the most appropriate specialized agent.
|
|
105
|
-
|
|
106
|
-
## Documentation
|
|
107
|
-
|
|
108
|
-
For detailed documentation, API references, and advanced usage:
|
|
109
|
-
|
|
110
|
-
- Documentation: [docs.morphllm.com](https://docs.morphllm.com)
|
|
111
|
-
- Sub-Agents Guide: [subagents.com](https://subagents.com)
|
|
112
|
-
- API Reference: [api.morphllm.com](https://api.morphllm.com)
|
|
113
|
-
|
|
114
|
-
## Requirements
|
|
115
|
-
|
|
116
|
-
- Node.js 18+ or Bun 1.0+
|
|
117
|
-
- Git (for version control integration)
|
|
118
|
-
- Minimum 4GB RAM
|
|
119
|
-
- Internet connection for model inference
|
|
120
|
-
|
|
121
|
-
## Contributing
|
|
122
|
-
|
|
123
|
-
morphcode is proprietary software. For partnership inquiries or enterprise licensing, contact enterprise@morphllm.com.
|
|
124
|
-
|
|
125
|
-
## Support
|
|
126
|
-
|
|
127
|
-
- Technical Support: support@morphllm.com
|
|
128
|
-
- Documentation Issues: docs@morphllm.com
|
|
129
|
-
- Enterprise: enterprise@morphllm.com
|
|
130
|
-
|
|
131
|
-
## License
|
|
132
|
-
|
|
133
|
-
Copyright (c) 2025 MorphLLM. All rights reserved.
|
|
134
|
-
|
|
135
|
-
This software is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited.
|
|
136
|
-
|
|
137
|
-
## About MorphLLM
|
|
138
|
-
|
|
139
|
-
MorphLLM builds advanced AI systems for software development. Our mission is to augment developer productivity through intelligent automation while maintaining code quality and architectural integrity.
|
|
140
|
-
|
|
141
|
-
Visit [morphllm.com](https://morphllm.com) to learn more about our products and services.
|
package/bin/morphcode
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const childProcess = require("child_process")
|
|
4
|
-
const fs = require("fs")
|
|
5
|
-
const path = require("path")
|
|
6
|
-
const os = require("os")
|
|
7
|
-
|
|
8
|
-
function run(target) {
|
|
9
|
-
const result = childProcess.spawnSync(target, process.argv.slice(2), {
|
|
10
|
-
stdio: "inherit",
|
|
11
|
-
})
|
|
12
|
-
if (result.error) {
|
|
13
|
-
console.error(result.error.message)
|
|
14
|
-
process.exit(1)
|
|
15
|
-
}
|
|
16
|
-
const code = typeof result.status === "number" ? result.status : 0
|
|
17
|
-
process.exit(code)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const envPath = process.env.MORPHCODE_BIN_PATH
|
|
21
|
-
if (envPath) {
|
|
22
|
-
run(envPath)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const scriptPath = fs.realpathSync(__filename)
|
|
26
|
-
const scriptDir = path.dirname(scriptPath)
|
|
27
|
-
|
|
28
|
-
const platformMap = {
|
|
29
|
-
darwin: "darwin",
|
|
30
|
-
linux: "linux",
|
|
31
|
-
win32: "windows",
|
|
32
|
-
}
|
|
33
|
-
const archMap = {
|
|
34
|
-
x64: "x64",
|
|
35
|
-
arm64: "arm64",
|
|
36
|
-
arm: "arm",
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let platform = platformMap[os.platform()]
|
|
40
|
-
if (!platform) {
|
|
41
|
-
platform = os.platform()
|
|
42
|
-
}
|
|
43
|
-
let arch = archMap[os.arch()]
|
|
44
|
-
if (!arch) {
|
|
45
|
-
arch = os.arch()
|
|
46
|
-
}
|
|
47
|
-
const base = "@morphllm/morphcode-" + platform + "-" + arch
|
|
48
|
-
const binary = platform === "windows" ? "morphcode.exe" : "morphcode"
|
|
49
|
-
|
|
50
|
-
function findBinary(startDir) {
|
|
51
|
-
let current = startDir
|
|
52
|
-
for (;;) {
|
|
53
|
-
const modules = path.join(current, "node_modules")
|
|
54
|
-
if (fs.existsSync(modules)) {
|
|
55
|
-
const entries = fs.readdirSync(modules)
|
|
56
|
-
for (const entry of entries) {
|
|
57
|
-
if (!entry.startsWith(base)) {
|
|
58
|
-
continue
|
|
59
|
-
}
|
|
60
|
-
const candidate = path.join(modules, entry, "bin", binary)
|
|
61
|
-
if (fs.existsSync(candidate)) {
|
|
62
|
-
return candidate
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const parent = path.dirname(current)
|
|
67
|
-
if (parent === current) {
|
|
68
|
-
return
|
|
69
|
-
}
|
|
70
|
-
current = parent
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const resolved = findBinary(scriptDir)
|
|
75
|
-
if (!resolved) {
|
|
76
|
-
console.error(
|
|
77
|
-
'It seems that your package manager failed to install the right version of the morphcode CLI for your platform. You can try manually installing the "' +
|
|
78
|
-
base +
|
|
79
|
-
'" package',
|
|
80
|
-
)
|
|
81
|
-
process.exit(1)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
run(resolved)
|
|
Binary file
|
package/postinstall.mjs
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import fs from "fs"
|
|
4
|
-
import path from "path"
|
|
5
|
-
import os from "os"
|
|
6
|
-
import { fileURLToPath } from "url"
|
|
7
|
-
import { createRequire } from "module"
|
|
8
|
-
|
|
9
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
10
|
-
const require = createRequire(import.meta.url)
|
|
11
|
-
|
|
12
|
-
function detectPlatformAndArch() {
|
|
13
|
-
// Map platform names
|
|
14
|
-
let platform
|
|
15
|
-
switch (os.platform()) {
|
|
16
|
-
case "darwin":
|
|
17
|
-
platform = "darwin"
|
|
18
|
-
break
|
|
19
|
-
case "linux":
|
|
20
|
-
platform = "linux"
|
|
21
|
-
break
|
|
22
|
-
case "win32":
|
|
23
|
-
platform = "windows"
|
|
24
|
-
break
|
|
25
|
-
default:
|
|
26
|
-
platform = os.platform()
|
|
27
|
-
break
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// Map architecture names
|
|
31
|
-
let arch
|
|
32
|
-
switch (os.arch()) {
|
|
33
|
-
case "x64":
|
|
34
|
-
arch = "x64"
|
|
35
|
-
break
|
|
36
|
-
case "arm64":
|
|
37
|
-
arch = "arm64"
|
|
38
|
-
break
|
|
39
|
-
case "arm":
|
|
40
|
-
arch = "arm"
|
|
41
|
-
break
|
|
42
|
-
default:
|
|
43
|
-
arch = os.arch()
|
|
44
|
-
break
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return { platform, arch }
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function findBinary() {
|
|
51
|
-
const { platform, arch } = detectPlatformAndArch()
|
|
52
|
-
const packageName = `@morphllm/morphcode-${platform}-${arch}`
|
|
53
|
-
const binaryName = platform === "windows" ? "morphcode.exe" : "morphcode"
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
// Use require.resolve to find the package
|
|
57
|
-
const packageJsonPath = require.resolve(`${packageName}/package.json`)
|
|
58
|
-
const packageDir = path.dirname(packageJsonPath)
|
|
59
|
-
const binaryPath = path.join(packageDir, "bin", binaryName)
|
|
60
|
-
|
|
61
|
-
if (!fs.existsSync(binaryPath)) {
|
|
62
|
-
throw new Error(`Binary not found at ${binaryPath}`)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return { binaryPath, binaryName }
|
|
66
|
-
} catch (error) {
|
|
67
|
-
throw new Error(`Could not find package ${packageName}: ${error.message}`)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function prepareBinDirectory(binaryName) {
|
|
72
|
-
const binDir = path.join(__dirname, "bin")
|
|
73
|
-
const targetPath = path.join(binDir, binaryName)
|
|
74
|
-
|
|
75
|
-
// Ensure bin directory exists
|
|
76
|
-
if (!fs.existsSync(binDir)) {
|
|
77
|
-
fs.mkdirSync(binDir, { recursive: true })
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Remove existing binary/symlink if it exists
|
|
81
|
-
if (fs.existsSync(targetPath)) {
|
|
82
|
-
fs.unlinkSync(targetPath)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return { binDir, targetPath }
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function symlinkBinary(sourcePath, binaryName) {
|
|
89
|
-
const { targetPath } = prepareBinDirectory(binaryName)
|
|
90
|
-
|
|
91
|
-
fs.symlinkSync(sourcePath, targetPath)
|
|
92
|
-
console.log(`morphcode binary symlinked: ${targetPath} -> ${sourcePath}`)
|
|
93
|
-
|
|
94
|
-
// Verify the file exists after operation
|
|
95
|
-
if (!fs.existsSync(targetPath)) {
|
|
96
|
-
throw new Error(`Failed to symlink binary to ${targetPath}`)
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
async function main() {
|
|
101
|
-
try {
|
|
102
|
-
if (os.platform() === "win32") {
|
|
103
|
-
// On Windows, the .exe is already included in the package and bin field points to it
|
|
104
|
-
// No postinstall setup needed
|
|
105
|
-
console.log("Windows detected: binary setup not needed (using packaged .exe)")
|
|
106
|
-
return
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const { binaryPath, binaryName } = findBinary()
|
|
110
|
-
symlinkBinary(binaryPath, binaryName)
|
|
111
|
-
} catch (error) {
|
|
112
|
-
console.error("Failed to setup morphcode binary:", error.message)
|
|
113
|
-
process.exit(1)
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
try {
|
|
118
|
-
main()
|
|
119
|
-
} catch (error) {
|
|
120
|
-
console.error("Postinstall script error:", error.message)
|
|
121
|
-
process.exit(0)
|
|
122
|
-
}
|