TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/remorses/kimaki/llms.txt
Use this file to discover all available pages before exploring further.
upgrade command updates your Kimaki installation to the latest version and can automatically restart the running bot process.
Usage
Skip restart
Upgrade without restarting:Command options
Skip the automatic bot restart after upgrading. You’ll need to manually restart the bot to use the new version.
What happens during upgrade
Behavior
Version detection
The upgrade command:- Checks your current version from
package.json - Queries npm for the latest published version
- Compares versions
- Installs if a newer version exists
- Skips installation if you’re already on the latest version
Graceful restart
When the bot receivesSIGUSR2:
- Waits 1000ms for in-flight requests to complete
- Closes database connections
- Stops OpenCode servers
- Exits with code 0
- Process manager (if used) or systemd restarts the bot automatically
Examples
Standard upgrade
Upgrade without restart
Already up to date
In-Discord upgrade
You can also upgrade from Discord with the/upgrade-and-restart slash command:
Manual restart
If you need to restart the bot without upgrading:Process management
For production deployments, use a process manager to handle restarts:With PM2
With systemd
/etc/systemd/system/kimaki.service
SIGUSR2.
Troubleshooting
Upgrade succeeds but bot doesn't restart
Upgrade succeeds but bot doesn't restart
If you’re not using a process manager, the bot exits after
SIGUSR2 and won’t auto-restart. Start it manually:Error: Cannot find running bot process
Error: Cannot find running bot process
The bot isn’t running or is using a different
--data-dir. Check:Permission denied during install
Permission denied during install
You may need sudo for global npm installs:Or use a Node version manager (nvm, fnm) to avoid sudo.
Bot restarted but still shows old version
Bot restarted but still shows old version
The bot caches the version at startup. Force a full restart:
Version history
Check the GitHub releases for changelogs and breaking changes.Best practices
Test upgrades in a development environment first, especially for major version bumps.