Skip to content
/ clis Public

AI-Powered Terminal Assistant - Open-source alternative to Claude Code Skills with cost savings. Supports DeepSeek/Qwen/Ollama & offline mode

License

Notifications You must be signed in to change notification settings

Geoion/clis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CLIS - AI-Powered Terminal Assistant

Claude Code Skills Alternative for DeepSeek/Qwen/Ollama

Python Version License Version

Quick Start β€’ Usage β€’ Commands β€’ Documentation


🎯 What is CLIS?

CLIS (Command Line Intelligence System) brings Claude Code's intelligent tool calling capabilities to open-source LLMs:

  • βœ… 96% cost savings - < $0.003/query (DeepSeek) vs $20/month (Claude Code)
  • βœ… 31 tools - Filesystem, Git, Docker, System, Network
  • βœ… Open Skills System - Customizable domain knowledge (vs Claude's closed skills)
  • βœ… Offline mode - Ollama support for complete privacy
  • βœ… Full control - User confirmation for all commands
  • βœ… Cross-platform - Windows/macOS/Linux

πŸš€ Quick Start

Installation

# Clone repository
git clone https://github.com/Geoion/clis.git
cd clis

# Install (all dependencies will be installed automatically)
pip install -e .

Initialize

# Interactive setup
clis init

# Or specify provider
clis init --provider deepseek  # Low cost (recommended)
clis init --provider ollama     # Free, offline
clis init --provider qwen       # Chinese-optimized

First Command

# Tool calling is enabled by default
clis run "list all Python files"
clis run "show my git changes"
clis run "show container logs"

πŸ’‘ Usage

Git Workflow (Complete)

clis run "show git status"
clis run "show my changes"
clis run "commit modified files by directory"
clis run "push to remote"
clis run "create a new feature branch"
clis run "pull latest changes from main"

Docker Management

clis run "list running containers"
clis run "show logs of web-app"
clis run "restart web container"
clis run "show container stats"

Code Editing & Analysis

clis run "find all TODOs in Python files"
clis run "replace print with logger in main.py"
clis run "check linter errors in src/"
clis run "show me functions matching pattern 'async def.*'"

System & Background Tasks

clis run "show system info"
clis run "is port 8000 open?"
clis run "show top CPU processes"
clis run "start dev server in background"
clis run "list background processes"

πŸ“‹ Commands

Core Commands

# Run query (tool calling enabled by default)
clis run "your query"

# Disable tool calling
clis run "your query" --no-tool-calling

# Create custom skill
clis new "skill-name"
clis new "description" --auto  # AI-generated

# List all skills
clis list

# Edit skill
clis edit skill-name

# View configuration
clis config

# Check health
clis doctor

# Debug mode
clis --verbose run "your query"

πŸ› οΈ Available Tools (31)

Filesystem (9)

  • list_files - List directory contents
  • read_file - Read file content (with intelligent chunking)
  • write_file - Write to files
  • edit_file - πŸ†• Precise file editing with diff preview and dry-run
  • delete_file - Delete files
  • search_files - Search text in files
  • grep - πŸ†• Enhanced code search with regex support
  • read_lints - πŸ†• Read linter errors (flake8, pylint, ruff, eslint)
  • file_tree - Display directory tree
  • get_file_info - File metadata

Git (9) - Complete Workflow

  • git_status - Repository status
  • git_add - Stage files
  • git_commit - Commit changes
  • git_push - πŸ†• Push to remote (with upstream support)
  • git_pull - πŸ†• Pull from remote (with rebase support)
  • git_branch - πŸ†• Branch management (list/create/delete/rename)
  • git_checkout - πŸ†• Switch branches or restore files
  • git_diff - View changes
  • git_log - Commit history

Docker (4)

  • docker_ps - List containers
  • docker_logs - Container logs
  • docker_inspect - Container details
  • docker_stats - Resource usage

System (5)

  • system_info - OS, CPU, memory
  • check_command - Verify command availability
  • get_env - Environment variables
  • list_processes - Running processes
  • run_terminal_cmd - πŸ†• Execute commands (with background support)

Network (2)

  • http_request - HTTP requests
  • check_port - Port availability

General (2)

  • execute_command - Execute shell commands
  • git_status - Quick git status (built-in)

πŸ”§ Configuration

Provider Setup

DeepSeek (Recommended for Cost)

clis init --provider deepseek
export DEEPSEEK_API_KEY="your-key"
# Cost: ~$0.003/query

Ollama (Recommended for Privacy)

# Install Ollama from https://ollama.ai
ollama pull llama3
clis init --provider ollama
# Cost: $0 (completely free)

Qwen (Chinese-Optimized)

clis init --provider qwen
export QWEN_API_KEY="your-key"

Context Window Configuration

Edit ~/.clis/config/llm.yaml:

model:
  name: deepseek-chat
  context:
    window_size: 64000      # deepseek-chat: 64K, deepseek-coder: 128K
    auto_chunk: true        # Enable automatic file chunking
    chunk_overlap: 200      # Overlap lines between chunks
    reserved_tokens: 4000   # Reserved for system prompt

🌟 Key Features

Open Skills System

Unlike Claude Code's closed skills, CLIS uses open, customizable Skills:

  • πŸ“ Markdown format - Easy to read and edit
  • πŸ”§ User-definable - Create skills for any domain
  • 🀝 Community-driven - Share and collaborate
  • 🎯 Fine-grained control - Safety rules, platform compatibility

See skills/ directory for examples (Docker, Git, etc.)

Enhanced Code Editing

  • edit_file: Precise editing with diff preview and dry-run mode
  • grep: Regex search with context lines
  • read_lints: Automatic linter integration

Complete Git Workflow

Full git operations from status to push, including branch management

Background Process Support

Run long-running tasks (dev servers, builds) in background with process management

πŸ›‘οΈ Safety

Three-layer protection system ensures safe command execution:

  1. Blacklist Protection - Blocks dangerous patterns

    • Destructive commands (rm -rf /, dd, mkfs)
    • System modifications without confirmation
    • Fork bombs and malicious patterns
  2. Risk Scoring (0-100) - Automatic risk assessment

    • Low (0-30): Read-only operations - Auto-execute
    • Medium (31-60): Write operations - Require confirmation
    • High (61-90): Destructive operations - Require confirmation
    • Critical (91-100): System-level operations - Blocked

    Examples:

    • ls -la β†’ 10 (low) β†’ Auto-execute
    • git add . β†’ 50 (medium) β†’ Confirm
    • git push β†’ 70 (high) β†’ Confirm
    • git push --force β†’ 95 (critical) β†’ Blocked
    • rm -rf dir β†’ 85 (high) β†’ Confirm
    • sudo apt install β†’ 95 (critical) β†’ Blocked
  3. User Confirmation - Interactive approval for risky operations

    • All high-risk tools require explicit approval
    • Risk score and level displayed for transparency
    • File modifications, git operations, deletions always confirmed

All tools have explicit risk scores and confirmation requirements. Configure behavior in ~/.clis/config/safety.yaml.


🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


πŸ“„ License

Apache License 2.0 - see LICENSE file for details.


πŸ”— Links

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages