Skip to content

RustSandbox/setollama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 SetOllama - Ollama Setup & Model Manager

A powerful CLI tool that simplifies the installation and management of Ollama and its models. Written in Rust for maximum performance and reliability.

   ____  _ _                         
  / __ \| | |                        
 | |  | | | | __ _ _ __ ___   __ _  
 | |  | | | |/ _` | '_ ` _ \ / _` | 
 | |__| | | | (_| | | | | | | (_| | 
  \____/|_|_|\__,_|_| |_| |_|\__,_| 

✨ Features

  • 🚀 One-Command Setup: Automatically installs and configures Ollama
  • 🔄 Cross-Platform: Supports macOS and Linux with smart installation methods
  • 📦 Smart Model Management: Download and run models with simple commands
  • 🎯 Default Model: Comes pre-configured with gemma3:1b
  • 🎨 Beautiful UI: Colorful terminal output with emoji indicators
  • 🛡️ Robust Error Handling: Clear error messages and graceful failure recovery

🛠️ Installation

Prerequisites

  • Rust (latest stable version)
  • Cargo (comes with Rust)
  • macOS or Linux operating system

Building from Source

  1. Clone the repository:

    git clone https://github.com/yourusername/setollama.git
    cd setollama
  2. Build the release version:

    cargo build --release
  3. (Optional) Install system-wide:

    sudo cp target/release/setollama /usr/local/bin/

📚 Usage

Basic Commands

# Install Ollama and run default model (gemma3:1b)
setollama

# Show help and available commands
setollama help

# Check if Ollama is installed and running
setollama check

# List all installed models
setollama list

# Run a specific model
setollama model llama2

Command Details

  1. Default Command (setollama):

    • Checks if Ollama is installed
    • Installs it if necessary
    • Downloads and runs the default model (gemma3:1b)
  2. Help (setollama help):

    • Displays comprehensive help information
    • Shows available commands and examples
  3. Check (setollama check):

    • Verifies Ollama installation
    • Checks if the server is running
  4. List (setollama list):

    • Shows all installed models
    • Displays model details like size and modification date
  5. Model (setollama model <name>):

    • Downloads the specified model if not present
    • Runs the model after successful download

🔧 Installation Methods

macOS

  1. Primary Method: Uses Homebrew if available

    brew install ollama
  2. Fallback Method: Uses official installation script

    curl -fsSL https://ollama.ai/install.sh | sh

Linux

  • Uses the official installation script:
    curl -fsSL https://ollama.ai/install.sh | sh

🚀 Examples

  1. First-time setup with default model:

    setollama
  2. Running a specific model:

    setollama model llama2
  3. Checking installation status:

    setollama check

🐛 Troubleshooting

  1. Ollama not starting:

    • Check the ollama.log file in the current directory
    • Ensure you have sufficient permissions
    • Try running ollama serve manually
  2. Model download issues:

    • Verify your internet connection
    • Check available disk space
    • Ensure the model name is correct

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Ollama for providing the amazing base technology
  • The Rust community for the excellent tools and libraries
  • All contributors who help improve this tool

📞 Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue if your problem isn't already reported
  3. Provide as much detail as possible when reporting issues

Made with ❤️ by [Your Name]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages