Developer Environment Setup
Goal
After this guide, your local machine can use lzc-cli to connect to the target microservice and is ready for build/deploy tasks.
Prerequisites
- You have a reachable Lazycat microservice.
- Your account can log in to the Lazycat client.
nodeandnpmare available in your terminal.
Steps
1. Install dependencies
- Install Node.js 18+ (LTS recommended).
- Install and sign in to the Lazycat client.
- Install "Lazycat Developer Tool" from App Store on your microservice.
2. Install lzc-cli
npm install -g @lazycatcloud/lzc-cli
lzc-cli --versionIf lzc-cli --version prints a version, installation is successful.
3. Prepare SSH key (first time only)
For Linux/macOS/Git Bash:
[ -f ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ""4. Select default target microservice
lzc-cli box list
lzc-cli box switch <boxname>
lzc-cli box defaultReplace <boxname> with your own target microservice name.
Notes:
- If you are not in WSL/LightOS-like environments and only have one microservice, you can skip this step.
- If you have multiple microservices, use
lzc-cli box switch <boxname>to pin the current target. - In WSL/LightOS-like environments, you can add target via SSH:
lzc-cli box add-by-ssh <loginUser> <address>This requires SSH to be enabled on target microservice.
5. Upload public key to Developer Tool (first time for hclient mode only)
Only for hclient-based access:
lzc-cli box add-public-keyThe command prints an authorization URL. Open it in browser and finish authorization.
If your target is added with lzc-cli box add-by-ssh <loginUser> <address>, skip this step.add-by-ssh mode does not need and cannot use lzc-cli box add-public-key.
6. Create local workspace directory
mkdir -p <your-workspace-dir>Verification
Run:
lzc-cli --version
lzc-cli box default
lzc-cli project --helpPass conditions:
lzc-cliversion is shown.box defaultshows your default microservice.project --helpincludes commands likedeploy/start/info/exec/cp/log/release.
Troubleshooting
1. No default box configured
Reason: default microservice is not configured.
Fix:
lzc-cli box list
lzc-cli box switch <boxname>2. permission denied (publickey)
Reason: your SSH public key is not accepted by target microservice (common in add-by-ssh mode).
Fix:
- If you use hclient mode, run
lzc-cli box add-public-keyand complete browser authorization. - If you use
add-by-sshmode, do not usebox add-public-key; check SSH public key authorization on target.
3. lzc-cli: command not found
Reason: global npm bin path is not in PATH.
Fix: add npm global bin path to your shell PATH, or reopen the terminal.
Next
Continue with: Hello World in 5 Minutes