codain
v1.1.0
Published
Codain CLI – Ollama setup and model runner for Termux and Node.js environments
Downloads
62
Maintainers
Readme
Codain CLI
Codain is a simple command-line interface (CLI) that simplifies running and managing local AI models using the Ollama backend. It is lightweight and optimized for environments like Termux/Terminal.
Features
- Easy Setup: A single
codain installcommand sets upollama, and other core dependencies. - Smart Process Management: Automatically starts the
ollama serveprocess withcodain runand cleans it up withcodain stop. - Model Management: Easily uninstall any downloaded model using
codain remove. - Termux Friendly: Built with a robust installation script (using
pkgOr other package also supported likeapk,apt,dnf,pacman) , that runs smoothly in Terminal.
Prerequisites
- Environment: A Linux-based environment.
- Node.js:
npm(Node.js) must be installed. - Hardware: A minimum of 4GB RAM and ~5GB of free storage is recommended.
Installation
First, install the package globally via
npm:npm install -g codainAfter installation, you must run the one-time setup command:
codain installThis command will install
ollamaand other core dependencies. It will then display an interactive menu for you to download your first AI model.
Usage
Here are the available commands:
1. Run a Model
This command first starts the Ollama server and then runs the specified model.
# Run the default model (qwen2.5-coder:0.5b)
codain run
# Run a specific model
codain r llama3:8b2. Stop the Server
Stops the ollama serve process running in the background.
codain stop
# Short command (Alias)
codain s3. Install/Setup Environment
If you skipped the initial setup or need to re-run it, you can use this command.
codain install
# Short command (Alias)
codain i4. Remove a Model
Uninstalls a downloaded model from Ollama.
codain remove <model_name>
# Example
codain d tinyllama5. Show Version
Displays the current version of Codain.
codain --version
# Short command (Alias)
codain -v6. Show Help
Displays the list of all available commands.
codain helpAuthor
- Dev. Sourav
📄 License
MIT
