Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

IDEALE-eu/CLII

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CLII - Command Line Instruction Interface

A powerful command-line tool for managing and executing instructions. Store frequently used commands, share them with your team, or integrate them with AI assistants like GitHub Copilot.

Features

  • πŸš€ Quick Command Execution - Store and run complex commands with simple aliases
  • πŸ“ Instruction Management - Add, list, show, and remove instructions easily
  • πŸ”„ Interactive Mode - Work with instructions through an interactive shell
  • πŸ’Ύ Persistent Storage - Instructions are saved locally for future use
  • 🎯 Simple Interface - Clean and intuitive command-line interface

Installation

From Source

git clone https://github.com/IDEALE-eu/CLII.git
cd CLII
pip install -e .

From PyPI (when published)

pip install clii

Quick Start

Add an Instruction

clii add hello "echo 'Hello, World!'" -d "Print a greeting"

List All Instructions

clii list

Run an Instruction

clii run hello

Interactive Mode

clii interactive

Usage

Basic Commands

Add a New Instruction

clii add <name> <command> [--description <desc>]

Example:

clii add deploy "git push origin main && ssh server 'cd app && git pull'" -d "Deploy to production"

List All Instructions

clii list

Show Instruction Details

clii show <name>

Example:

clii show deploy

Execute an Instruction

clii run <name> [--dry-run] [--shell]

Options:

  • --dry-run: Display the command without executing it
  • --shell: Execute the command in shell mode (useful for pipes and redirects)

Example:

clii run deploy --dry-run
clii run deploy --shell

Remove an Instruction

clii remove <name>

Example:

clii remove deploy

Interactive Mode

Start interactive mode for a more conversational experience:

clii interactive

In interactive mode, you can use:

  • list - List all instructions
  • add - Add a new instruction (will prompt for details)
  • show <name> - Show instruction details
  • run <name> - Execute an instruction
  • remove <name> - Remove an instruction
  • help - Show available commands
  • exit - Exit interactive mode

Use Cases

For Developers

Store complex build, test, and deployment commands:

clii add build "npm install && npm run build" -d "Build the project"
clii add test "npm test -- --coverage" -d "Run tests with coverage"
clii add lint "eslint . --fix && prettier --write ." -d "Lint and format code"

For DevOps

Manage infrastructure commands:

clii add backup "tar -czf backup-$(date +%Y%m%d).tar.gz /var/www" -d "Backup web directory"
clii add deploy "kubectl apply -f deployment.yaml" -d "Deploy to Kubernetes"
clii add logs "kubectl logs -f deployment/myapp" -d "Stream application logs"

For Copilot Integration

Use CLII with GitHub Copilot to manage AI-assisted workflows:

clii add ask-copilot "gh copilot suggest -t shell" -d "Ask Copilot for shell command suggestions"
clii add explain "gh copilot explain" -d "Explain a command using Copilot"

Storage

Instructions are stored in JSON format at ~/.clii/instructions.json. You can back up this file or share it with your team.

Development

Running Tests

pip install pytest
pytest tests/

Contributing

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

License

MIT License - see LICENSE file for details

Support

For issues and questions, please open an issue on GitHub.

About

Command Line Instruction Interface

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors