"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
Python
update CLI-Hub
yuhaob8b21ffe43e5
diff --git a/.github/scripts/update_registry_dates.py b/.github/scripts/update_registry_dates.pynew file mode 100644index 000000000..6cec29eee--- /dev/null+++ b/.github/scripts/update_registry_dates.py@@ -0,0 +1,39 @@+#!/usr/bin/env python3+"""Update registry-dates.json with last modified dates from harness directories."""+import json+import os+from pathlib import Path+from datetime import datetime++def get_last_modified(harness_path):+ """Get the most recent modification time from a harness directory."""+ latest = 0+ for root, _, files in os.walk(harness_path):+ for file in files:+ if file.endswith(('.py', '.md', '.txt', '.json')):+ fpath = os.path.join(root, file)+ mtime = os.path.getmtime(fpath)+ latest = max(latest, mtime)+ return datetime.fromtimestamp(latest).strftime('%Y-%m-%d') if latest else None++def main():+ repo_root = Path(__file__).parent.parent.parent+ registry_path = repo_root / 'registry.json'+ dates_path = repo_root / 'registry-dates.json'++ with open(registry_path) as f:+ data = json.load(f)++ dates = {}+ for cli in data['clis']:+ harness_path = repo_root / cli['name'] / 'agent-harness'+ if harness_path.exists():+ dates[cli['name']] = get_last_modified(harness_path)++ with open(dates_path, 'w') as f:+ json.dump(dates, f, indent=2)++ print(f"Updated dates for {len(dates)} CLI entries")++if __name__ == '__main__':+ main()diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.ymlnew file mode 100644index 000000000..8941f1d3f--- /dev/null+++ b/.github/workflows/deploy-pages.yml@@ -0,0 +1,54 @@+name: Deploy to GitHub Pages++on:+ push:+ branches:+ - main+ paths:+ - '*/agent-harness/**'+ workflow_dispatch:++permissions:+ contents: read+ pages: write+ id-token: write++concurrency:+ group: pages+ cancel-in-progress: false++jobs:+ build:+ runs-on: ubuntu-latest+ steps:+ - name: Checkout+ uses: actions/checkout@v4++ - name: Setup Python+ uses: actions/setup-python@v5+ with:+ python-version: '3.10'++ - name: Generate registry dates+ run: python3 .github/scripts/update_registry_dates.py++ - name: Prepare Pages content+ run: |+ mkdir -p _pages+ cp registry-dates.json _pages/++ - name: Upload artifact+ uses: actions/upload-pages-artifact@v3+ with:+ path: '_pages'++ deploy:+ environment:+ name: github-pages+ url: ${{ steps.deployment.outputs.page_url }}+ runs-on: ubuntu-latest+ needs: build+ steps:+ - name: Deploy to GitHub Pages+ id: deployment+ uses: actions/deploy-pages@v4diff --git a/.gitignore b/.gitignoreindex d25f2334c..fffe5eac8 100644--- a/.gitignore+++ b/.gitignore@@ -18,6 +18,10 @@!/assets/!/.claude-plugin/!/.github/+/.github/*+!/.github/workflows/+!/.github/scripts/+!/.github/PULL_REQUEST_TEMPLATE.md# Step 3: Allow cli-anything-plugin, codex-skill, and skill_generation tests!/cli-anything-plugin/diff --git a/docs/hub/index.html b/docs/hub/index.htmlindex 843d5f175..362f348d0 100644--- a/docs/hub/index.html+++ b/docs/hub/index.html@@ -134,6 +134,19 @@.search:focus { border-color: var(--accent); }+ .sort-select {+ padding: 0.6rem 1rem;+ background: var(--surface);+ border: 1px solid var(--border);+ border-radius: 6px;+ color: var(--text);+ font-size: 0.95rem;+ outline: none;+ cursor: pointer;+ }++ .sort-select:focus { border-color: var(--accent); }+.filter-btn {padding: 0.45rem 0.85rem;background: var(--surface);@@ -295,6 +308,12 @@margin-left: 0.25rem;}+ .card-date {+ font-size: 0.75rem;+ color: var(--text-muted);+ margin-bottom: 0.75rem;+ }+.category-tag {font-size: 0.72rem;color: var(--text-muted);@@ -363,6 +382,11 @@<div class="controls"><input class="search" type="text" placeholder="Search CLIs..." id="search">+ <select class="sort-select" id="sort">+ <option value="updated">Sort: Last Updated</option>+ <option value="name">Sort: Name</option>+ <option value="category">Sort: Category</option>+ </select><div id="filters"></div></div>@@ -378,10 +402,15 @@'../../registry.json','https://raw.githubusercontent.com/HKUDS/CLI-Anything/main/registry.json'];+ const DATES_URLS = [+ 'https://hkuds.github.io/CLI-Anything/registry-dates.json',+ '../../registry-dates.json'+ ];const EXTERNAL_LINK_SVG = '<svg viewBox="0 0 16 16" fill="currentColor"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5H4.56l6.72 6.72a.75.75 0 1 1-1.06 1.06L3.5 4.56v2.69a.75.75 0 0 1-1.5 0v-3.5A1.75 1.75 0 0 1 3.75 2Zm7.5 0h1A1.75 1.75 0 0 1 14 3.75v8.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-1a.75.75 0 0 1 1.5 0v1c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25h-1a.75.75 0 0 1 0-1.5Z"/></svg>';let clis = [];let activeFilter = 'all';+ let sortBy = 'updated';async function loadRegistry() {try {@@ -392,9 +421,22 @@if (resp.ok) break;} catch (_) { continue; }}- if (!resp || !resp.ok) throw new Error('All sources failed');+ if (!resp || !resp.ok) throw new Error('Registry load failed');const data = await resp.json();clis = data.clis;++ // Load dates separately+ for (const url of DATES_URLS) {+ try {+ const datesResp = await fetch(url);+ if (datesResp.ok) {+ const dates = await datesResp.json();+ clis.forEach(c => c.last_modified = dates[c.name]);+ break;+ }+ } catch (_) { continue; }+ }+document.getElementById('cli-count').textContent = clis.length;const categories = [...new Set(clis.map(c => c.category))];document.getElementById('category-count').textContent = categories.length;@@ -449,6 +491,17 @@return matchFilter && matchSearch;});+ filtered.sort((a, b) => {+ if (sortBy === 'updated') {+ return (b.last_modified || '').localeCompare(a.last_modified || '');+ } else if (sortBy === 'name') {+ return a.display_name.localeCompare(b.display_name);+ } else if (sortBy === 'category') {+ return a.category.localeCompare(b.category) || a.display_name.localeCompare(b.display_name);+ }+ return 0;+ });+const grid = document.getElementById('grid');if (filtered.length === 0) {grid.innerHTML = '<div class="empty">No CLIs match your search.</div>';@@ -473,6 +526,9 @@<a href="${esc(c.contributor_url)}" target="_blank">${esc(c.contributor)}</a>${isTeam ? '' : '<span class="community-badge">Community</span>'}</div>`: '';+ const dateHtml = c.last_modified+ ? `<div class="card-date">Last Update Date: ${esc(c.last_modified)}</div>`+ : '';return `<div class="card">@@ -485,6 +541,7 @@</div><div class="card-desc">${esc(c.description)}</div>${contributorHtml}+ ${dateHtml}${requiresHtml}<div class="card-install"><code>${esc(c.install_cmd)}</code>@@ -510,6 +567,10 @@}document.getElementById('search').addEventListener('input', render);+ document.getElementById('sort').addEventListener('change', (e) => {+ sortBy = e.target.value;+ render();+ });loadRegistry();</script></body>