bluesky_bot_templatemain.tsx1 match
1import process from "node:process";
2import { AppBskyFeedPost, AtpAgent } from "npm:@atproto/api";
34const agent = new AtpAgent({
vividCopperWrenREADME.md2 matches
671. Sign up for [Cerebras](https://cloud.cerebras.ai/)
82. Get a Cerebras API Key
93. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
vividCopperWrenmain.tsx5 matches
217} catch (error) {
218Toastify({
219text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220position: "center",
221duration: 3000,
970};
971} else {
972const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973const completion = await client.chat.completions.create({
974messages: [
1095<meta name="viewport" content="width=device-width, initial-scale=1.0">
1096<title>CerebrasCoder</title>
1097<link rel="preconnect" href="https://fonts.googleapis.com" />
1098<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099<link
1100href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
1101rel="stylesheet"
1102/>
1111<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112<meta property="og:type" content="website">
1113<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115
reverentAquaCuckooREADME.md2 matches
671. Sign up for [Cerebras](https://cloud.cerebras.ai/)
82. Get a Cerebras API Key
93. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
reverentAquaCuckoomain.tsx5 matches
217} catch (error) {
218Toastify({
219text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220position: "center",
221duration: 3000,
970};
971} else {
972const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973const completion = await client.chat.completions.create({
974messages: [
1095<meta name="viewport" content="width=device-width, initial-scale=1.0">
1096<title>CerebrasCoder</title>
1097<link rel="preconnect" href="https://fonts.googleapis.com" />
1098<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099<link
1100href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
1101rel="stylesheet"
1102/>
1111<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112<meta property="og:type" content="website">
1113<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115
exuberantLimeReindeerREADME.md2 matches
671. Sign up for [Cerebras](https://cloud.cerebras.ai/)
82. Get a Cerebras API Key
93. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
exuberantLimeReindeermain.tsx5 matches
217} catch (error) {
218Toastify({
219text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220position: "center",
221duration: 3000,
970};
971} else {
972const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973const completion = await client.chat.completions.create({
974messages: [
1095<meta name="viewport" content="width=device-width, initial-scale=1.0">
1096<title>CerebrasCoder</title>
1097<link rel="preconnect" href="https://fonts.googleapis.com" />
1098<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099<link
1100href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
1101rel="stylesheet"
1102/>
1111<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112<meta property="og:type" content="website">
1113<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115
cerebras_coderREADME.md2 matches
671. Sign up for [Cerebras](https://cloud.cerebras.ai/)
82. Get a Cerebras API Key
93. Save it in a [Val Town environment variable](https://www.val.town/settings/environment-variables) called `CEREBRAS_API_KEY`
cerebras_codermain.tsx5 matches
217} catch (error) {
218Toastify({
219text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
220position: "center",
221duration: 3000,
970};
971} else {
972const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
973const completion = await client.chat.completions.create({
974messages: [
1095<meta name="viewport" content="width=device-width, initial-scale=1.0">
1096<title>CerebrasCoder</title>
1097<link rel="preconnect" href="https://fonts.googleapis.com" />
1098<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
1099<link
1100href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
1101rel="stylesheet"
1102/>
1111<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1112<meta property="og:type" content="website">
1113<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
1114
1115
rm_ios_testmain.tsx15 matches
255`);
256257// GET /api/apps => return all apps
258if (request.method === "GET" && request.url.endsWith("/api/apps")) {
259const result = await sqlite.execute(`SELECT * FROM ${KEY}_apps`);
260return new Response(JSON.stringify({ apps: result.rows }), {
262});
263}
264// POST /api/apps => create new app
265else if (request.method === "POST" && request.url.endsWith("/api/apps")) {
266const app = await request.json();
267const id = crypto.randomUUID();
274});
275}
276// PUT /api/apps => update existing app
277else if (request.method === "PUT" && request.url.endsWith("/api/apps")) {
278const app = await request.json();
279await sqlite.execute(
285});
286}
287// DELETE /api/apps/:id => delete an app
288else if (request.method === "DELETE" && /\/api\/apps\/[^/]+$/.test(request.url)) {
289const segments = request.url.split("/");
290const id = segments[segments.length - 1];
294});
295}
296// POST /api/apps/import => bulk import (skip duplicates by name)
297else if (request.method === "POST" && request.url.endsWith("/api/apps/import")) {
298const { apps } = await request.json();
299const existing = await sqlite.execute(`SELECT name FROM ${KEY}_apps`);
575// Get all apps, build categories
576const loadApps = async () => {
577const response = await fetch("/api/apps");
578const data = await response.json();
579setApps(data.apps);
603const handleSave = async (updatedApp: App) => {
604const method = updatedApp.id ? "PUT" : "POST";
605await fetch("/api/apps", {
606method,
607headers: { "Content-Type": "application/json" },
614const handleDelete = async (id: string) => {
615if (!window.confirm("Are you sure you want to delete this app?")) return;
616const resp = await fetch(`/api/apps/${id}`, { method: "DELETE" });
617if (resp.ok) {
618await loadApps();
631// Export
632const handleExportApps = async () => {
633const response = await fetch("/api/apps");
634const data = await response.json();
635const jsonStr = JSON.stringify(data.apps, null, 2);
652const text = await file.text();
653const importedApps = JSON.parse(text);
654await fetch("/api/apps/import", {
655method: "POST",
656headers: { "Content-Type": "application/json" },