@mintlify/cli 4.1.32 → 4.1.34
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 +2 -2
- package/dist/start.js +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -16,6 +16,6 @@ Setup defaults to the current project. Use `--global` for your user account. Pas
|
|
|
16
16
|
|
|
17
17
|
Skills are installed with `npx --yes skills@1.7.4 add https://mintlify.com/docs`, using the selected agents and scope. Rerunning setup refreshes these downloaded skills and replaces local edits to them.
|
|
18
18
|
|
|
19
|
-
Admin MCP uses the server name `mintlify
|
|
19
|
+
Admin MCP uses the server name `mintlify` and URL `https://mcp.mintlify.com`. Setup preserves existing configuration and skips a matching server entry. A conflicting entry or invalid configuration stops setup before skills are installed. Codex configurations with an inline `mcp_servers` table need manual setup, as do global Claude Code configurations using `CLAUDE_CONFIG_DIR`.
|
|
20
20
|
|
|
21
|
-
After configuration, complete OAuth sign-in in each agent to grant access to your Mintlify account and projects. In Claude Code, use `/mcp`; in Cursor, connect the server in MCP settings. For Codex project setup, the printed login command passes the server URL explicitly because some CLI versions do not read project configuration for `mcp login`. Global Codex setup uses `codex mcp login mintlify
|
|
21
|
+
After configuration, complete OAuth sign-in in each agent to grant access to your Mintlify account and projects. In Claude Code, use `/mcp`; in Cursor, connect the server in MCP settings. For Codex project setup, the printed login command passes the server URL explicitly because some CLI versions do not read project configuration for `mcp login`. Global Codex setup uses `codex mcp login mintlify`. Project configurations may require trusting the project and approving the server first. The command does not reuse `mint login` credentials or complete OAuth on your behalf.
|
package/dist/start.js
CHANGED
|
@@ -2170,7 +2170,7 @@ let hFt=/^[a-zA-Z0-9-_]+[ \t]*$/;function U0(e,t,n=`=`){let r=t-1,i=[],a=e.index
|
|
|
2170
2170
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
2171
2171
|
*/
|
|
2172
2172
|
function vFt(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&(r!==1||c.t!==3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function yFt(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=V0(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=U0(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new R0(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=vFt(n[0],r,i,t?2:1);if(!c)throw new R0(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=U0(e,s),i=vFt(r[0],a,o,0);if(!i)throw new R0(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=H0(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=V0(e,s,!0),e[s]&&e[s]!==`
|
|
2173
|
-
`&&e[s]!==`\r`)throw new R0(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=V0(e,s)}return r}var W0=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const G0=`mintlify
|
|
2173
|
+
`&&e[s]!==`\r`)throw new R0(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=V0(e,s)}return r}var W0=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const G0=`mintlify`,K0=`https://mcp.mintlify.com`;function q0(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function bFt(e){return W0(this,void 0,void 0,function*(){try{return yield Wn.readFile(e,`utf8`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return;throw e}})}function xFt(e,t){let n=t.env??process.env;if(e===`codex`){let e=Rt.join(t.cwd,`.codex`);return t.global&&(e=n.CODEX_HOME||Rt.join(t.homeDir,`.codex`)),Rt.join(e,`config.toml`)}if(e===`cursor`){let e=t.global?t.homeDir:t.cwd;return Rt.join(e,`.cursor`,`mcp.json`)}if(t.global){if(n.CLAUDE_CONFIG_DIR)throw Error(`CLAUDE_CONFIG_DIR is set. Configure Claude Code with: claude mcp add --scope user --transport http ${G0} ${K0}`);return Rt.join(t.homeDir,`.claude.json`)}return Rt.join(t.cwd,`.mcp.json`)}function SFt(e,t){return W0(this,void 0,void 0,function*(){let n=xFt(e,t),r=yield Wn.realpath(n).catch(e=>{if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return n;throw e}),i=yield bFt(r),a=i??``,o=e===`codex`?`mcp_servers`:`mcpServers`,s;try{if(e===`codex`)s=yFt(a);else{let e=[];if(s=XPt(a||`{}`,e,{allowTrailingComma:!0}),e.length>0)throw Error(`Invalid JSON`)}}catch{throw Error(`Cannot parse ${r}. Fix its configuration before running setup.`)}if(!q0(s))throw Error(`Expected an object in ${r}.`);let c=s[o];if(c!==void 0&&!q0(c))throw Error(`Expected ${o} to be an object in ${r}.`);let l=c?.[G0];if(l!==void 0){if(!q0(l)||l.url!==`https://mcp.mintlify.com`||l.command!==void 0)throw Error(`${G0} already has a different configuration in ${r}. Rename or remove that entry before running setup.`);if(e===`claude-code`&&l.type!==`http`)throw Error(`Set type to "http" for ${G0} in ${r} before running setup.`);return{path:r,original:i,contents:void 0}}let u=a.includes(`\r
|
|
2174
2174
|
`)?`\r
|
|
2175
2175
|
`:`
|
|
2176
2176
|
`,d;if(e===`codex`){d=`${a}${u}[mcp_servers.${G0}]${u}url = "${K0}"${u}`;try{yFt(d)}catch{throw Error(`Cannot safely extend ${r}. Add a ${G0} entry with url = "${K0}" to mcp_servers manually.`)}}else{let t={url:K0};e===`claude-code`&&(t.type=`http`),d=$Pt(a||`{}`,QPt(a||`{}`,[o,G0],t,{formattingOptions:{insertSpaces:!0,tabSize:2,eol:u}})),d.endsWith(u)||(d+=u)}return{path:r,original:i,contents:d}})}function CFt(e){return W0(this,void 0,void 0,function*(){if((yield bFt(e.path))!==e.original)throw Error(`${e.path} changed during setup. Run setup again to preserve those changes.`);if(e.contents===void 0)return;yield Wn.mkdir(Rt.dirname(e.path),{recursive:!0,mode:448});let t=384;e.original!==void 0&&(t=(yield Wn.stat(e.path)).mode);let n=`${e.path}.${In()}.tmp`;try{yield Wn.writeFile(n,e.contents,{mode:t,flag:`wx`}),e.original!==void 0&&(yield Wn.chmod(n,t)),yield Wn.rename(n,e.path)}finally{yield Wn.rm(n,{force:!0})}})}var wFt=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const J0=[`claude-code`,`codex`,`cursor`],TFt={"claude-code":`Claude Code`,codex:`Codex`,cursor:`Cursor`};function EFt(e){return J0.some(t=>t===e)}function DFt(){let e=Sn.homedir(),t=P$();return J0.filter(n=>n===`codex`?t===`codex_cli`||An(process.env.CODEX_HOME||Rt.join(e,`.codex`)):n===`claude-code`?t===`claude_code`||An(process.env.CLAUDE_CONFIG_DIR||Rt.join(e,`.claude`)):t===`cursor`||t===`cursor-cli`||An(Rt.join(e,`.cursor`)))}function OFt(e,t){let n=[`--yes`,`skills@1.7.4`,`add`,`https://mintlify.com/docs`,`--agent`,...e,`--yes`];return t&&n.push(`--global`),new Promise((e,t)=>{let r=Pr(`npx`,n,{stdio:[`ignore`,`pipe`,`pipe`],shell:process.platform===`win32`}),i=``,a=e=>{i=(i+e.toString()).slice(-65536)};r.stdout.on(`data`,e=>{a(e),process.stdout.write(e.toString())}),r.stderr.on(`data`,e=>{a(e),process.stderr.write(e.toString())}),r.on(`error`,()=>t(/* @__PURE__ */ Error(`Could not run npx. Install npm and run setup again.`))),r.on(`close`,(n,r)=>{n!==0||/Failed to install\s+\d+/.test(gr(i))?t(/* @__PURE__ */ Error(`Skills installation failed (${r??n}). Review the installer output and run setup again.`)):e()})})}function kFt(e){return wFt(this,void 0,void 0,function*(){let[t=0,n=0]=process.versions.node.split(`.`).map(Number);if(t<22||t===22&&n<20)throw Error(`mint agent setup requires Node.js 22.20 or later to install skills. Upgrade Node.js and try again.`);let r=!!(process.stdin.isTTY&&process.stdout.isTTY),i=[];for(let t of e.agents??[]){if(!EFt(t))throw Error(`Unsupported agent: ${t}`);i.includes(t)||i.push(t)}if(i.length===0){let e=DFt();i=r?yield mPt({message:`Which agents should use Mintlify?`,choices:J0.map(t=>({name:TFt[t],value:t,checked:e.includes(t)})),required:!0}):e}if(i.length===0)throw Error(`No supported agents detected. Pass --agent claude-code, codex, or cursor.`);let a={cwd:process.cwd(),homeDir:Sn.homedir(),global:e.global},o=yield Promise.all(i.map(e=>SFt(e,a))),s=e.global?`your user account`:`this project`;process.stdout.write(`Setting up Mintlify skills and Admin MCP for ${s}.\n`),yield OFt(i,e.global);for(let e of o){yield CFt(e);let t=e.contents===void 0?`Already configured`:`Configured`;process.stdout.write(`${t}: ${e.path}\n`)}process.stdout.write(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/cli",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.34",
|
|
4
4
|
"description": "The Mintlify CLI",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -51,21 +51,21 @@
|
|
|
51
51
|
"sharp": "0.33.5"
|
|
52
52
|
},
|
|
53
53
|
"optionalDependencies": {
|
|
54
|
-
"@mintlify/package-builder": "0.0.
|
|
54
|
+
"@mintlify/package-builder": "0.0.157",
|
|
55
55
|
"fsevents": "2.3.3",
|
|
56
56
|
"keytar": "7.9.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@inquirer/prompts": "7.9.0",
|
|
60
|
-
"@mintlify/common": "1.0.
|
|
61
|
-
"@mintlify/editor": "0.0.
|
|
62
|
-
"@mintlify/link-rot": "3.0.
|
|
63
|
-
"@mintlify/models": "0.0.
|
|
64
|
-
"@mintlify/og": "0.0.
|
|
65
|
-
"@mintlify/prebuild": "1.0.
|
|
66
|
-
"@mintlify/previewing": "4.0.
|
|
60
|
+
"@mintlify/common": "1.0.1368",
|
|
61
|
+
"@mintlify/editor": "0.0.647",
|
|
62
|
+
"@mintlify/link-rot": "3.0.1617",
|
|
63
|
+
"@mintlify/models": "0.0.394",
|
|
64
|
+
"@mintlify/og": "0.0.167",
|
|
65
|
+
"@mintlify/prebuild": "1.0.1546",
|
|
66
|
+
"@mintlify/previewing": "4.0.1634",
|
|
67
67
|
"@mintlify/ts-config": "2.0.2",
|
|
68
|
-
"@mintlify/validation": "0.1.
|
|
68
|
+
"@mintlify/validation": "0.1.973",
|
|
69
69
|
"@tsconfig/recommended": "1.0.2",
|
|
70
70
|
"@types/detect-port": "1.3.2",
|
|
71
71
|
"@types/keytar": "4.4.2",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"yargs": "17.7.1",
|
|
114
114
|
"zod": "4.3.6"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "6b1e15c4df9823fb16497fff699c86ea262e7ccf"
|
|
117
117
|
}
|