shell: fish functions -> ~/.local/bin executables + bash/zsh ports; manage ~/.agents

- 16 cross-shell utilities converted to sh/bash chezmoi executables:
  ai c2p cp-appid extract_agents fab gdc gh-sonr-org-migrate ghg-clone
  ghn gho git-summary launch_omp_livediff_overlay lc-elir mdcp mdp pj
  (ghg-clone not named ghg: unrelated cargo binary owns that name)
- cwd/history helpers stay per-shell: yy c cd clip-last + ghg/ghn/gho
  cd-wrappers in bash/functions/ and zsh/functions/, loaded by rc files
- fish keeps only shell-state functions; converted ones now hit PATH
- cp-appid ignore gating moved to .local/bin path
- dot_agents/skills: 82 skills materialized from dotstate storage so
  dot_claude skill symlinks resolve on fresh bootstrap; dotstate
  profile/symlinks.json released .agents/skills .bashrc .zshrc
This commit is contained in:
Prad Nukala committed 2026-08-10 15:15:06 -04:00
1 parent 6776366ce6
commit 6406208b35
637 files changed
+100297 -497

No files matched your search

@@ -0,0 +1,97 @@
# Workers AI Configuration
## wrangler.jsonc
```jsonc
{
"name": "my-ai-worker",
"main": "src/index.ts",
"compatibility_date": "2024-01-01",
"ai": {
"binding": "AI"
}
}
```
## TypeScript
```bash
npm install --save-dev @cloudflare/workers-types
```
```typescript
interface Env {
AI: Ai;
}
export default {
async fetch(request: Request, env: Env) {
const response = await env.AI.run('@cf/meta/llama-3.1-8b-instruct', {
messages: [{ role: 'user', content: 'Hello' }]
});
return Response.json(response);
}
};
```
## Local Development
```bash
wrangler dev --remote # Required for AI - no local inference
```
## REST API
```typescript
const response = await fetch(
`https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/ai/run/@cf/meta/llama-3.1-8b-instruct`,
{
method: 'POST',
headers: { 'Authorization': `Bearer ${API_TOKEN}` },
body: JSON.stringify({ messages: [{ role: 'user', content: 'Hello' }] })
}
);
```
Create API token at: dash.cloudflare.com/profile/api-tokens (Workers AI - Read permission)
## SDK Compatibility
**OpenAI SDK:**
```typescript
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: env.CLOUDFLARE_API_TOKEN,
baseURL: `https://api.cloudflare.com/client/v4/accounts/${env.ACCOUNT_ID}/ai/v1`
});
```
## Multi-Model Setup
```typescript
const MODELS = {
chat: '@cf/meta/llama-3.1-8b-instruct',
embed: '@cf/baai/bge-base-en-v1.5',
image: '@cf/stabilityai/stable-diffusion-xl-base-1.0'
};
```
## RAG Setup (with Vectorize)
```jsonc
{
"ai": { "binding": "AI" },
"vectorize": {
"bindings": [{ "binding": "VECTORIZE", "index_name": "embeddings-index" }]
}
}
```
## Troubleshooting
| Error | Fix |
|-------|-----|
| `env.AI is undefined` | Check `ai` binding in wrangler.jsonc |
| Local AI doesn't work | Use `wrangler dev --remote` |
| Type 'Ai' not found | Install `@cloudflare/workers-types` |
| @cloudflare/ai package error | Don't install - use native binding |