aiden-runtime 3.19.5 → 3.19.7
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.
- package/README.md +1 -1
- package/dist/api/server.js +24 -25
- package/dist/core/agentLoop.js +8 -6
- package/dist/core/aidenPersonality.js +20 -3
- package/dist/core/protectedContext.js +15 -2
- package/dist/core/skillLoader.js +2 -0
- package/dist/core/skillTeacher.js +18 -5
- package/dist/core/version.js +1 -1
- package/dist-bundle/cli.js +50 -18
- package/dist-bundle/index.js +73 -35
- package/package.json +2 -1
- package/scripts/postinstall.js +70 -1
- package/workspace-templates/HEARTBEAT.md +16 -0
- package/workspace-templates/SOUL.md +267 -0
- package/workspace-templates/STANDING_ORDERS.md +21 -0
- package/workspace-templates/permissions.yaml +180 -0
- package/workspace-templates/skills/architecture-diagram/SKILL.md +126 -0
- package/workspace-templates/skills/architecture-diagram/skill.json +25 -0
- package/workspace-templates/skills/arxiv/SKILL.md +124 -0
- package/workspace-templates/skills/arxiv/skill.json +26 -0
- package/workspace-templates/skills/ascii-art/SKILL.md +142 -0
- package/workspace-templates/skills/ascii-art/skill.json +26 -0
- package/workspace-templates/skills/blogwatcher/SKILL.md +147 -0
- package/workspace-templates/skills/blogwatcher/skill.json +26 -0
- package/workspace-templates/skills/censys/SKILL.md +104 -0
- package/workspace-templates/skills/censys/index.ts +133 -0
- package/workspace-templates/skills/censys/skill.json +25 -0
- package/workspace-templates/skills/clipboard-history/SKILL.md +101 -0
- package/workspace-templates/skills/clipboard-history/skill.json +23 -0
- package/workspace-templates/skills/crt-sh/SKILL.md +102 -0
- package/workspace-templates/skills/crt-sh/index.ts +59 -0
- package/workspace-templates/skills/crt-sh/skill.json +25 -0
- package/workspace-templates/skills/cveapi/SKILL.md +114 -0
- package/workspace-templates/skills/cveapi/index.ts +249 -0
- package/workspace-templates/skills/cveapi/skill.json +25 -0
- package/workspace-templates/skills/docker-management/SKILL.md +156 -0
- package/workspace-templates/skills/docker-management/skill.json +25 -0
- package/workspace-templates/skills/excalidraw/SKILL.md +148 -0
- package/workspace-templates/skills/excalidraw/skill.json +25 -0
- package/workspace-templates/skills/explainshell/SKILL.md +93 -0
- package/workspace-templates/skills/explainshell/index.ts +132 -0
- package/workspace-templates/skills/explainshell/skill.json +25 -0
- package/workspace-templates/skills/financial_research/SKILL.md +21 -0
- package/workspace-templates/skills/financial_research/skill.json +24 -0
- package/workspace-templates/skills/gif-search/SKILL.md +122 -0
- package/workspace-templates/skills/gif-search/skill.json +25 -0
- package/workspace-templates/skills/github-auth/SKILL.md +134 -0
- package/workspace-templates/skills/github-auth/skill.json +26 -0
- package/workspace-templates/skills/github-issues/SKILL.md +130 -0
- package/workspace-templates/skills/github-issues/skill.json +25 -0
- package/workspace-templates/skills/github-pr-workflow/SKILL.md +143 -0
- package/workspace-templates/skills/github-pr-workflow/skill.json +26 -0
- package/workspace-templates/skills/github-repo-management/SKILL.md +147 -0
- package/workspace-templates/skills/github-repo-management/skill.json +26 -0
- package/workspace-templates/skills/google-workspace/SKILL.md +110 -0
- package/workspace-templates/skills/google-workspace/skill.json +26 -0
- package/workspace-templates/skills/greynoise/SKILL.md +96 -0
- package/workspace-templates/skills/greynoise/index.ts +107 -0
- package/workspace-templates/skills/greynoise/skill.json +25 -0
- package/workspace-templates/skills/haveibeenpwned/SKILL.md +100 -0
- package/workspace-templates/skills/haveibeenpwned/index.ts +72 -0
- package/workspace-templates/skills/haveibeenpwned/skill.json +24 -0
- package/workspace-templates/skills/jupyter-live-kernel/SKILL.md +116 -0
- package/workspace-templates/skills/jupyter-live-kernel/skill.json +25 -0
- package/workspace-templates/skills/linear/SKILL.md +107 -0
- package/workspace-templates/skills/linear/skill.json +25 -0
- package/workspace-templates/skills/nano-pdf/SKILL.md +113 -0
- package/workspace-templates/skills/nano-pdf/skill.json +26 -0
- package/workspace-templates/skills/notion/SKILL.md +108 -0
- package/workspace-templates/skills/notion/skill.json +24 -0
- package/workspace-templates/skills/obsidian/SKILL.md +115 -0
- package/workspace-templates/skills/obsidian/skill.json +24 -0
- package/workspace-templates/skills/ocr-and-documents/SKILL.md +125 -0
- package/workspace-templates/skills/ocr-and-documents/skill.json +26 -0
- package/workspace-templates/skills/p5js/SKILL.md +163 -0
- package/workspace-templates/skills/p5js/skill.json +24 -0
- package/workspace-templates/skills/research-paper-writing/SKILL.md +158 -0
- package/workspace-templates/skills/research-paper-writing/skill.json +26 -0
- package/workspace-templates/skills/securityheaders/SKILL.md +99 -0
- package/workspace-templates/skills/securityheaders/index.ts +213 -0
- package/workspace-templates/skills/securityheaders/skill.json +26 -0
- package/workspace-templates/skills/shodan/SKILL.md +113 -0
- package/workspace-templates/skills/shodan/index.ts +94 -0
- package/workspace-templates/skills/shodan/skill.json +26 -0
- package/workspace-templates/skills/songsee/SKILL.md +152 -0
- package/workspace-templates/skills/songsee/skill.json +25 -0
- package/workspace-templates/skills/ssllabs/SKILL.md +107 -0
- package/workspace-templates/skills/ssllabs/index.ts +208 -0
- package/workspace-templates/skills/ssllabs/skill.json +27 -0
- package/workspace-templates/skills/stable-diffusion-image-generation/SKILL.md +136 -0
- package/workspace-templates/skills/stable-diffusion-image-generation/skill.json +24 -0
- package/workspace-templates/skills/systematic-debugging/SKILL.md +131 -0
- package/workspace-templates/skills/systematic-debugging/skill.json +25 -0
- package/workspace-templates/skills/test-driven-development/SKILL.md +164 -0
- package/workspace-templates/skills/test-driven-development/skill.json +25 -0
- package/workspace-templates/skills/urlscan/SKILL.md +118 -0
- package/workspace-templates/skills/urlscan/index.ts +94 -0
- package/workspace-templates/skills/urlscan/skill.json +24 -0
- package/workspace-templates/skills/virustotal/SKILL.md +120 -0
- package/workspace-templates/skills/virustotal/index.ts +124 -0
- package/workspace-templates/skills/virustotal/skill.json +26 -0
- package/workspace-templates/skills/web_research/SKILL.md +18 -0
- package/workspace-templates/skills/web_research/skill.json +20 -0
- package/workspace-templates/skills/xitter/SKILL.md +148 -0
- package/workspace-templates/skills/xitter/skill.json +26 -0
- package/workspace-templates/skills/youtube-content/SKILL.md +121 -0
- package/workspace-templates/skills/youtube-content/skill.json +25 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explainshell
|
|
3
|
+
description: Break down shell commands and one-liners into plain-English explanations — powered by explainshell.com
|
|
4
|
+
category: developer
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
license: Apache-2.0
|
|
7
|
+
origin: aiden
|
|
8
|
+
tags: shell, bash, linux, commands, explainer, learning, devops, documentation, scripting
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# ExplainShell — Shell Command Explainer
|
|
12
|
+
|
|
13
|
+
Paste any shell command or one-liner and get a plain-English breakdown of every flag, argument, and pipe stage. Powered by explainshell.com, which maps commands to their man-page descriptions.
|
|
14
|
+
|
|
15
|
+
**No API key required.** Works immediately for any user.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
- User pastes a cryptic command and asks "what does this do?"
|
|
20
|
+
- Reviewing an unfamiliar bash script or automation pipeline
|
|
21
|
+
- Learning: user wants to understand each part of a complex one-liner
|
|
22
|
+
- Documentation: need to annotate shell commands in runbooks
|
|
23
|
+
- User asks "explain this command", "what does this flag mean?", "break this down"
|
|
24
|
+
|
|
25
|
+
## How to Use
|
|
26
|
+
|
|
27
|
+
### Explain a single command (browser link)
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
# The simplest approach — open the explanation in the browser
|
|
31
|
+
$command = "tar -xzf archive.tar.gz -C /tmp"
|
|
32
|
+
$encoded = [Uri]::EscapeDataString($command)
|
|
33
|
+
Start-Process "https://explainshell.com/explain?cmd=$encoded"
|
|
34
|
+
Write-Host "Opened: https://explainshell.com/explain?cmd=$encoded"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Fetch explanation text directly (PowerShell)
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
$command = "find . -type f -name '*.log' -mtime +7 -exec rm {} \;"
|
|
41
|
+
$encoded = [Uri]::EscapeDataString($command)
|
|
42
|
+
$url = "https://explainshell.com/explain?cmd=$encoded"
|
|
43
|
+
|
|
44
|
+
$html = Invoke-WebRequest -Uri $url -UseBasicParsing
|
|
45
|
+
# Extract helptext spans (plain text explanations)
|
|
46
|
+
$pattern = '<span class="helptext">(.*?)</span>'
|
|
47
|
+
$matches = [regex]::Matches($html.Content, $pattern, 'Singleline')
|
|
48
|
+
|
|
49
|
+
Write-Host "Command: $command"
|
|
50
|
+
Write-Host ""
|
|
51
|
+
$matches | ForEach-Object {
|
|
52
|
+
$text = $_.Groups[1].Value -replace '<[^>]+>', '' -replace '&', '&' -replace '<', '<' -replace '>', '>'
|
|
53
|
+
if ($text.Trim()) { Write-Host " • $($text.Trim())" }
|
|
54
|
+
}
|
|
55
|
+
Write-Host ""
|
|
56
|
+
Write-Host "Full explanation: $url"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Explain a piped one-liner
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
$command = "ps aux | awk '{print \$2, \$11}' | sort -k2 | uniq -c | sort -rn | head -10"
|
|
63
|
+
$encoded = [Uri]::EscapeDataString($command)
|
|
64
|
+
Write-Host "ExplainShell link:"
|
|
65
|
+
Write-Host " https://explainshell.com/explain?cmd=$encoded"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Examples
|
|
69
|
+
|
|
70
|
+
**"Explain: tar -xzf file.tar.gz"**
|
|
71
|
+
→ `tar`: archive utility; `-x`: extract; `-z`: filter through gzip; `-f`: use archive file.
|
|
72
|
+
|
|
73
|
+
**"What does find . -type f -exec rm {} \\; do?"**
|
|
74
|
+
→ `find`: search; `.`: starting directory; `-type f`: only files; `-exec rm {} ;`: run rm on each result.
|
|
75
|
+
|
|
76
|
+
**"Break down: awk '{print $2}' | sort | uniq -c"**
|
|
77
|
+
→ `awk`: text processor prints second field; `sort`: lexicographic sort; `uniq -c`: count consecutive duplicates.
|
|
78
|
+
|
|
79
|
+
**"What is 2>&1 in a command?"**
|
|
80
|
+
→ Redirects stderr (fd 2) to the same destination as stdout (fd 1) — merges error output.
|
|
81
|
+
|
|
82
|
+
## Cautions
|
|
83
|
+
|
|
84
|
+
- explainshell.com covers most standard POSIX and GNU commands — may not know custom scripts or aliases
|
|
85
|
+
- Very long one-liners (> 200 chars) may produce incomplete explanations
|
|
86
|
+
- Some compound expressions (e.g. complex `awk` programs) parse partially
|
|
87
|
+
- Rate-limit: be polite — avoid bulk automated requests to a free community service
|
|
88
|
+
- The HTML structure may change; if parsing fails, the URL is always valid as a fallback
|
|
89
|
+
|
|
90
|
+
## Requirements
|
|
91
|
+
|
|
92
|
+
- None — no API key needed
|
|
93
|
+
- Works with any POSIX/GNU shell command or pipeline
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// skills/explainshell/index.ts
|
|
2
|
+
// Programmatic handler — fetch and parse shell command explanations from explainshell.com.
|
|
3
|
+
|
|
4
|
+
import { ApiSkill } from '../../core/apiSkillBase'
|
|
5
|
+
|
|
6
|
+
const skill = new ApiSkill({
|
|
7
|
+
name: 'explainshell',
|
|
8
|
+
baseUrl: 'https://explainshell.com',
|
|
9
|
+
authType: 'none',
|
|
10
|
+
rateLimit: { requests: 5, windowMs: 1_000 },
|
|
11
|
+
timeout: 15_000,
|
|
12
|
+
retries: 2,
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
// ── HTML parsing helpers ──────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
/** Strip HTML tags from a string. */
|
|
18
|
+
function stripTags(html: string): string {
|
|
19
|
+
return html
|
|
20
|
+
.replace(/<[^>]+>/g, '')
|
|
21
|
+
.replace(/&/g, '&')
|
|
22
|
+
.replace(/</g, '<')
|
|
23
|
+
.replace(/>/g, '>')
|
|
24
|
+
.replace(/"/g, '"')
|
|
25
|
+
.replace(/'/g, "'")
|
|
26
|
+
.replace(/ /g, ' ')
|
|
27
|
+
.replace(/\s+/g, ' ')
|
|
28
|
+
.trim()
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Extract explanation fragments from explainshell HTML.
|
|
33
|
+
*
|
|
34
|
+
* The page contains elements like:
|
|
35
|
+
* <span class="helptext">explanation text...</span>
|
|
36
|
+
* <div class="help-box">...</div>
|
|
37
|
+
* as well as argument tokens in <span class="arg">...</span>.
|
|
38
|
+
*
|
|
39
|
+
* We extract helptext spans and pair them with their nearest
|
|
40
|
+
* argument token for a readable breakdown.
|
|
41
|
+
*/
|
|
42
|
+
function parseExplainshellHtml(html: string): string[] {
|
|
43
|
+
const results: string[] = []
|
|
44
|
+
|
|
45
|
+
// Match each helptext block — may span multiple lines
|
|
46
|
+
const helptextRe = /<span[^>]*class="helptext"[^>]*>([\s\S]*?)<\/span>/gi
|
|
47
|
+
let match: RegExpExecArray | null
|
|
48
|
+
|
|
49
|
+
while ((match = helptextRe.exec(html)) !== null) {
|
|
50
|
+
const text = stripTags(match[1])
|
|
51
|
+
if (text.length > 2) results.push(text)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// If helptext approach yields nothing, try extracting from help-box divs
|
|
55
|
+
if (results.length === 0) {
|
|
56
|
+
const boxRe = /<div[^>]*class="[^"]*help-box[^"]*"[^>]*>([\s\S]*?)<\/div>/gi
|
|
57
|
+
while ((match = boxRe.exec(html)) !== null) {
|
|
58
|
+
const text = stripTags(match[1])
|
|
59
|
+
if (text.length > 5) results.push(text)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Deduplicate while preserving order
|
|
64
|
+
const seen = new Set<string>()
|
|
65
|
+
return results.filter(r => {
|
|
66
|
+
const k = r.slice(0, 80)
|
|
67
|
+
if (seen.has(k)) return false
|
|
68
|
+
seen.add(k)
|
|
69
|
+
return true
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Check if the HTML indicates the command was not found. */
|
|
74
|
+
function isNotFound(html: string): boolean {
|
|
75
|
+
return /no match for/i.test(html) || /couldn.t parse/i.test(html)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ── Public API ────────────────────────────────────────────────
|
|
79
|
+
|
|
80
|
+
export interface ExplainResult {
|
|
81
|
+
command: string
|
|
82
|
+
url: string
|
|
83
|
+
breakdown: string[] // plain-text explanations, one per flag/segment
|
|
84
|
+
parsed: boolean // false if HTML parsing yielded nothing (URL still valid)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Fetch a plain-English breakdown of a shell command.
|
|
89
|
+
*
|
|
90
|
+
* @param command The shell command to explain (e.g. "tar -xzf file.tar.gz")
|
|
91
|
+
* @returns ExplainResult with URL and parsed breakdown array
|
|
92
|
+
*/
|
|
93
|
+
export async function explain(command: string): Promise<ExplainResult> {
|
|
94
|
+
const cmd = command.trim()
|
|
95
|
+
const encoded = encodeURIComponent(cmd)
|
|
96
|
+
const url = `https://explainshell.com/explain?cmd=${encoded}`
|
|
97
|
+
|
|
98
|
+
let breakdown: string[] = []
|
|
99
|
+
let parsed = false
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const html = await skill.get('/explain', { cmd })
|
|
103
|
+
|
|
104
|
+
if (typeof html === 'string') {
|
|
105
|
+
if (isNotFound(html)) {
|
|
106
|
+
breakdown = [`explainshell did not recognise "${cmd}" — try visiting the URL directly.`]
|
|
107
|
+
} else {
|
|
108
|
+
breakdown = parseExplainshellHtml(html)
|
|
109
|
+
parsed = breakdown.length > 0
|
|
110
|
+
if (!parsed) {
|
|
111
|
+
breakdown = ['Explanation available at the URL below — could not parse the response automatically.']
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} catch {
|
|
116
|
+
breakdown = ['Could not reach explainshell.com — visit the URL manually.']
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return { command: cmd, url, breakdown, parsed }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Format an ExplainResult as a readable string. */
|
|
123
|
+
export function formatExplanation(result: ExplainResult): string {
|
|
124
|
+
const lines = [`Command: ${result.command}`, '']
|
|
125
|
+
|
|
126
|
+
if (result.breakdown.length > 0) {
|
|
127
|
+
result.breakdown.forEach(b => lines.push(` • ${b}`))
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
lines.push('', `Full explanation: ${result.url}`)
|
|
131
|
+
return lines.join('\n')
|
|
132
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "explainshell",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Break down shell commands and one-liners into plain-English explanations — powered by explainshell.com",
|
|
5
|
+
"author": "aiden",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"tools": [],
|
|
8
|
+
"trigger_phrases": [],
|
|
9
|
+
"compatible_agents": [
|
|
10
|
+
"aiden"
|
|
11
|
+
],
|
|
12
|
+
"min_agent_version": "3.0.0",
|
|
13
|
+
"tags": [
|
|
14
|
+
"shell",
|
|
15
|
+
"bash",
|
|
16
|
+
"linux",
|
|
17
|
+
"commands",
|
|
18
|
+
"explainer",
|
|
19
|
+
"learning",
|
|
20
|
+
"devops",
|
|
21
|
+
"documentation",
|
|
22
|
+
"scripting"
|
|
23
|
+
],
|
|
24
|
+
"created": "2026-04-27T17:11:39.556Z"
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: financial_research
|
|
3
|
+
description: Research stocks, companies, and market data using real-time financial APIs
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
tags: finance, stocks, market, investment, NSE, BSE, equity, company
|
|
6
|
+
license: Apache-2.0
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Financial Research
|
|
10
|
+
|
|
11
|
+
When performing financial research:
|
|
12
|
+
1. Use get_market_data first to get the live price, change %, and volume for any symbol
|
|
13
|
+
2. Use get_company_info to fetch sector, industry, P/E ratio, EPS, revenue, and profit margins
|
|
14
|
+
3. Use web_search to find recent news, analyst upgrades/downgrades, and earnings updates
|
|
15
|
+
4. Synthesise all three into a structured summary: price snapshot → company profile → recent news → outlook
|
|
16
|
+
5. For NSE stocks: symbol is the ticker only (e.g. RELIANCE, TCS) — tool auto-appends .NS
|
|
17
|
+
6. For BSE stocks: append .BO manually (e.g. RELIANCE.BO) if the user specifies BSE
|
|
18
|
+
7. For US stocks: use the bare symbol (e.g. AAPL, TSLA, NVDA)
|
|
19
|
+
8. Always state the data source and note that prices are delayed/indicative if market is closed
|
|
20
|
+
9. When comparing multiple stocks: build a table with symbol, price, change%, P/E, sector
|
|
21
|
+
10. Never give buy/sell advice — present data and let the user decide
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "financial_research",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Research stocks, companies, and market data using real-time financial APIs",
|
|
5
|
+
"author": "local",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"tools": [],
|
|
8
|
+
"trigger_phrases": [],
|
|
9
|
+
"compatible_agents": [
|
|
10
|
+
"aiden"
|
|
11
|
+
],
|
|
12
|
+
"min_agent_version": "3.0.0",
|
|
13
|
+
"tags": [
|
|
14
|
+
"finance",
|
|
15
|
+
"stocks",
|
|
16
|
+
"market",
|
|
17
|
+
"investment",
|
|
18
|
+
"NSE",
|
|
19
|
+
"BSE",
|
|
20
|
+
"equity",
|
|
21
|
+
"company"
|
|
22
|
+
],
|
|
23
|
+
"created": "2026-04-27T17:11:39.591Z"
|
|
24
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gif-search
|
|
3
|
+
description: Search and fetch GIFs from Tenor using the public API with curl or PowerShell — requires a free Tenor API key
|
|
4
|
+
category: media
|
|
5
|
+
version: 1.0.1
|
|
6
|
+
origin: aiden
|
|
7
|
+
license: Apache-2.0
|
|
8
|
+
tags: gif, tenor, giphy, search, media, animation, image, reaction, fun
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# GIF Search via Tenor
|
|
12
|
+
|
|
13
|
+
Search and fetch GIFs using the Tenor API. Obtain a free API key at
|
|
14
|
+
https://developers.google.com/tenor/guides/quickstart (takes 2 minutes) and set it as
|
|
15
|
+
the `TENOR_API_KEY` environment variable. All examples below use `$env:TENOR_API_KEY`
|
|
16
|
+
(PowerShell) or `os.environ["TENOR_API_KEY"]` (Python).
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
- User wants to find a GIF for a given mood, reaction, or topic
|
|
21
|
+
- User wants to share a GIF URL in a chat or document
|
|
22
|
+
- User wants to download a GIF file locally
|
|
23
|
+
- User wants to embed a GIF in a web page or email
|
|
24
|
+
|
|
25
|
+
## How to Use
|
|
26
|
+
|
|
27
|
+
### 1. Search GIFs with PowerShell (no API key needed)
|
|
28
|
+
|
|
29
|
+
```powershell
|
|
30
|
+
function Search-Gif($query, $limit = 5) {
|
|
31
|
+
$q = [Uri]::EscapeDataString($query)
|
|
32
|
+
$url = "https://tenor.googleapis.com/v2/search?q=$q&limit=$limit&key=$env:TENOR_API_KEY"
|
|
33
|
+
$resp = Invoke-RestMethod -Uri $url
|
|
34
|
+
$resp.results | ForEach-Object {
|
|
35
|
+
[PSCustomObject]@{
|
|
36
|
+
Title = $_.title
|
|
37
|
+
GifUrl = $_.media_formats.gif.url
|
|
38
|
+
PreviewUrl = $_.media_formats.tinygif.url
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
# Usage
|
|
44
|
+
Search-Gif "excited celebration" | Format-Table -AutoSize
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. Search GIFs with Python
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
import requests, urllib.parse
|
|
51
|
+
|
|
52
|
+
def search_gif(query, limit=5, api_key=None):
|
|
53
|
+
api_key = api_key or os.environ.get("TENOR_API_KEY", "")
|
|
54
|
+
params = {"q": query, "limit": limit, "key": api_key}
|
|
55
|
+
resp = requests.get("https://tenor.googleapis.com/v2/search", params=params)
|
|
56
|
+
resp.raise_for_status()
|
|
57
|
+
results = resp.json().get("results", [])
|
|
58
|
+
return [{"title": r["title"], "url": r["media_formats"]["gif"]["url"]} for r in results]
|
|
59
|
+
|
|
60
|
+
gifs = search_gif("happy dancing")
|
|
61
|
+
for g in gifs:
|
|
62
|
+
print(g["title"])
|
|
63
|
+
print(g["url"])
|
|
64
|
+
print()
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 3. Get trending GIFs
|
|
68
|
+
|
|
69
|
+
```powershell
|
|
70
|
+
$url = "https://tenor.googleapis.com/v2/featured?limit=10&key=$env:TENOR_API_KEY"
|
|
71
|
+
$resp = Invoke-RestMethod -Uri $url
|
|
72
|
+
$resp.results | Select-Object title, @{N="url";E={$_.media_formats.gif.url}}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 4. Download a GIF to disk
|
|
76
|
+
|
|
77
|
+
```powershell
|
|
78
|
+
$gifUrl = "https://media.tenor.com/your-gif.gif"
|
|
79
|
+
$outPath = "C:\Users\shiva\Downloads\reaction.gif"
|
|
80
|
+
Invoke-WebRequest -Uri $gifUrl -OutFile $outPath
|
|
81
|
+
Write-Host "Downloaded: $outPath"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 5. Get a GIF by category (reaction types)
|
|
85
|
+
|
|
86
|
+
```powershell
|
|
87
|
+
# Categories: happy, sad, angry, love, funny, wow, thumbsup, facepalm, etc.
|
|
88
|
+
$category = "facepalm"
|
|
89
|
+
Search-Gif $category -limit 3 | Select-Object GifUrl
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 6. Use your own Tenor API key (higher rate limits)
|
|
93
|
+
|
|
94
|
+
Register at https://developers.google.com/tenor/guides/quickstart — free, takes 2 minutes.
|
|
95
|
+
|
|
96
|
+
```powershell
|
|
97
|
+
$env:TENOR_API_KEY = "your_api_key_here"
|
|
98
|
+
|
|
99
|
+
function Search-Gif($query, $limit = 5) {
|
|
100
|
+
$q = [Uri]::EscapeDataString($query)
|
|
101
|
+
$url = "https://tenor.googleapis.com/v2/search?q=$q&limit=$limit&key=$env:TENOR_API_KEY"
|
|
102
|
+
(Invoke-RestMethod -Uri $url).results | Select-Object title, @{N="url";E={$_.media_formats.gif.url}}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Examples
|
|
107
|
+
|
|
108
|
+
**"Find me a GIF for when tests are passing"**
|
|
109
|
+
→ Use step 2 with query `"success celebration cheering"` and return the top result URL.
|
|
110
|
+
|
|
111
|
+
**"What are trending GIFs right now?"**
|
|
112
|
+
→ Use step 3 to fetch featured/trending GIFs.
|
|
113
|
+
|
|
114
|
+
**"Download the first result for 'thumbs up'"**
|
|
115
|
+
→ Use step 1 to search, then step 4 to download the `GifUrl` of the first result.
|
|
116
|
+
|
|
117
|
+
## Cautions
|
|
118
|
+
|
|
119
|
+
- The demo API key used in examples has low rate limits — register your own free key for production use
|
|
120
|
+
- Tenor GIF URLs are CDN links and may not be permanently stable — don't store them long-term
|
|
121
|
+
- GIF files can be large (1-20 MB) — check size before downloading in bulk
|
|
122
|
+
- Always attribute Tenor as the source when displaying GIFs publicly
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gif-search",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Search and fetch GIFs from Tenor using the public API with curl or PowerShell — requires a free Tenor API key",
|
|
5
|
+
"author": "aiden",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"tools": [],
|
|
8
|
+
"trigger_phrases": [],
|
|
9
|
+
"compatible_agents": [
|
|
10
|
+
"aiden"
|
|
11
|
+
],
|
|
12
|
+
"min_agent_version": "3.0.0",
|
|
13
|
+
"tags": [
|
|
14
|
+
"gif",
|
|
15
|
+
"tenor",
|
|
16
|
+
"giphy",
|
|
17
|
+
"search",
|
|
18
|
+
"media",
|
|
19
|
+
"animation",
|
|
20
|
+
"image",
|
|
21
|
+
"reaction",
|
|
22
|
+
"fun"
|
|
23
|
+
],
|
|
24
|
+
"created": "2026-04-27T17:11:39.623Z"
|
|
25
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-auth
|
|
3
|
+
description: Set up GitHub authentication via gh CLI, SSH keys, and HTTPS personal access tokens
|
|
4
|
+
category: developer
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
origin: aiden
|
|
7
|
+
license: Apache-2.0
|
|
8
|
+
tags: github, auth, ssh, pat, token, credentials, gh-cli, authentication, git, https
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# GitHub Authentication Setup
|
|
12
|
+
|
|
13
|
+
Configure GitHub authentication for `git` and `gh` CLI operations using the GitHub CLI (`gh`), SSH keys, or HTTPS personal access tokens (PATs).
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- User needs to authenticate with GitHub from a new machine
|
|
18
|
+
- User is getting `Permission denied (publickey)` or `Authentication failed` errors
|
|
19
|
+
- User wants to switch from HTTPS to SSH authentication
|
|
20
|
+
- User wants to create or rotate a personal access token
|
|
21
|
+
- User wants to verify their current GitHub credentials are working
|
|
22
|
+
|
|
23
|
+
## How to Use
|
|
24
|
+
|
|
25
|
+
### 1. Authenticate with gh CLI (recommended)
|
|
26
|
+
|
|
27
|
+
```powershell
|
|
28
|
+
# Interactive login — opens browser for OAuth
|
|
29
|
+
gh auth login
|
|
30
|
+
|
|
31
|
+
# Choose: GitHub.com → HTTPS → Authenticate with browser
|
|
32
|
+
# Or choose SSH if preferred
|
|
33
|
+
|
|
34
|
+
# Verify authentication
|
|
35
|
+
gh auth status
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 2. Create an SSH key
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
# Generate Ed25519 key (modern, secure)
|
|
42
|
+
ssh-keygen -t ed25519 -C "your-email@example.com" -f "$env:USERPROFILE\.ssh\github_ed25519"
|
|
43
|
+
|
|
44
|
+
# Start ssh-agent and add key
|
|
45
|
+
Start-Service ssh-agent
|
|
46
|
+
ssh-add "$env:USERPROFILE\.ssh\github_ed25519"
|
|
47
|
+
|
|
48
|
+
# Display public key to copy to GitHub
|
|
49
|
+
Get-Content "$env:USERPROFILE\.ssh\github_ed25519.pub"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
After running step 2, the user must add the public key at https://github.com/settings/keys → New SSH key.
|
|
53
|
+
|
|
54
|
+
### 3. Configure SSH to use the key for GitHub
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
# Create or append to SSH config
|
|
58
|
+
$config = @"
|
|
59
|
+
|
|
60
|
+
Host github.com
|
|
61
|
+
HostName github.com
|
|
62
|
+
User git
|
|
63
|
+
IdentityFile ~/.ssh/github_ed25519
|
|
64
|
+
"@
|
|
65
|
+
Add-Content "$env:USERPROFILE\.ssh\config" $config
|
|
66
|
+
|
|
67
|
+
# Test SSH connection
|
|
68
|
+
ssh -T git@github.com
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 4. Create a Personal Access Token (HTTPS)
|
|
72
|
+
|
|
73
|
+
Direct the user to: https://github.com/settings/tokens/new
|
|
74
|
+
- Select scopes: `repo`, `read:org` (for org repos), `workflow` (for Actions)
|
|
75
|
+
- Copy the token — it is shown only once
|
|
76
|
+
|
|
77
|
+
```powershell
|
|
78
|
+
# Configure git to cache HTTPS credentials
|
|
79
|
+
git config --global credential.helper wincred
|
|
80
|
+
|
|
81
|
+
# Test — will prompt for username + PAT as password
|
|
82
|
+
git clone https://github.com/your-org/your-repo.git
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 5. Configure gh CLI with a PAT
|
|
86
|
+
|
|
87
|
+
```powershell
|
|
88
|
+
# Authenticate gh CLI with a PAT non-interactively
|
|
89
|
+
$env:GH_TOKEN = "ghp_your_token_here"
|
|
90
|
+
gh auth status
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 6. Verify and list configured credentials
|
|
94
|
+
|
|
95
|
+
```powershell
|
|
96
|
+
# Check gh auth
|
|
97
|
+
gh auth status
|
|
98
|
+
|
|
99
|
+
# Check git remote URL type
|
|
100
|
+
git remote -v
|
|
101
|
+
|
|
102
|
+
# Test SSH
|
|
103
|
+
ssh -T git@github.com
|
|
104
|
+
# Expected: "Hi username! You've successfully authenticated..."
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### 7. Switch a repo from HTTPS to SSH
|
|
108
|
+
|
|
109
|
+
```powershell
|
|
110
|
+
# Show current remote
|
|
111
|
+
git remote get-url origin
|
|
112
|
+
|
|
113
|
+
# Change to SSH
|
|
114
|
+
git remote set-url origin git@github.com:owner/repo.git
|
|
115
|
+
git remote -v # verify
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Examples
|
|
119
|
+
|
|
120
|
+
**"I'm on a new machine and need to set up GitHub access"**
|
|
121
|
+
→ Use step 1 (`gh auth login`) for the quickest setup. If SSH is preferred, use steps 2–3 then step 1 with SSH option.
|
|
122
|
+
|
|
123
|
+
**"I'm getting Authentication failed when pushing to GitHub"**
|
|
124
|
+
→ Use step 6 to diagnose. If HTTPS, rotate the PAT (step 4). If SSH, run `ssh -T git@github.com` to test.
|
|
125
|
+
|
|
126
|
+
**"Generate a new SSH key and add it to GitHub"**
|
|
127
|
+
→ Use steps 2–3 and instruct user to paste the public key at github.com/settings/keys.
|
|
128
|
+
|
|
129
|
+
## Cautions
|
|
130
|
+
|
|
131
|
+
- Never store PATs in code files or commit them to git — use environment variables or the system keychain
|
|
132
|
+
- PATs shown on GitHub are one-time — copy immediately when created
|
|
133
|
+
- SSH keys without passphrases are convenient but less secure — recommend a passphrase for shared machines
|
|
134
|
+
- `gh auth login` stores credentials in the system keychain — do not use on untrusted machines
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "github-auth",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Set up GitHub authentication via gh CLI, SSH keys, and HTTPS personal access tokens",
|
|
5
|
+
"author": "aiden",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"tools": [],
|
|
8
|
+
"trigger_phrases": [],
|
|
9
|
+
"compatible_agents": [
|
|
10
|
+
"aiden"
|
|
11
|
+
],
|
|
12
|
+
"min_agent_version": "3.0.0",
|
|
13
|
+
"tags": [
|
|
14
|
+
"github",
|
|
15
|
+
"auth",
|
|
16
|
+
"ssh",
|
|
17
|
+
"pat",
|
|
18
|
+
"token",
|
|
19
|
+
"credentials",
|
|
20
|
+
"gh-cli",
|
|
21
|
+
"authentication",
|
|
22
|
+
"git",
|
|
23
|
+
"https"
|
|
24
|
+
],
|
|
25
|
+
"created": "2026-04-27T17:11:39.656Z"
|
|
26
|
+
}
|