@matrixhub/cli
v0.1.4
Published
CLI tool for deploying and managing MatrixHub
Maintainers
Readme
@matrixhub/cli
CLI tool for deploying and managing MatrixHub - your self-hosted AI model registry.
🚀 Quick Start
No installation needed! Use npx to run MatrixHub directly:
npx @matrixhub/cli startOr install globally:
npm install -g @matrixhub/cli
matrixhub start📋 Prerequisites
- Docker installed and running
- Node.js 18+ (for npx/npm)
🎯 Commands
start
Start a new MatrixHub container:
npx @matrixhub/cli start [options]Options:
-p, --port <port>- Port to expose (default: 9527)-d, --data <path>- Data directory path (default: ./data)-n, --name <name>- Container name (default: matrixhub)--image <image>- Docker image to use (default: ghcr.io/matrixhub-ai/matrixhub:main)
Examples:
# Start with defaults (port 9527, ./data directory)
npx @matrixhub/cli start
# Start on custom port with custom data directory
npx @matrixhub/cli start -p 8080 -d ~/matrixhub-data
# Use a specific image version
npx @matrixhub/cli start --image ghcr.io/matrixhub-ai/matrixhub:v1.0.0stop
Stop the running MatrixHub container:
npx @matrixhub/cli stoprestart
Restart the MatrixHub container:
npx @matrixhub/cli restartstatus
Check the status of the MatrixHub container:
npx @matrixhub/cli statuslogs
View container logs:
npx @matrixhub/cli logs [options]Options:
-f, --follow- Follow log output (liketail -f)--tail <lines>- Number of lines to show from the end (default: 100)
Examples:
# View last 100 lines of logs
npx @matrixhub/cli logs
# Follow logs in real-time
npx @matrixhub/cli logs -f
# View last 500 lines
npx @matrixhub/cli logs --tail 500update
Update MatrixHub to the latest version:
npx @matrixhub/cli updateThis will:
- Pull the latest Docker image
- Stop the current container
- Remove the old container
- Prompt you to start the new version
🎨 Features
- Zero Configuration: Works out of the box with sensible defaults
- Interactive: Prompts for confirmation when needed
- Colorful Output: Clear, easy-to-read terminal output
- Error Handling: Helpful error messages and recovery suggestions
- Docker Detection: Checks if Docker is installed before running
🛠️ Development
# Clone the repository
git clone https://github.com/matrixhub-ai/matrixhub.git
cd matrixhub/packages/cli
# Install dependencies
npm install
# Build
npm run build
# Link locally for testing
npm link
# Now you can use the command
matrixhub start📄 License
Apache-2.0 - see LICENSE for details.
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details.
