CLI Installation
Install the MyClaude CLI globally via npm: npm install -g @myclaude-cli/cli.
Install the MyClaude CLI globally via npm: npm install -g @myclaude-cli/cli.
This tutorial covers requirements, installation, version verification, and initial authentication. Completion time: under 3 minutes on a machine that already has Node.js.
Requirements
| Requirement | Minimum version | Check |
|---|---|---|
| Node.js | 18.0.0 | node --version |
| npm | 9.0.0 | npm --version |
| Internet access | — | Required for install and auth |
Node.js 18 is the minimum because the CLI uses the native fetch API and node:crypto module, both stable since Node 18. Earlier versions will fail at runtime with a module resolution error.
If your system Node.js is below 18, use nvm to install a current LTS release:
$ nvm install --lts
$ nvm use --lts
$ node --version
# v22.x.xInstall
Run the global install command:
$ npm install -g @myclaude-cli/cliExpected output:
added 47 packages in 4s
@myclaude-cli/cli@0.1.0 installed globallyThe install places the myclaude binary in your npm global bin directory. If npm global bin is not in your PATH, see Troubleshooting below.
Verify
Confirm the binary is reachable and the version is correct:
$ myclaude --version
# myclaude-cli 0.1.0If this command returns command not found, the npm global bin directory is not in your PATH. See Troubleshooting.
Authentication
All CLI commands that communicate with MyClaude (search, install, publish, and others) require an authenticated session. Run:
$ myclaude loginThe CLI opens your default browser to the MyClaude authentication page. Complete sign-in there, then return to the terminal. On success:
Authenticated as @your-username
Session stored at ~/.myclaude/credentials.jsonYour session token is stored locally at ~/.myclaude/credentials.json. The token does not expire during normal use. It is invalidated only when you run myclaude logout or revoke access from your MyClaude account settings.
To confirm your session at any time:
$ myclaude whoami
# Logged in as @your-usernameTroubleshooting
Command not found after install
The myclaude binary is placed in the npm global bin directory. If myclaude is not found after install, that directory is not in your shell's PATH.
Find the npm global bin directory:
$ npm bin -g
# /home/user/.npm-global/bin (Linux/macOS example)
# C:\Users\user\AppData\Roaming\npm (Windows example)Add that path to your shell profile (~/.bashrc, ~/.zshrc, or equivalent) and reload:
$ echo 'export PATH="$(npm bin -g):$PATH"' >> ~/.zshrc
$ source ~/.zshrc
$ myclaude --versionPermission denied on global install (Linux/macOS)
Running npm install -g with sudo is not recommended. Instead, configure npm to use a user-owned directory:
$ mkdir -p ~/.npm-global
$ npm config set prefix ~/.npm-global
$ echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.zshrc
$ source ~/.zshrc
$ npm install -g @myclaude-cli/cliWindows: myclaude not recognized
On Windows, npm global installs go to %APPDATA%\npm. Verify this directory is in your system PATH via System Properties → Environment Variables. After adding it, restart your terminal.
Browser does not open during myclaude login
If myclaude login prints a URL but does not open a browser, copy the URL from the terminal output and open it manually. Authentication completes the same way regardless of whether the browser was launched automatically.
Related pages
- CLI Commands Reference — complete reference for all 12 commands
- Quickstart — full end-to-end flow from install to first product
- Installing Products via CLI — buyer-specific install walkthrough