yncli 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yncli-1.0.1/PKG-INFO +104 -0
- yncli-1.0.1/README.md +89 -0
- {yncli-1.0.0 → yncli-1.0.1}/pyproject.toml +3 -4
- {yncli-1.0.0 → yncli-1.0.1}/setup.py +3 -4
- yncli-1.0.1/yncli/tools/search_tools.py +127 -0
- yncli-1.0.1/yncli.egg-info/PKG-INFO +104 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli.egg-info/requires.txt +1 -2
- yncli-1.0.0/PKG-INFO +0 -63
- yncli-1.0.0/README.md +0 -47
- yncli-1.0.0/yncli/tools/search_tools.py +0 -68
- yncli-1.0.0/yncli.egg-info/PKG-INFO +0 -63
- {yncli-1.0.0 → yncli-1.0.1}/setup.cfg +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/__init__.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/agent.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/architect.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/code_review.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/debug_oracle.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/debugger.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/polyglot.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/refactor_master.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/security_auditor.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/system_architect.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/test_runner.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/built_in_skills/ultrabrain.md +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/clean_text.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/client.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/config.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/language_detector.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/main.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/skills_manager.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/system_prompt.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/tools/__init__.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/tools/file_tools.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/tools/polyglot_tools.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/tools/system_tools.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/tui.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/workspace_memory.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli/workspace_scanner.py +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli.egg-info/SOURCES.txt +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli.egg-info/dependency_links.txt +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli.egg-info/entry_points.txt +0 -0
- {yncli-1.0.0 → yncli-1.0.1}/yncli.egg-info/top_level.txt +0 -0
yncli-1.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yncli
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: Autonomous Polyglot AI Coding Agent & TUI
|
|
5
|
+
Author: Yanzyuyu
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: rich>=13.7.0
|
|
9
|
+
Requires-Dist: prompt_toolkit>=3.0.40
|
|
10
|
+
Requires-Dist: requests>=2.31.0
|
|
11
|
+
Requires-Dist: pygments>=2.17.0
|
|
12
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: requires-python
|
|
15
|
+
|
|
16
|
+
# ⚡ YNCLI: World-Class Autonomous Polyglot AI Coding Agent & TUI
|
|
17
|
+
|
|
18
|
+
YNCLI adalah AI Coding Agent berbasis CLI/TUI mandiri yang mendukung:
|
|
19
|
+
- **Polyglot Coding Engine**: Menguasai Python, TypeScript/JavaScript, Rust, Go, C/C++, Java/Kotlin, C#/.NET, PHP, Ruby, Dart/Flutter, Swift, SQL, Shell, dan Web stack.
|
|
20
|
+
- **Deep Workspace Intelligence**: Otomatis memindai dan memuat file proyek ke dalam memori aktif AI dari awal.
|
|
21
|
+
- **Ultrabrain Plan Mode**: Otomatis menyusun PRD lengkap dengan ASCII Mockup ke dalam `plan.md`.
|
|
22
|
+
- **Autonomous ReAct Loop**: AI dapat membaca file, menulis file, melakukan surgical patch, memvalidasi sintaks via compiler/linter, dan menjalankan perintah di terminal.
|
|
23
|
+
- **Antigravity CLI Aesthetic**: Tampilan TUI modern dengan status in-place satu baris dan pop-up model interaktif yang dapat diklik mouse.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 🚀 Cara Install & Penggunaan Publik
|
|
28
|
+
|
|
29
|
+
### 1. Lewat NPM (Node.js / npx)
|
|
30
|
+
```bash
|
|
31
|
+
# Langsung jalankan tanpa install:
|
|
32
|
+
npx @yanzyuyu/yncli
|
|
33
|
+
|
|
34
|
+
# Atau install secara global:
|
|
35
|
+
npm install -g @yanzyuyu/yncli
|
|
36
|
+
yncli
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### 2. Lewat PyPI (Python / pip)
|
|
42
|
+
```bash
|
|
43
|
+
# Install via pip:
|
|
44
|
+
pip install yncli
|
|
45
|
+
yncli
|
|
46
|
+
|
|
47
|
+
# Atau jalankan langsung via pipx:
|
|
48
|
+
pipx run yncli
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### 3. One-Line Installer Otomatis
|
|
54
|
+
|
|
55
|
+
**Windows (PowerShell)**:
|
|
56
|
+
```powershell
|
|
57
|
+
irm https://raw.githubusercontent.com/yanzyuyu/yncli/main/install.ps1 | iex
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**macOS / Linux**:
|
|
61
|
+
```bash
|
|
62
|
+
curl -fsSL https://raw.githubusercontent.com/yanzyuyu/yncli/main/install.sh | bash
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 💻 Panduan Perintah
|
|
68
|
+
|
|
69
|
+
### 1. Masuk ke Mode Interaktif TUI:
|
|
70
|
+
```powershell
|
|
71
|
+
yncli
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 2. Mode Direct Execution (Quick Query):
|
|
75
|
+
```powershell
|
|
76
|
+
yncli "buatkan script rest api fastapi lengkap dengan jwt auth"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 3. Opsi Tambahan:
|
|
80
|
+
```powershell
|
|
81
|
+
# Ganti model awal
|
|
82
|
+
yncli -m ag/claude-sonnet-4-6
|
|
83
|
+
|
|
84
|
+
# Buka dalam Plan Mode
|
|
85
|
+
yncli --mode plan
|
|
86
|
+
|
|
87
|
+
# Aktifkan skill tertentu
|
|
88
|
+
yncli -s architect
|
|
89
|
+
|
|
90
|
+
# Lihat daftar model yang tersedia
|
|
91
|
+
yncli --list-models
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Slash Commands di dalam TUI:
|
|
95
|
+
- `/model`: Buka pop-up interaktif untuk memilih model AI (bisa diklik mouse)
|
|
96
|
+
- `/plan`: Masuk ke Plan Mode (Riset arsitektur & susun PRD `plan.md`)
|
|
97
|
+
- `/build`: Masuk ke Build Mode (Eksekusi autonomous pembuatan & editing kode)
|
|
98
|
+
- `/ask`: Masuk ke Ask Mode (Konsultasi murni tanpa modifikasi file)
|
|
99
|
+
- `/cd <folder>`: Pindah direktori kerja aktif
|
|
100
|
+
- `/approval on|off`: Atur konfirmasi tool (otomatis vs tanya dulu)
|
|
101
|
+
- `/thinking on|off`: Tampilkan atau sembunyikan live reasoning
|
|
102
|
+
- `/skill <nama>`: Aktifkan skill (ultrabrain, architect, debugger, dll)
|
|
103
|
+
- `/clear`: Bersihkan riwayat percakapan & refresh memori proyek
|
|
104
|
+
- `/exit`: Keluar
|
yncli-1.0.1/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# ⚡ YNCLI: World-Class Autonomous Polyglot AI Coding Agent & TUI
|
|
2
|
+
|
|
3
|
+
YNCLI adalah AI Coding Agent berbasis CLI/TUI mandiri yang mendukung:
|
|
4
|
+
- **Polyglot Coding Engine**: Menguasai Python, TypeScript/JavaScript, Rust, Go, C/C++, Java/Kotlin, C#/.NET, PHP, Ruby, Dart/Flutter, Swift, SQL, Shell, dan Web stack.
|
|
5
|
+
- **Deep Workspace Intelligence**: Otomatis memindai dan memuat file proyek ke dalam memori aktif AI dari awal.
|
|
6
|
+
- **Ultrabrain Plan Mode**: Otomatis menyusun PRD lengkap dengan ASCII Mockup ke dalam `plan.md`.
|
|
7
|
+
- **Autonomous ReAct Loop**: AI dapat membaca file, menulis file, melakukan surgical patch, memvalidasi sintaks via compiler/linter, dan menjalankan perintah di terminal.
|
|
8
|
+
- **Antigravity CLI Aesthetic**: Tampilan TUI modern dengan status in-place satu baris dan pop-up model interaktif yang dapat diklik mouse.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🚀 Cara Install & Penggunaan Publik
|
|
13
|
+
|
|
14
|
+
### 1. Lewat NPM (Node.js / npx)
|
|
15
|
+
```bash
|
|
16
|
+
# Langsung jalankan tanpa install:
|
|
17
|
+
npx @yanzyuyu/yncli
|
|
18
|
+
|
|
19
|
+
# Atau install secara global:
|
|
20
|
+
npm install -g @yanzyuyu/yncli
|
|
21
|
+
yncli
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### 2. Lewat PyPI (Python / pip)
|
|
27
|
+
```bash
|
|
28
|
+
# Install via pip:
|
|
29
|
+
pip install yncli
|
|
30
|
+
yncli
|
|
31
|
+
|
|
32
|
+
# Atau jalankan langsung via pipx:
|
|
33
|
+
pipx run yncli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### 3. One-Line Installer Otomatis
|
|
39
|
+
|
|
40
|
+
**Windows (PowerShell)**:
|
|
41
|
+
```powershell
|
|
42
|
+
irm https://raw.githubusercontent.com/yanzyuyu/yncli/main/install.ps1 | iex
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**macOS / Linux**:
|
|
46
|
+
```bash
|
|
47
|
+
curl -fsSL https://raw.githubusercontent.com/yanzyuyu/yncli/main/install.sh | bash
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 💻 Panduan Perintah
|
|
53
|
+
|
|
54
|
+
### 1. Masuk ke Mode Interaktif TUI:
|
|
55
|
+
```powershell
|
|
56
|
+
yncli
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 2. Mode Direct Execution (Quick Query):
|
|
60
|
+
```powershell
|
|
61
|
+
yncli "buatkan script rest api fastapi lengkap dengan jwt auth"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Opsi Tambahan:
|
|
65
|
+
```powershell
|
|
66
|
+
# Ganti model awal
|
|
67
|
+
yncli -m ag/claude-sonnet-4-6
|
|
68
|
+
|
|
69
|
+
# Buka dalam Plan Mode
|
|
70
|
+
yncli --mode plan
|
|
71
|
+
|
|
72
|
+
# Aktifkan skill tertentu
|
|
73
|
+
yncli -s architect
|
|
74
|
+
|
|
75
|
+
# Lihat daftar model yang tersedia
|
|
76
|
+
yncli --list-models
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Slash Commands di dalam TUI:
|
|
80
|
+
- `/model`: Buka pop-up interaktif untuk memilih model AI (bisa diklik mouse)
|
|
81
|
+
- `/plan`: Masuk ke Plan Mode (Riset arsitektur & susun PRD `plan.md`)
|
|
82
|
+
- `/build`: Masuk ke Build Mode (Eksekusi autonomous pembuatan & editing kode)
|
|
83
|
+
- `/ask`: Masuk ke Ask Mode (Konsultasi murni tanpa modifikasi file)
|
|
84
|
+
- `/cd <folder>`: Pindah direktori kerja aktif
|
|
85
|
+
- `/approval on|off`: Atur konfirmasi tool (otomatis vs tanya dulu)
|
|
86
|
+
- `/thinking on|off`: Tampilkan atau sembunyikan live reasoning
|
|
87
|
+
- `/skill <nama>`: Aktifkan skill (ultrabrain, architect, debugger, dll)
|
|
88
|
+
- `/clear`: Bersihkan riwayat percakapan & refresh memori proyek
|
|
89
|
+
- `/exit`: Keluar
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "yncli"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.1"
|
|
8
8
|
description = "Autonomous Polyglot AI Coding Agent & TUI"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -12,9 +12,8 @@ dependencies = [
|
|
|
12
12
|
"rich>=13.7.0",
|
|
13
13
|
"prompt_toolkit>=3.0.40",
|
|
14
14
|
"requests>=2.31.0",
|
|
15
|
-
"
|
|
16
|
-
"beautifulsoup4>=4.12.0"
|
|
17
|
-
"pygments>=2.17.0"
|
|
15
|
+
"pygments>=2.17.0",
|
|
16
|
+
"beautifulsoup4>=4.12.0"
|
|
18
17
|
]
|
|
19
18
|
|
|
20
19
|
[project.scripts]
|
|
@@ -6,11 +6,11 @@ long_description = (this_directory / "README.md").read_text(encoding="utf-8") if
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="yncli",
|
|
9
|
-
version="1.0.
|
|
9
|
+
version="1.0.1",
|
|
10
10
|
description="Autonomous Polyglot AI Coding Agent & TUI",
|
|
11
11
|
long_description=long_description,
|
|
12
12
|
long_description_content_type="text/markdown",
|
|
13
|
-
author="
|
|
13
|
+
author="Yanzyuyu",
|
|
14
14
|
packages=find_packages(),
|
|
15
15
|
include_package_data=True,
|
|
16
16
|
package_data={
|
|
@@ -20,9 +20,8 @@ setup(
|
|
|
20
20
|
"rich>=13.7.0",
|
|
21
21
|
"prompt_toolkit>=3.0.40",
|
|
22
22
|
"requests>=2.31.0",
|
|
23
|
-
"duckduckgo-search>=6.0.0",
|
|
24
|
-
"beautifulsoup4>=4.12.0",
|
|
25
23
|
"pygments>=2.17.0",
|
|
24
|
+
"beautifulsoup4>=4.12.0",
|
|
26
25
|
],
|
|
27
26
|
entry_points={
|
|
28
27
|
"console_scripts": [
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import re
|
|
2
|
+
import urllib.parse
|
|
3
|
+
import urllib.request
|
|
4
|
+
import warnings
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
warnings.filterwarnings("ignore")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def web_search(query: str, max_results: int = 5) -> str:
|
|
11
|
+
"""
|
|
12
|
+
Performs a real-time web search using lightweight HTTP endpoints.
|
|
13
|
+
100% pure Python with ZERO heavy Rust/C compilation dependencies.
|
|
14
|
+
"""
|
|
15
|
+
try:
|
|
16
|
+
import requests
|
|
17
|
+
|
|
18
|
+
headers = {
|
|
19
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
|
|
20
|
+
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
|
21
|
+
"Accept-Language": "en-US,en;q=0.5",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
results = []
|
|
25
|
+
|
|
26
|
+
# 1. Try DuckDuckGo HTML endpoint
|
|
27
|
+
try:
|
|
28
|
+
url = f"https://html.duckduckgo.com/html/?q={urllib.parse.quote(query)}"
|
|
29
|
+
resp = requests.get(url, headers=headers, timeout=10)
|
|
30
|
+
|
|
31
|
+
if resp.status_code == 200:
|
|
32
|
+
from bs4 import BeautifulSoup
|
|
33
|
+
soup = BeautifulSoup(resp.text, "html.parser")
|
|
34
|
+
|
|
35
|
+
result_divs = soup.find_all("div", class_=re.compile(r"result|results_links"))
|
|
36
|
+
for r in result_divs:
|
|
37
|
+
title_tag = r.find("a", class_="result__a") or r.find("a")
|
|
38
|
+
snippet_tag = r.find("a", class_="result__snippet") or r.find("div", class_="result__snippet")
|
|
39
|
+
|
|
40
|
+
if title_tag:
|
|
41
|
+
title = title_tag.get_text().strip()
|
|
42
|
+
raw_href = title_tag.get("href", "")
|
|
43
|
+
|
|
44
|
+
if "uddg=" in raw_href:
|
|
45
|
+
parsed = urllib.parse.parse_qs(urllib.parse.urlparse(raw_href).query)
|
|
46
|
+
link = parsed.get("uddg", [raw_href])[0]
|
|
47
|
+
else:
|
|
48
|
+
link = raw_href
|
|
49
|
+
|
|
50
|
+
snippet = snippet_tag.get_text().strip() if snippet_tag else ""
|
|
51
|
+
if link and (link.startswith("http://") or link.startswith("https://")):
|
|
52
|
+
if title and not any(res["link"] == link for res in results):
|
|
53
|
+
results.append({"title": title, "link": link, "snippet": snippet})
|
|
54
|
+
if len(results) >= max_results:
|
|
55
|
+
break
|
|
56
|
+
except Exception:
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
# 2. Fallback to DuckDuckGo Instant Answer API if needed
|
|
60
|
+
if not results:
|
|
61
|
+
try:
|
|
62
|
+
api_url = f"https://api.duckduckgo.com/?q={urllib.parse.quote(query)}&format=json&no_html=1&skip_disambig=1"
|
|
63
|
+
api_resp = requests.get(api_url, headers=headers, timeout=8)
|
|
64
|
+
if api_resp.status_code == 200:
|
|
65
|
+
data = api_resp.json()
|
|
66
|
+
if data.get("AbstractText"):
|
|
67
|
+
results.append({
|
|
68
|
+
"title": data.get("Heading", query),
|
|
69
|
+
"link": data.get("AbstractURL", ""),
|
|
70
|
+
"snippet": data.get("AbstractText", "")
|
|
71
|
+
})
|
|
72
|
+
for topic in data.get("RelatedTopics", [])[:max_results]:
|
|
73
|
+
if isinstance(topic, dict) and "Text" in topic and "FirstURL" in topic:
|
|
74
|
+
results.append({
|
|
75
|
+
"title": topic.get("Text", "")[:60],
|
|
76
|
+
"link": topic.get("FirstURL", ""),
|
|
77
|
+
"snippet": topic.get("Text", "")
|
|
78
|
+
})
|
|
79
|
+
except Exception:
|
|
80
|
+
pass
|
|
81
|
+
|
|
82
|
+
if not results:
|
|
83
|
+
return f"No search results found for: '{query}'"
|
|
84
|
+
|
|
85
|
+
formatted = [f"Web Search Results for '{query}':", "=" * 50]
|
|
86
|
+
for i, res in enumerate(results[:max_results], start=1):
|
|
87
|
+
title = res.get("title", "No title")
|
|
88
|
+
link = res.get("link", "")
|
|
89
|
+
body = res.get("snippet", "")
|
|
90
|
+
formatted.append(f"[{i}] {title}\nURL: {link}\nSnippet: {body}\n")
|
|
91
|
+
|
|
92
|
+
return "\n".join(formatted)
|
|
93
|
+
except Exception as e:
|
|
94
|
+
return f"Error executing web search: {str(e)}"
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def fetch_webpage(url: str, max_chars: int = 6000) -> str:
|
|
98
|
+
"""
|
|
99
|
+
Fetches the content of a webpage and extracts clean, readable text/markdown.
|
|
100
|
+
"""
|
|
101
|
+
try:
|
|
102
|
+
import requests
|
|
103
|
+
from bs4 import BeautifulSoup
|
|
104
|
+
|
|
105
|
+
headers = {
|
|
106
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
|
|
107
|
+
}
|
|
108
|
+
resp = requests.get(url, headers=headers, timeout=15)
|
|
109
|
+
resp.raise_for_status()
|
|
110
|
+
|
|
111
|
+
soup = BeautifulSoup(resp.text, "html.parser")
|
|
112
|
+
|
|
113
|
+
for tag in soup(["script", "style", "nav", "footer", "header", "aside", "svg", "noscript"]):
|
|
114
|
+
tag.decompose()
|
|
115
|
+
|
|
116
|
+
title = soup.title.string.strip() if soup.title else url
|
|
117
|
+
text = soup.get_text(separator="\n")
|
|
118
|
+
|
|
119
|
+
clean_lines = [line.strip() for line in text.splitlines() if line.strip()]
|
|
120
|
+
clean_text = "\n".join(clean_lines)
|
|
121
|
+
|
|
122
|
+
if len(clean_text) > max_chars:
|
|
123
|
+
clean_text = clean_text[:max_chars] + f"\n... [Content truncated, total {len(text)} chars]"
|
|
124
|
+
|
|
125
|
+
return f"Title: {title}\nURL: {url}\n\nContent:\n{clean_text}"
|
|
126
|
+
except Exception as e:
|
|
127
|
+
return f"Error fetching webpage from {url}: {str(e)}"
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yncli
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: Autonomous Polyglot AI Coding Agent & TUI
|
|
5
|
+
Author: Yanzyuyu
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: rich>=13.7.0
|
|
9
|
+
Requires-Dist: prompt_toolkit>=3.0.40
|
|
10
|
+
Requires-Dist: requests>=2.31.0
|
|
11
|
+
Requires-Dist: pygments>=2.17.0
|
|
12
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: requires-python
|
|
15
|
+
|
|
16
|
+
# ⚡ YNCLI: World-Class Autonomous Polyglot AI Coding Agent & TUI
|
|
17
|
+
|
|
18
|
+
YNCLI adalah AI Coding Agent berbasis CLI/TUI mandiri yang mendukung:
|
|
19
|
+
- **Polyglot Coding Engine**: Menguasai Python, TypeScript/JavaScript, Rust, Go, C/C++, Java/Kotlin, C#/.NET, PHP, Ruby, Dart/Flutter, Swift, SQL, Shell, dan Web stack.
|
|
20
|
+
- **Deep Workspace Intelligence**: Otomatis memindai dan memuat file proyek ke dalam memori aktif AI dari awal.
|
|
21
|
+
- **Ultrabrain Plan Mode**: Otomatis menyusun PRD lengkap dengan ASCII Mockup ke dalam `plan.md`.
|
|
22
|
+
- **Autonomous ReAct Loop**: AI dapat membaca file, menulis file, melakukan surgical patch, memvalidasi sintaks via compiler/linter, dan menjalankan perintah di terminal.
|
|
23
|
+
- **Antigravity CLI Aesthetic**: Tampilan TUI modern dengan status in-place satu baris dan pop-up model interaktif yang dapat diklik mouse.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 🚀 Cara Install & Penggunaan Publik
|
|
28
|
+
|
|
29
|
+
### 1. Lewat NPM (Node.js / npx)
|
|
30
|
+
```bash
|
|
31
|
+
# Langsung jalankan tanpa install:
|
|
32
|
+
npx @yanzyuyu/yncli
|
|
33
|
+
|
|
34
|
+
# Atau install secara global:
|
|
35
|
+
npm install -g @yanzyuyu/yncli
|
|
36
|
+
yncli
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### 2. Lewat PyPI (Python / pip)
|
|
42
|
+
```bash
|
|
43
|
+
# Install via pip:
|
|
44
|
+
pip install yncli
|
|
45
|
+
yncli
|
|
46
|
+
|
|
47
|
+
# Atau jalankan langsung via pipx:
|
|
48
|
+
pipx run yncli
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### 3. One-Line Installer Otomatis
|
|
54
|
+
|
|
55
|
+
**Windows (PowerShell)**:
|
|
56
|
+
```powershell
|
|
57
|
+
irm https://raw.githubusercontent.com/yanzyuyu/yncli/main/install.ps1 | iex
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**macOS / Linux**:
|
|
61
|
+
```bash
|
|
62
|
+
curl -fsSL https://raw.githubusercontent.com/yanzyuyu/yncli/main/install.sh | bash
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 💻 Panduan Perintah
|
|
68
|
+
|
|
69
|
+
### 1. Masuk ke Mode Interaktif TUI:
|
|
70
|
+
```powershell
|
|
71
|
+
yncli
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 2. Mode Direct Execution (Quick Query):
|
|
75
|
+
```powershell
|
|
76
|
+
yncli "buatkan script rest api fastapi lengkap dengan jwt auth"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 3. Opsi Tambahan:
|
|
80
|
+
```powershell
|
|
81
|
+
# Ganti model awal
|
|
82
|
+
yncli -m ag/claude-sonnet-4-6
|
|
83
|
+
|
|
84
|
+
# Buka dalam Plan Mode
|
|
85
|
+
yncli --mode plan
|
|
86
|
+
|
|
87
|
+
# Aktifkan skill tertentu
|
|
88
|
+
yncli -s architect
|
|
89
|
+
|
|
90
|
+
# Lihat daftar model yang tersedia
|
|
91
|
+
yncli --list-models
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Slash Commands di dalam TUI:
|
|
95
|
+
- `/model`: Buka pop-up interaktif untuk memilih model AI (bisa diklik mouse)
|
|
96
|
+
- `/plan`: Masuk ke Plan Mode (Riset arsitektur & susun PRD `plan.md`)
|
|
97
|
+
- `/build`: Masuk ke Build Mode (Eksekusi autonomous pembuatan & editing kode)
|
|
98
|
+
- `/ask`: Masuk ke Ask Mode (Konsultasi murni tanpa modifikasi file)
|
|
99
|
+
- `/cd <folder>`: Pindah direktori kerja aktif
|
|
100
|
+
- `/approval on|off`: Atur konfirmasi tool (otomatis vs tanya dulu)
|
|
101
|
+
- `/thinking on|off`: Tampilkan atau sembunyikan live reasoning
|
|
102
|
+
- `/skill <nama>`: Aktifkan skill (ultrabrain, architect, debugger, dll)
|
|
103
|
+
- `/clear`: Bersihkan riwayat percakapan & refresh memori proyek
|
|
104
|
+
- `/exit`: Keluar
|
yncli-1.0.0/PKG-INFO
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: yncli
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: Autonomous Polyglot AI Coding Agent & TUI
|
|
5
|
-
Author: YNCLI Team
|
|
6
|
-
Requires-Python: >=3.8
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: rich>=13.7.0
|
|
9
|
-
Requires-Dist: prompt_toolkit>=3.0.40
|
|
10
|
-
Requires-Dist: requests>=2.31.0
|
|
11
|
-
Requires-Dist: duckduckgo-search>=6.0.0
|
|
12
|
-
Requires-Dist: beautifulsoup4>=4.12.0
|
|
13
|
-
Requires-Dist: pygments>=2.17.0
|
|
14
|
-
Dynamic: author
|
|
15
|
-
Dynamic: requires-python
|
|
16
|
-
|
|
17
|
-
# ⚡ YNCLI: World-Class Autonomous Polyglot AI Coding Agent & TUI
|
|
18
|
-
|
|
19
|
-
YNCLI adalah AI Coding Agent berbasis CLI/TUI mandiri yang mendukung:
|
|
20
|
-
- **Polyglot Coding Engine**: Menguasai Python, TypeScript/JavaScript, Rust, Go, C/C++, Java/Kotlin, C#/.NET, PHP, Ruby, Dart/Flutter, Swift, SQL, Shell, dan Web stack.
|
|
21
|
-
- **Dynamic Language & Framework Detection**: Otomatis mendeteksi arsitektur project dan menginjeksi idiomatic patterns ke dalam agent.
|
|
22
|
-
- **Autonomous ReAct Loop**: AI dapat membaca file, menulis file, melakukan surgical patch, mencari kode via grep, memvalidasi sintaks via compiler/linter, dan menjalankan perintah di terminal.
|
|
23
|
-
- **Real-Time Date & Environment Awareness**: Mengetahui waktu, tanggal, hari lokal secara real-time.
|
|
24
|
-
- **Thinking / Reasoning Visualizer**: Menampilkan penalaran model (seperti Gemini 3.7 Flash High / Claude 4.6 Thinking) secara live.
|
|
25
|
-
- **Real-time Web Search & Scraper**: DuckDuckGo search + HTML-to-markdown reader bawaan.
|
|
26
|
-
- **Dynamic Skills System**: Mode Architect, Debugger, Code Reviewer, Test Runner, dan Polyglot.
|
|
27
|
-
|
|
28
|
-
## Cara Menggunakan
|
|
29
|
-
|
|
30
|
-
Cukup ketik perintah berikut di PowerShell atau Command Prompt mana saja:
|
|
31
|
-
|
|
32
|
-
### 1. Masuk ke Mode TUI Interaktif:
|
|
33
|
-
```powershell
|
|
34
|
-
yncli
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 2. Mode Direct Execution (Quick Query):
|
|
38
|
-
```powershell
|
|
39
|
-
yncli "buatkan script rest api fastapi lengkap dengan jwt auth"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### 3. Opsi Tambahan:
|
|
43
|
-
```powershell
|
|
44
|
-
# Ganti model
|
|
45
|
-
yncli -m ag/claude-sonnet-4-6
|
|
46
|
-
|
|
47
|
-
# Aktifkan skill tertentu
|
|
48
|
-
yncli -s architect
|
|
49
|
-
|
|
50
|
-
# Lihat daftar model yang tersedia di endpoint
|
|
51
|
-
yncli --list-models
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Slash Commands di dalam TUI:
|
|
55
|
-
- `/model <nama>`: Ganti model AI aktif
|
|
56
|
-
- `/models`: Lihat semua model AI dari endpoint
|
|
57
|
-
- `/skill <nama>`: Aktifkan skill (polyglot, architect, debugger, code_review, test_runner)
|
|
58
|
-
- `/skills`: Lihat semua skill yang tersedia
|
|
59
|
-
- `/tools`: Lihat daftar tools coding yang aktif
|
|
60
|
-
- `/clear`: Reset memory percakapan
|
|
61
|
-
- `/history`: Lihat ringkasan percakapan
|
|
62
|
-
- `/save [file]`: Export percakapan ke Markdown
|
|
63
|
-
- `/exit`: Keluar
|
yncli-1.0.0/README.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# ⚡ YNCLI: World-Class Autonomous Polyglot AI Coding Agent & TUI
|
|
2
|
-
|
|
3
|
-
YNCLI adalah AI Coding Agent berbasis CLI/TUI mandiri yang mendukung:
|
|
4
|
-
- **Polyglot Coding Engine**: Menguasai Python, TypeScript/JavaScript, Rust, Go, C/C++, Java/Kotlin, C#/.NET, PHP, Ruby, Dart/Flutter, Swift, SQL, Shell, dan Web stack.
|
|
5
|
-
- **Dynamic Language & Framework Detection**: Otomatis mendeteksi arsitektur project dan menginjeksi idiomatic patterns ke dalam agent.
|
|
6
|
-
- **Autonomous ReAct Loop**: AI dapat membaca file, menulis file, melakukan surgical patch, mencari kode via grep, memvalidasi sintaks via compiler/linter, dan menjalankan perintah di terminal.
|
|
7
|
-
- **Real-Time Date & Environment Awareness**: Mengetahui waktu, tanggal, hari lokal secara real-time.
|
|
8
|
-
- **Thinking / Reasoning Visualizer**: Menampilkan penalaran model (seperti Gemini 3.7 Flash High / Claude 4.6 Thinking) secara live.
|
|
9
|
-
- **Real-time Web Search & Scraper**: DuckDuckGo search + HTML-to-markdown reader bawaan.
|
|
10
|
-
- **Dynamic Skills System**: Mode Architect, Debugger, Code Reviewer, Test Runner, dan Polyglot.
|
|
11
|
-
|
|
12
|
-
## Cara Menggunakan
|
|
13
|
-
|
|
14
|
-
Cukup ketik perintah berikut di PowerShell atau Command Prompt mana saja:
|
|
15
|
-
|
|
16
|
-
### 1. Masuk ke Mode TUI Interaktif:
|
|
17
|
-
```powershell
|
|
18
|
-
yncli
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### 2. Mode Direct Execution (Quick Query):
|
|
22
|
-
```powershell
|
|
23
|
-
yncli "buatkan script rest api fastapi lengkap dengan jwt auth"
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### 3. Opsi Tambahan:
|
|
27
|
-
```powershell
|
|
28
|
-
# Ganti model
|
|
29
|
-
yncli -m ag/claude-sonnet-4-6
|
|
30
|
-
|
|
31
|
-
# Aktifkan skill tertentu
|
|
32
|
-
yncli -s architect
|
|
33
|
-
|
|
34
|
-
# Lihat daftar model yang tersedia di endpoint
|
|
35
|
-
yncli --list-models
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Slash Commands di dalam TUI:
|
|
39
|
-
- `/model <nama>`: Ganti model AI aktif
|
|
40
|
-
- `/models`: Lihat semua model AI dari endpoint
|
|
41
|
-
- `/skill <nama>`: Aktifkan skill (polyglot, architect, debugger, code_review, test_runner)
|
|
42
|
-
- `/skills`: Lihat semua skill yang tersedia
|
|
43
|
-
- `/tools`: Lihat daftar tools coding yang aktif
|
|
44
|
-
- `/clear`: Reset memory percakapan
|
|
45
|
-
- `/history`: Lihat ringkasan percakapan
|
|
46
|
-
- `/save [file]`: Export percakapan ke Markdown
|
|
47
|
-
- `/exit`: Keluar
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import re
|
|
2
|
-
import warnings
|
|
3
|
-
import urllib.request
|
|
4
|
-
from typing import Optional
|
|
5
|
-
|
|
6
|
-
warnings.filterwarnings("ignore")
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
def web_search(query: str, max_results: int = 5) -> str:
|
|
10
|
-
"""
|
|
11
|
-
Performs a real-time web search using DuckDuckGo to find accurate, up-to-date information.
|
|
12
|
-
"""
|
|
13
|
-
try:
|
|
14
|
-
try:
|
|
15
|
-
from ddgs import DDGS
|
|
16
|
-
except ImportError:
|
|
17
|
-
from duckduckgo_search import DDGS
|
|
18
|
-
|
|
19
|
-
ddgs = DDGS()
|
|
20
|
-
results = list(ddgs.text(query, max_results=max_results))
|
|
21
|
-
|
|
22
|
-
if not results:
|
|
23
|
-
return f"No search results found for: '{query}'"
|
|
24
|
-
|
|
25
|
-
formatted = [f"Web Search Results for '{query}':"]
|
|
26
|
-
formatted.append("=" * 50)
|
|
27
|
-
for i, res in enumerate(results, start=1):
|
|
28
|
-
title = res.get("title", "No title")
|
|
29
|
-
link = res.get("href", res.get("link", ""))
|
|
30
|
-
body = res.get("body", res.get("snippet", ""))
|
|
31
|
-
formatted.append(f"[{i}] {title}\nURL: {link}\nSnippet: {body}\n")
|
|
32
|
-
|
|
33
|
-
return "\n".join(formatted)
|
|
34
|
-
except Exception as e:
|
|
35
|
-
return f"Error executing web search: {str(e)}"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def fetch_webpage(url: str, max_chars: int = 6000) -> str:
|
|
39
|
-
"""
|
|
40
|
-
Fetches the content of a webpage and extracts clean, readable text/markdown.
|
|
41
|
-
"""
|
|
42
|
-
try:
|
|
43
|
-
import requests
|
|
44
|
-
from bs4 import BeautifulSoup
|
|
45
|
-
|
|
46
|
-
headers = {
|
|
47
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
|
48
|
-
}
|
|
49
|
-
resp = requests.get(url, headers=headers, timeout=15)
|
|
50
|
-
resp.raise_for_status()
|
|
51
|
-
|
|
52
|
-
soup = BeautifulSoup(resp.text, "html.parser")
|
|
53
|
-
|
|
54
|
-
for tag in soup(["script", "style", "nav", "footer", "header", "aside", "svg", "noscript"]):
|
|
55
|
-
tag.decompose()
|
|
56
|
-
|
|
57
|
-
title = soup.title.string.strip() if soup.title else url
|
|
58
|
-
text = soup.get_text(separator="\n")
|
|
59
|
-
|
|
60
|
-
clean_lines = [line.strip() for line in text.splitlines() if line.strip()]
|
|
61
|
-
clean_text = "\n".join(clean_lines)
|
|
62
|
-
|
|
63
|
-
if len(clean_text) > max_chars:
|
|
64
|
-
clean_text = clean_text[:max_chars] + f"\n... [Content truncated, total {len(text)} chars]"
|
|
65
|
-
|
|
66
|
-
return f"Title: {title}\nURL: {url}\n\nContent:\n{clean_text}"
|
|
67
|
-
except Exception as e:
|
|
68
|
-
return f"Error fetching webpage from {url}: {str(e)}"
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: yncli
|
|
3
|
-
Version: 1.0.0
|
|
4
|
-
Summary: Autonomous Polyglot AI Coding Agent & TUI
|
|
5
|
-
Author: YNCLI Team
|
|
6
|
-
Requires-Python: >=3.8
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: rich>=13.7.0
|
|
9
|
-
Requires-Dist: prompt_toolkit>=3.0.40
|
|
10
|
-
Requires-Dist: requests>=2.31.0
|
|
11
|
-
Requires-Dist: duckduckgo-search>=6.0.0
|
|
12
|
-
Requires-Dist: beautifulsoup4>=4.12.0
|
|
13
|
-
Requires-Dist: pygments>=2.17.0
|
|
14
|
-
Dynamic: author
|
|
15
|
-
Dynamic: requires-python
|
|
16
|
-
|
|
17
|
-
# ⚡ YNCLI: World-Class Autonomous Polyglot AI Coding Agent & TUI
|
|
18
|
-
|
|
19
|
-
YNCLI adalah AI Coding Agent berbasis CLI/TUI mandiri yang mendukung:
|
|
20
|
-
- **Polyglot Coding Engine**: Menguasai Python, TypeScript/JavaScript, Rust, Go, C/C++, Java/Kotlin, C#/.NET, PHP, Ruby, Dart/Flutter, Swift, SQL, Shell, dan Web stack.
|
|
21
|
-
- **Dynamic Language & Framework Detection**: Otomatis mendeteksi arsitektur project dan menginjeksi idiomatic patterns ke dalam agent.
|
|
22
|
-
- **Autonomous ReAct Loop**: AI dapat membaca file, menulis file, melakukan surgical patch, mencari kode via grep, memvalidasi sintaks via compiler/linter, dan menjalankan perintah di terminal.
|
|
23
|
-
- **Real-Time Date & Environment Awareness**: Mengetahui waktu, tanggal, hari lokal secara real-time.
|
|
24
|
-
- **Thinking / Reasoning Visualizer**: Menampilkan penalaran model (seperti Gemini 3.7 Flash High / Claude 4.6 Thinking) secara live.
|
|
25
|
-
- **Real-time Web Search & Scraper**: DuckDuckGo search + HTML-to-markdown reader bawaan.
|
|
26
|
-
- **Dynamic Skills System**: Mode Architect, Debugger, Code Reviewer, Test Runner, dan Polyglot.
|
|
27
|
-
|
|
28
|
-
## Cara Menggunakan
|
|
29
|
-
|
|
30
|
-
Cukup ketik perintah berikut di PowerShell atau Command Prompt mana saja:
|
|
31
|
-
|
|
32
|
-
### 1. Masuk ke Mode TUI Interaktif:
|
|
33
|
-
```powershell
|
|
34
|
-
yncli
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 2. Mode Direct Execution (Quick Query):
|
|
38
|
-
```powershell
|
|
39
|
-
yncli "buatkan script rest api fastapi lengkap dengan jwt auth"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### 3. Opsi Tambahan:
|
|
43
|
-
```powershell
|
|
44
|
-
# Ganti model
|
|
45
|
-
yncli -m ag/claude-sonnet-4-6
|
|
46
|
-
|
|
47
|
-
# Aktifkan skill tertentu
|
|
48
|
-
yncli -s architect
|
|
49
|
-
|
|
50
|
-
# Lihat daftar model yang tersedia di endpoint
|
|
51
|
-
yncli --list-models
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Slash Commands di dalam TUI:
|
|
55
|
-
- `/model <nama>`: Ganti model AI aktif
|
|
56
|
-
- `/models`: Lihat semua model AI dari endpoint
|
|
57
|
-
- `/skill <nama>`: Aktifkan skill (polyglot, architect, debugger, code_review, test_runner)
|
|
58
|
-
- `/skills`: Lihat semua skill yang tersedia
|
|
59
|
-
- `/tools`: Lihat daftar tools coding yang aktif
|
|
60
|
-
- `/clear`: Reset memory percakapan
|
|
61
|
-
- `/history`: Lihat ringkasan percakapan
|
|
62
|
-
- `/save [file]`: Export percakapan ke Markdown
|
|
63
|
-
- `/exit`: Keluar
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|