Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e852336
licensing added
Akshat227 Jun 15, 2025
29b3edd
Update README.md
Akshat227 Jun 16, 2025
f26276b
Add files via upload
Akshat227 Jun 16, 2025
f888d9c
Update README.md
Akshat227 Jun 16, 2025
f2c1934
Update README.md
Akshat227 Jun 16, 2025
eb3b96e
Update README.md
Akshat227 Jun 16, 2025
d00650d
Update README.md
Akshat227 Jun 16, 2025
da7d300
Update README.md
Akshat227 Jun 16, 2025
62dd8f5
Update README.md
Akshat227 Jun 16, 2025
8644e31
Add files via upload
Akshat227 Jun 16, 2025
7ad89f8
Update README.md
Akshat227 Jun 16, 2025
717e063
Update README.md
Akshat227 Jun 16, 2025
66777f0
Update README.md
Akshat227 Jun 16, 2025
e6a7f6e
Update README.md
Akshat227 Jun 16, 2025
1350e74
Update README.md
Akshat227 Jun 16, 2025
fc12667
Update README.md
Akshat227 Jun 16, 2025
c0362fd
Update README.md
Akshat227 Jun 16, 2025
05cab03
Update README.md
Akshat227 Jun 16, 2025
e09780d
Update README.md
Akshat227 Jun 16, 2025
c5a5a1e
Update README.md
Akshat227 Jun 16, 2025
ec0b9fa
Add files via upload
Akshat227 Jun 16, 2025
f795820
Update README.md
Akshat227 Jun 16, 2025
14c3778
Update README.md
Akshat227 Jun 16, 2025
0bb7f7e
Update README.md
Akshat227 Jun 16, 2025
c6eac72
Update README.md
Akshat227 Jun 16, 2025
fb1d89f
Update README.md
Akshat227 Jun 16, 2025
7a70546
Update README.md
Akshat227 Jun 16, 2025
cf18b41
Update README.md
Akshat227 Jun 16, 2025
abea92f
Update README.md
Akshat227 Jun 16, 2025
8ad89f9
Update README.md
Akshat227 Jun 16, 2025
d0cfabc
Update README.md
Akshat227 Jun 21, 2025
fb93112
Update README.md
Akshat227 Jun 21, 2025
f9ab4bf
Update README.md
Akshat227 Jun 21, 2025
7a7b4a7
Update README.md
Akshat227 Jun 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 48 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,48 @@
# Cook CLI Tool Setup Instructions

Follow the steps below to set up and run the Cook CLI tool:

1. **Create a virtual environment**:
```bash
python3 -m venv env
```

2. **Activate the virtual environment**:
- On Linux/macOS:
```bash
source env/bin/activate
```
- On Windows:
```bash
.\env\Scripts\activate
```

3. **Install the required packages**:
```bash
pip install -r requirements.txt
```

4. **Run the main script**:
```bash
python main.py
```

You're all set to use the Cook CLI tool!
<p align="center" >
<img src="assets/licenses/COOKTITLE.svg" alt="Typer Banner" width="250"/>
</p>

<p align="center" style="font-family: 'K2D', cursive; font-size: 20px;" ><i>A everyday CLI tool for you, like a swiss army knife? But for the developers.</i></p>

---
<p style="font-family: 'Comic Sans MS', cursive; font-size: 20px;">

Cook - The All-in-One CLI for Lazy Devs.
</p>

**Cook** is a powerful, extensible CLI tool designed to streamline and automate everyday development tasks. Whether you're setting up a new project, managing boilerplate code, running repetitive commands, or tunneling a local server — Cook brings it all together in one elegant toolkit. Built for developers who prefer building over boilerplate, it helps you move faster with less setup and more shipping.

## Features

* **Code Snippet**: Store, reuse, and share code snippets both locally and publicly. Speed up your coding with ready-made solutions.

* **Templates**: Save complete project structures or starting points and reuse them anytime. Great for scaffolding and standardization.

* **Custom Commands**: Define CLI commands specific to a project or use them globally. Automate common tasks like builds, cleanup, deployments, etc.

* **License Generator**: Instantly generate open-source licenses for your projects.

* **API Key Manager**: Securely store, retrieve, and manage API tokens for local or cloud projects.

* **Layers Concept**: Organize and group commands, templates, and snippets logically using layers (e.g., frontend, backend, utils).

* **Hot Reload & Cleanup**: Reload changes and clean up project cruft from the CLI.

* **Online Sharing**: Access and share templates, code snippets, and API keys through the platform with ease.

* **Local UI Interface**: Manage your projects, snippets, and templates effortlessly with an intuitive local user interface.

* **MCP Server & Integration**: Connect to MCP (Model Connect Protocol) servers for shared workflows, services, and discovery mechanisms. *(Coming soon)*

* **Plugin System**: Extend Cook’s functionality with custom plugins for niche workflows. *(Coming soon)*

* **More Coming Soon**: Stay tuned for more exciting features and updates in the future!

---

## 👥 Who is it for?

- **Solo developers** managing multiple side projects.
- **Teams** looking to standardize and reuse development workflows.
- **Open-source contributors** who need consistent project structure.
- **Anyone tired** of repeating the same boilerplate and setup tasks.
8 changes: 8 additions & 0 deletions assets/licenses/COOKTITLE (1).svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/licenses/COOKTITLE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/licenses/COOKTITLE.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 34 additions & 3 deletions cli/license.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
import typer
from handlers.license.license import license_list
from handlers.license.license import listlicense
from handlers.license import license
from typing_extensions import Annotated
from typing import Optional
from pathlib import Path
from handlers.pyprompt import Terminal
from handlers.utils import *


app = typer.Typer()
pyp = Terminal()



@app.command ("list")
def list ():
listlicense()





@app.command("make")
def license_make():
return
@app.command("licensegen")
def licensegen(

licensename: Annotated[Optional[str], typer.Argument()] = None,
author: Annotated[Optional[str], typer.Argument()] = None,
):



if licensename is None:
licensename = pyp.mcq(license_list, "Select a license")

if licensename == "none":
return

# Only reaches here if license is valid
pyp.show("Enter the name of the author.")
author = input()

37 changes: 36 additions & 1 deletion handlers/license/license.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@

import os
from pathlib import Path
from handlers.pyprompt import Terminal
from datetime import datetime
# https://github.com/itsmaxymoo/create-license
# refer this repo to create the license command

pyp = Terminal

path = Path("/home/akshat/TheAlphaOnes/Projects/COOK_Python/cook/assets/licenses")
license_list = [file.stem for file in path.glob("*.txt")]

def listlicense():
pyp.show_list("license", license_list)



def licensegen(licensename, author):

license_file = path / f"{licensename.lower()}.txt"


if not license_file.exists():
raise FileNotFoundError(f"License '{licensename}' not found in {path}.")


with open(license_file, "r") as f:
content = f.read()
content = content.replace("[year]", str(datetime.now().year)).replace("[fullname]", author)

with open(license_file, "r") as f:
content = f.read()

with open("LICENSE", "w") as f:
f.write(content)

print(f"{licensename.upper()} license added.")


11 changes: 6 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Optional,List
from typing_extensions import Annotated

from cli import license as License
from cli import cleanup as cook_cleanup
from cli import stir as cook_stir
from cli import ignite as cook_ignite
Expand All @@ -12,7 +13,7 @@
from cli import auth as cook_auth
from cli import slice as cook_slice
from cli import mold
from handlers.loc import line_of_code
#from handlers.loc import line_of_code
from handlers.pyprompt import Terminal
from handlers import const
import os
Expand All @@ -28,7 +29,7 @@

app.add_typer(cook_auth.app,name="auth")
app.add_typer(mold.app,name="mold")

app.add_typer(License.app,name="license")
# app.add_typer(cook_cleanup.app, name="cleanup")
# app.add_typer(cook_stir.app, name= "stir")

Expand All @@ -52,9 +53,9 @@ def ping():
pyp.high(const.COOK_BANNER)


@app.command("loc")
def loc(dir: Annotated[str, typer.Argument()] = ".",commands: Annotated[List[str], typer.Argument()] = None):
line_of_code(dir,commands)
# @app.command("loc")
# def loc(dir: Annotated[str, typer.Argument()] = ".",commands: Annotated[List[str], typer.Argument()] = None):
# line_of_code(dir,commands)

@app.command("version")
def version():
Expand Down