Criage Documentation

Welcome to the Criage documentation - a high-performance package manager written in Go!

Installation

From Source Code

The easiest way to install Criage is to build from source code:

git clone https://github.com/Zu-Krein/criage.git
cd criage
go build -o criage
sudo mv criage /usr/local/bin/

Requirements

  • Go 1.21 or higher
  • Git for cloning the repository
  • Administrator rights for installation to system paths

Installation Verification

criage --version
Note: After installation, restart your terminal or update the PATH variable.

Basic Usage

Getting Started

After installation, Criage is ready to use. Basic commands:

# Show help
criage --help

# Show version
criage --version

# Show list of installed packages
criage list

Command Structure

Criage uses the command structure: criage [command] [parameters] [flags]

Example: criage install my-package --version 1.2.3 --global

Package Management

Installing Packages

# Install package
criage install package-name

# Install specific version
criage install package-name --version 1.2.3

# Global installation
criage install package-name --global

# Install with dev dependencies
criage install package-name --dev

# Install local .criage file
criage install ./my-package-1.0.0.criage

Removing Packages

# Remove package
criage uninstall package-name

# Complete removal with configuration
criage uninstall package-name --purge

# Remove global package
criage uninstall package-name --global

Updating Packages

# Update package
criage update package-name

# Update all packages
criage update --all

# Update global packages
criage update --global

Search and Information

# Search packages
criage search keyword

# Show package information
criage info package-name

# Show installed packages
criage list

# Show outdated packages
criage list --outdated

Package Development

Creating a New Package

# Create package with basic settings
criage create my-package

# Create with additional parameters
criage create my-package --author "Your Name" --description "Package description"

Package Structure

A created package has the following structure:

my-package/
├── criage.yaml          # Package manifest
├── src/                 # Source files
├── build.json          # Build configuration
└── README.md           # Documentation

Building a Package

# Build with default settings
criage build

# Specify format and compression level
criage build --format tar.zst --compression 6

# Specify output file
criage build --output my-package-1.0.0.criage

Publishing a Package

# Publish to repository
criage publish --registry https://packages.example.com --token YOUR_TOKEN

Repository Management

Adding Repositories

# Add repository
criage repo add myrepo https://packages.example.com

# Add with authorization token
criage repo add private-repo https://private.example.com --token YOUR_TOKEN

# Add with priority
criage repo add priority-repo https://priority.example.com --priority 10

Managing Repositories

# Show repository list
criage repo list

# Show repository information
criage repo info myrepo

# Remove repository
criage repo remove myrepo

# Update all repository indexes
criage repo update
Repository Priority: High priority (large number) means that packages from this repository will be preferred during search.

🤖 MCP Server

Criage MCP Server provides full package manager functionality through the MCP (Model Context Protocol) for integration with AI tools.

What is MCP Server?

MCP Server allows AI assistants to directly interact with Criage for:

  • 🔍 Searching and installing packages
  • 📦 Managing dependencies
  • 🆕 Creating new packages
  • 🔨 Building and publishing packages
  • 📊 Getting information about packages and repositories

MCP Server Installation

# Navigate to mcp-server directory
cd mcp-server

# Install dependencies
go mod tidy

# Build server
go build -o criage-mcp-server .

Claude Desktop Integration

Add MCP Server to Claude Desktop configuration (%APPDATA%\Claude\config.json on Windows):

{
  "mcpServers": {
    "criage": {
      "command": "C:\\path\\to\\criage-mcp-server.exe",
      "args": [],
      "env": {}
    }
  }
}

Available MCP Tools

📦 Package Management

  • install_package - Install package
  • uninstall_package - Remove package
  • update_package - Update package
  • list_packages - List packages

🔍 Search and Exploration

  • search_packages - Search packages
  • package_info - Package information
  • repository_info - Repository information

🛠️ Development

  • create_package - Create package
  • build_package - Build package
  • publish_package - Publish package

AI Usage Examples

Search and install web framework:
"Find a web framework package and install it"

AI will automatically:
1. Search packages with "web framework" keyword
2. Suggest suitable options
3. Install the selected package
Create new project:
"Create a new package for API work"

AI will execute:
1. Create package structure
2. Configure manifest
3. Add basic files

Server Configuration

MCP Server uses standard Criage configuration from ~/.criage/config.json. Default configuration is automatically created on first run.

Logging and Debugging

# Enable verbose logging
set CRIAGE_DEBUG=1

# Run server
./criage-mcp-server
Compatibility: MCP Server is fully compatible with the main Criage client and supports all archive formats and operations.
Security: MCP Server runs with full user privileges. Make sure you trust the AI system before providing access to package management.

Configuration

Viewing Settings

# Show all settings
criage config list

# Show specific setting
criage config get cache.path

Changing Settings

# Set value
criage config set cache.path /custom/cache/path

# Set boolean parameter
criage config set parallel.enabled true

Main Configuration Parameters

  • cache.path - package cache path
  • parallel.enabled - enable parallel processing
  • compression.default - default compression algorithm
  • repository.timeout - timeout for repository requests

Compression Formats

Criage supports several compression algorithms to optimize size and speed:

Available Formats

  • tar.zst - Zstandard (recommended) - good balance of speed and compression
  • tar.lz4 - LZ4 - maximum speed, average compression
  • tar.xz - XZ/LZMA - maximum compression, low speed
  • tar.gz - Gzip - universal compatibility
  • zip - ZIP - Windows compatibility

Choosing Format During Build

# Use Zstandard with compression level 3
criage build --format tar.zst --compression 3

# Use LZ4 for maximum speed
criage build --format tar.lz4

# Use XZ for minimum size
criage build --format tar.xz --compression 9
Warning: High compression levels (7-9) significantly increase build time.

🌍 Localization

Criage features a dynamic localization system that supports multiple languages without requiring code modifications. The system automatically detects available languages and provides an easy way to add new localizations.

Supported Languages

  • 🇬🇧 English (en) - Default
  • 🇷🇺 Russian (ru)
  • 🇩🇪 German (de)
  • 🇪🇸 Spanish (es)

Setting Language

Criage automatically detects your system language. You can also set it manually using environment variables:

# Set language for current session
export LANG=de_DE.UTF-8
criage --help

# Or use LANGUAGE variable
export LANGUAGE=es
criage install package-name

Adding New Languages

Adding support for a new language is simple:

Example: Adding French support
  1. Create locale/translations_fr.json
  2. Create repository/locale/translations_fr.json
  3. Restart the application
# Example French translation file
{
  "app_description": "Gestionnaire de paquets haute performance",
  "cmd_install": "Installer un paquet",
  "cmd_search": "Rechercher des paquets",
  "installing_package": "Installation du paquet %s...",
  "packages_found": "%d paquets trouvés:"
}

Language Coverage

Language Code Main App Repository Status
English en Complete
Russian ru Complete
German de Complete
Spanish es ⚠️ Partial
Contributing: Help us improve Criage's localization! See our detailed localization guide for complete instructions on adding new languages or improving existing translations.

Troubleshooting

Common Issues

"command not found" Error

Make sure Criage is installed in PATH:

# Check PATH
echo $PATH

# Add to ~/.bashrc or ~/.zshrc
export PATH=$PATH:/usr/local/bin

Permission Issues

# Set execution permissions
chmod +x /usr/local/bin/criage

# Or install to home directory
mkdir -p ~/bin
mv criage ~/bin/
export PATH=$PATH:~/bin

Network Errors with Repositories

# Check repository availability
criage repo check

# Increase timeout
criage config set repository.timeout 30

Debugging

For detailed information, use the verbose flag:

criage install package-name --verbose

Getting Help

  • Use criage --help for general help
  • Use criage [command] --help for specific command help
  • Create an issue on GitHub