@miphamai/cli 0.2.3 → 0.2.4

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
@@ -7,7 +7,7 @@ Built by [One Mipham Corporation](https://onemipham.com) (北京华安麦逄科
7
7
  ## Quick Install
8
8
 
9
9
  ```bash
10
- npm install -g @mipham/cli
10
+ npm install -g @miphamai/cli
11
11
  mipham
12
12
  ```
13
13
 
package/bin/mipham.ts CHANGED
@@ -3,6 +3,30 @@
3
3
  * Mipham Code — Bun-native entry point for compiled binary.
4
4
  * Used by `bun build --compile` to produce standalone executables.
5
5
  */
6
- import { runApp } from '../src/index'
7
6
 
8
- runApp({})
7
+ async function main() {
8
+ try {
9
+ const { runApp } = await import('../src/index')
10
+ await runApp({})
11
+ } catch (err: unknown) {
12
+ const msg = err instanceof Error ? err.message : String(err)
13
+ if (msg.includes('react-devtools-core')) {
14
+ process.stderr.write(`
15
+ \`mipham\` compiled binary is missing a required dependency.
16
+
17
+ Reinstall Mipham Code:
18
+ npm install -g @miphamai/cli
19
+ mipham
20
+
21
+ Or use the shell script installer:
22
+ curl -fsSL https://onemipham.com/install.sh | bash
23
+
24
+ Docs: https://onemipham.com/mipham-code
25
+ `)
26
+ process.exit(1)
27
+ }
28
+ throw err
29
+ }
30
+ }
31
+
32
+ main()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miphamai/cli",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Mipham Code — Multi-model open-core intelligent coding terminal by MiphamAI",
5
5
  "keywords": [
6
6
  "ai",
@@ -19,7 +19,7 @@ curl -fsSL https://mipham.ai/install.sh | bash
19
19
  **npm global install:**
20
20
 
21
21
  ```bash
22
- npm install -g @mipham/cli
22
+ npm install -g @miphamai/cli
23
23
  mipham
24
24
  ```
25
25
 
@@ -7,6 +7,14 @@
7
7
  import type { QueryEngine } from '../core/engine'
8
8
  import type { MiphamConfig } from '../shared/index.ts'
9
9
  import type { SkillsLoader } from '../skills/loader'
10
+ import {
11
+ PACKAGE_NAME,
12
+ NPM_INSTALL_COMMAND,
13
+ NPM_UPDATE_COMMAND,
14
+ NPM_URL,
15
+ PRODUCT_URL_INTERNATIONAL,
16
+ PRODUCT_URL_CHINA,
17
+ } from '@mipham/shared'
10
18
 
11
19
  export interface CommandContext {
12
20
  engine: QueryEngine
@@ -1139,7 +1147,7 @@ To upgrade:
1139
1147
  curl -fsSL https://mipham.ai/install.sh | bash
1140
1148
 
1141
1149
  Or if installed via npm:
1142
- npm update -g @mipham/cli
1150
+ ${NPM_UPDATE_COMMAND}
1143
1151
 
1144
1152
  Release channels:
1145
1153
  • stable — recommended for most users
@@ -1819,7 +1827,7 @@ JetBrains (IntelliJ / WebStorm / PyCharm):
1819
1827
  Terminal (any):
1820
1828
  alias mipham='cd your-project && bun run path/to/mipham'
1821
1829
 
1822
- Or install globally: npm install -g @mipham/cli
1830
+ Or install globally: ${NPM_INSTALL_COMMAND}
1823
1831
 
1824
1832
  Coming soon: dedicated VS Code & JetBrains plugin extensions.`,
1825
1833
  })
@@ -1832,7 +1840,7 @@ const terminalSetupCmd: CommandHandler = () => ({
1832
1840
  content: `── Terminal Setup ──
1833
1841
 
1834
1842
  Install globally:
1835
- npm install -g @mipham/cli
1843
+ ${NPM_INSTALL_COMMAND}
1836
1844
  mipham
1837
1845
 
1838
1846
  One-liner install:
@@ -1846,7 +1854,7 @@ Add to shell profile (~/.zshrc or ~/.bashrc):
1846
1854
 
1847
1855
  Upgrade:
1848
1856
  curl -fsSL https://mipham.ai/install.sh | bash
1849
- # or: npm update -g @mipham/cli
1857
+ # or: ${NPM_UPDATE_COMMAND}
1850
1858
 
1851
1859
  Verify installation:
1852
1860
  mipham --version