Skip to content

TheAlphaOnes/cook-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

52 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Cook CLI Banner

Cook CLI – The Swiss Army Knife for Developers

A powerful CLI tool for modern developers – template management, command automation, and development utilities unified.
Streamline your workflow, standardize your projects, and automate repetitive tasks with ease.


πŸ“š Documentation

πŸš€ Getting Started

πŸ“– Command Reference

  • cook init - Initialize a new project with interactive setup
  • cook bake - Download and use templates to bootstrap projects
  • cook run - Execute command groups with hot reload support
  • cook auth - Authentication and user management
  • cook mold - Template creation, management, and sharing
  • cook cmd - Local command group management
  • cook sys - System-wide command automation
  • cook tool - Development utilities and tools
  • cook version - Version information and diagnostics

πŸš€ Quick Install

Prerequisites

  • Python 3.7 or higher
  • Git

Install from Source

# Clone the repository
git clone https://github.com/TheAlphaOnes/cook-cli.git
cd cook-cli

# Install dependencies
pip install -r requirements.txt

# Run Cook CLI
python3 main.py --help

Build Standalone Executable

# Install PyInstaller
pip install pyinstaller

# Build executable
pyinstaller cook.spec --clean

# Run the built executable
./dist/cook/cook --help

πŸ“‹ View Complete Installation Guide - Includes platform-specific instructions, Docker setup, and troubleshooting.


✨ Features

πŸ“¦ Template Management

Create, share, and reuse project templates with online sync.

# Create a template from your project
cook mold create

# Use a template to start a new project
cook bake username/@category/template-name

# List available templates
cook mold list

⚑ Command Automation

Define command groups in your project and run them with one command.

# Define in cook.config.json
{
  "cmd": {
    "dev": ["npm install", "npm run dev"],
    "deploy": ["npm run build", "deploy.sh"]
  },
  "watch": {
    "patterns": ["**/*.js", "**/*.ts", "**/*.css"],
    "ignore": ["node_modules", "dist"]
  }
}

# Run with hot reload
cook run dev --hot

# Quick access
cook run deploy

🌍 System Commands

Create global commands that work across all projects and directories.

# Add a system command
cook sys add

# Run it from anywhere
cook sys run

# Manage your system commands
cook sys list
cook sys update
cook sys remove

πŸ”§ Development Tools

Built-in utilities for common development tasks and project analysis.

# Count lines of code with smart filtering
cook tool loc

# Visualize directory structure
cook tool tree

# Generate open-source licenses
cook tool licence

# HTTP status code reference
cook tool status 404

πŸ” Authentication

Secure authentication to sync templates and user data.

# Login to your account
cook auth login

# Check authentication status
cook auth now

# Logout
cook auth logout

🎯 Quick Examples

Start a New Project from Template

# Use a template to bootstrap your project
cook bake developer/@web/react-vite-starter

# Navigate to the created project
cd my-react-app

# Install dependencies and start development
npm install
cook run serve

Automate Your Development Workflow

# Add to cook.config.json
{
  "cmd": {
    "start": [
      "docker-compose up -d",
      "npm install",
      "npm run dev"
    ]
  }
}

# Run with one command
cook run start --hot

Create Reusable System Commands

# Add a global command once
cook sys add
# Name: cleanup
# Description: Clean up development environment
# Commands: docker system prune -f
#          npm cache clean --force

# Use it from any directory
cook sys run cleanup

πŸ“‹ Command Reference

Main Commands

Command Description
cook init Initialize a new project
cook bake <template> Use a template
cook run <group> Run command group
cook version Show version info

Template Management

Command Description
cook mold create Create template
cook mold use Use template
cook mold list List templates
cook mold show Show template details
cook mold update Update template

Command Execution

Command Description
cook cmd list List local command groups
cook cmd run <group> Run local command groups
cook cmd add Add new command group
cook cmd update Update command group

System Commands

Command Description
cook sys add Add global system command
cook sys run Run system command
cook sys list List system commands
cook sys update Update system command
cook sys remove Remove system command

Development Tools

Command Description
cook tool loc Count lines of code with filtering
cook tool tree Show directory tree structure
cook tool licence Generate project licenses
cook tool status HTTP status code reference

Authentication

Command Description
cook auth login Login to account
cook auth logout Logout
cook auth now Show auth status

🎨 Terminal Examples

Creating a Template

$ cook mold create

πŸ“¦ Creating template from: /home/developer/projects/my-app

How would you like to select the directory?
> Choose from list
  Enter directory path manually

Template name: my-awesome-template
Enter template category: web

Description: My awesome React template with TypeScript
Tech stack (Enter empty line to finish):
1 $ : react
2 $ : typescript
3 $ : vite
4 $ :

GitHub repository: https://github.com/developer/my-awesome-template
Version: 1.0.0

πŸ“¦ Packing template...
βœ… Template packed: my-awesome-template.tar.zst (2.3 MB)

πŸ“€ Uploading template...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 2.3/2.3 MB
βœ… Upload successful!

βœ… Template created successfully!

Template ID: developer/@web/my-awesome-template

Running Commands with Hot Reload

$ cook run serve --hot

βœ… Starting hot reload for group: serve

β†’ Watching directory: .
β†’ Ignoring: node_modules, .git, dist

β†’ Executing: npm run dev
βœ” Command succeeded: npm run dev

  VITE v4.4.5  ready in 432 ms
  ➜  Local:   http://localhost:5173/

πŸ‘οΈ  Watching for changes...

πŸ“ File changed: src/App.tsx

β†’ Restarting processes...
β†’ Executing: npm run dev
βœ” Command succeeded: npm run dev

πŸ‘οΈ  Watching for changes...

System Commands

$ cook sys add

Enter command name: server
Enter description (optional): Quick HTTP server

Enter commands (one per line, empty line to finish):
Command 1: python -m http.server 8000
Command 2:

βœ” Added system command: server

$ cook sys run

Select system command to run:
> server β€” Quick HTTP server

Running system command: server
Description: Quick HTTP server

β†’ Executing: python -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

🎯 Features in v1

  • πŸ“¦ Code Templates with Online Sync Create and reuse full project templates. Sync them via our public hub.

  • βš™οΈ Sys & Local Custom Commands Automate your routine commands per project or system-wide.

  • πŸ“œ License Generator Generate open-source licenses for your projects instantly.

  • πŸ“Š Lines of Code Counter Analyze your project code stats, respecting .gitignore.

  • 🌲 Directory Tree Viewer Visually explore your folder structure in the terminal.

  • πŸ” Hot Reload & Cleanup Instantly apply config changes and clean unused files.


🧠 CLI Command Structure

cook
β”œβ”€β”€ init                # Initialize new project
β”œβ”€β”€ bake <template>     # Use a template
β”œβ”€β”€ run <group>         # Run command groups
β”œβ”€β”€ version             # Show version info
β”œβ”€β”€ auth                # Authentication
β”‚   β”œβ”€β”€ login           # Login to account
β”‚   β”œβ”€β”€ logout          # Logout
β”‚   └── now             # Show auth status
β”œβ”€β”€ mold                # Template management
β”‚   β”œβ”€β”€ create          # Create template
β”‚   β”œβ”€β”€ use             # Use template
β”‚   β”œβ”€β”€ list            # List templates
β”‚   β”œβ”€β”€ show            # Show template details
β”‚   └── update          # Update template
β”œβ”€β”€ cmd                 # Local command management
β”‚   β”œβ”€β”€ list            # List command groups
β”‚   β”œβ”€β”€ run             # Run command group
β”‚   β”œβ”€β”€ add             # Add command group
β”‚   └── update          # Update command group
β”œβ”€β”€ sys                 # System command management
β”‚   β”œβ”€β”€ add             # Add system command
β”‚   β”œβ”€β”€ run             # Run system command
β”‚   β”œβ”€β”€ list            # List system commands
β”‚   β”œβ”€β”€ update          # Update system command
β”‚   └── remove          # Remove system command
└── tool                # Development tools
    β”œβ”€β”€ loc             # Lines of code counter
    β”œβ”€β”€ tree            # Directory tree viewer
    β”œβ”€β”€ licence         # License generator
    └── status          # HTTP status codes

🧾 Example: cook.config.json

Here’s a sample project config using Cook:

{
  "name": "my-awesome-project",
  "author": "developer",
  "stir": true,
  "cmd": {
    "serve": [
      "npm install",
      "npm run dev"
    ],
    "build": [
      "rm -rf dist",
      "npm run build"
    ],
    "test": [
      "npm run test:unit",
      "npm run test:e2e"
    ],
    "deploy": [
      "npm run build",
      "docker build -t my-app .",
      "docker push my-app:latest"
    ]
  },
  "template": {
    "name": "react-typescript-starter",
    "category": "web",
    "version": "2.1.0",
    "stack": [
      "react",
      "typescript",
      "vite",
      "tailwindcss",
      "vitest"
    ],
    "github": "https://github.com/developer/react-typescript-starter",
    "date": "2024-01-15"
  }
}

🧭 Architecture

Cook CLI Ecosystem
β”œβ”€β”€ 🧠 Core CLI Tool
β”‚   └── Handles all local automation, commands, and templates
β”œβ”€β”€ ☁️ Public Platform (hub)
β”‚   └── Online template/snippet repo
└── πŸ”Œ MCP Server (Soon..)
    └── Discoverable services, shared workflows, and plugins

πŸ’‘ Perfect For

  • Solo Developers - Manage multiple projects with consistent workflows
  • Development Teams - Standardize project setups and automation
  • Open Source Contributors - Create reusable project templates
  • DevOps Engineers - Automate deployment and maintenance tasks
  • Students & Educators - Quick project bootstrapping and learning
  • Anyone who values efficiency and automation ⚑

πŸš€ What's Next

Cook CLI is actively developed with exciting features planned:

  • πŸ”Œ Plugin System - Extend Cook with custom functionality
  • ☁️ Cloud Sync - Sync configurations across devices
  • πŸ€– AI Integration - Smart template suggestions and code generation
  • πŸ“Š Analytics - Project insights and productivity metrics
  • 🌐 Web Dashboard - Manage templates and commands online

Contributing: We welcome contributions! Check out our GitHub repository to get involved.


πŸ“„ License

Licensed under the MIT License.


Made with ❀️ for lazy devs by TheAlphaOnes

About

COOK CLI tool, Swiss tool for developers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages