klaudius 0.24.3 → 0.26.0
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/dist/WizardApp-YTYZG4A5.js +2 -0
- package/dist/bin.js +51 -47
- package/dist/chunk-ABFQ7C7Q.js +505 -0
- package/package.json +1 -1
- package/dist/WizardApp-HWWSHTCK.js +0 -396
- package/dist/chunk-R2LC3ZRY.js +0 -61
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
import{appendFileSync as O}from"fs";import{tmpdir as ne}from"os";import{join as te}from"path";var I=te(ne(),"klaudius-wizard-debug.log"),oe=process.env.KLAUDIUS_WIZARD_DEBUG==="1",M=!1;function w(e,a){if(oe)try{M||(M=!0,O(I,`
|
|
2
|
+
=== klaudius wizard debug session \u2014 ${new Date().toISOString()} ===
|
|
3
|
+
node ${process.version}, platform ${process.platform}, tty=${process.stdin.isTTY}
|
|
4
|
+
`));let n=`${Date.now()} `,t=a===void 0?"":" "+JSON.stringify(a,null,0).slice(0,400);O(I,n+e+t+`
|
|
5
|
+
`)}catch{}}var H=I,N=!1;function K(){if(N)return;N=!0;let e=process.exit.bind(process);process.exit=(a=>{let n=new Error("process.exit called").stack??"(no stack)";return w("process.exit called",{code:a,stack:n.split(`
|
|
6
|
+
`).slice(0,8).join(" | ")}),e(a)})}function qe(e){if(!e)return;let a=e.toLowerCase();for(let[n,t]of Object.entries(k))if(t.smtpHost===a||t.altHostSets?.some(i=>i.smtpHost===a))return n}function Ze(e,a,n){if(e==="custom")return[];if(!Object.hasOwn(k,e))return[];let t=k[e];return[{label:`standard ${t.label}`,smtpHost:t.smtpHost,imapHost:t.imapHost},...t.altHostSets??[]].filter(o=>!(o.smtpHost===a&&o.imapHost===n))}var k={gmail:{label:"Gmail",smtpHost:"smtp.gmail.com",smtpPort:587,imapHost:"imap.gmail.com",imapPort:993,sentFolder:"[Gmail]/Sent Mail",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://myaccount.google.com/apppasswords
|
|
7
|
+
(2-step verification must be enabled on your Google account first;
|
|
8
|
+
Google won't accept your normal account password from third-party apps).`},outlook:{label:"Outlook / Microsoft 365",smtpHost:"smtp-mail.outlook.com",smtpPort:587,imapHost:"outlook.office365.com",imapPort:993,sentFolder:"Sent Items",inboxFolder:"INBOX",oauthOnly:!0,appPasswordHelp:`Outlook / Microsoft 365 mailboxes don't use passwords with Klaudius \u2014
|
|
9
|
+
Microsoft retired app-password access. Connect with the one-time
|
|
10
|
+
browser sign-in instead: python3 scripts/ms_oauth.py login`},ionos:{label:"IONOS",smtpHost:"smtp.ionos.co.uk",smtpPort:587,imapHost:"imap.ionos.co.uk",imapPort:993,sentFolder:"Sent Items",inboxFolder:"INBOX",usesAccountPassword:!0,appPasswordHelp:`Use your normal IONOS mailbox password.
|
|
11
|
+
(IONOS doesn't require app passwords for IMAP/SMTP unless you've enabled 2FA \u2014
|
|
12
|
+
with 2FA on, generate an app password in IONOS account security settings and
|
|
13
|
+
use that here instead.)`,serverHelp:`IONOS runs country-specific mail servers. The standard servers here
|
|
14
|
+
are for IONOS UK (smtp.ionos.co.uk). If you signed up with IONOS in
|
|
15
|
+
another country, your servers use that country's domain instead \u2014
|
|
16
|
+
e.g. smtp.ionos.de (Germany) or smtp.ionos.com (US/international).
|
|
17
|
+
Not sure? Pick the standard servers \u2014 if they reject your login,
|
|
18
|
+
setup automatically tries the other regions for you.`,altHostSets:[{label:"IONOS Germany",smtpHost:"smtp.ionos.de",imapHost:"imap.ionos.de"},{label:"IONOS US / international",smtpHost:"smtp.ionos.com",imapHost:"imap.ionos.com"}],noAltWorkedHint:`None of IONOS's regional servers (.co.uk / .de / .com) accepted this login,
|
|
19
|
+
so the server isn't the problem \u2014 the mailbox password itself is likely
|
|
20
|
+
wrong (or 2FA is on, which means you need an app password instead).`},fastmail:{label:"Fastmail",smtpHost:"smtp.fastmail.com",smtpPort:587,imapHost:"imap.fastmail.com",imapPort:993,sentFolder:"Sent",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://app.fastmail.com/settings/security/integrations
|
|
21
|
+
(Fastmail requires app passwords for IMAP/SMTP regardless of 2FA setting.)`},zoho:{label:"Zoho Mail",smtpHost:"smtp.zoho.com",smtpPort:587,imapHost:"imap.zoho.com",imapPort:993,sentFolder:"Sent",inboxFolder:"INBOX",appPasswordHelp:`Generate at https://accounts.zoho.com/u/h#security/app_passwords
|
|
22
|
+
(Zoho requires app passwords for IMAP/SMTP \u2014 your normal account password won't work.)
|
|
23
|
+
|
|
24
|
+
Heads up: Zoho's FREE plan doesn't include IMAP/SMTP access for new
|
|
25
|
+
accounts \u2014 no password will work until you're on a paid plan (Mail
|
|
26
|
+
Lite is ~$1/month).`,serverHelp:`Zoho runs different mail servers depending on your account:
|
|
27
|
+
\u2022 WHERE you signed up \u2014 log in at zoho.com \u2192 .com servers,
|
|
28
|
+
zoho.eu (Europe) \u2192 .eu servers, zoho.in (India) \u2192 .in servers
|
|
29
|
+
\u2022 WHAT you pay for \u2014 paid accounts on your own domain use the
|
|
30
|
+
'pro' servers (smtppro.zoho.eu), personal/free use plain (smtp.zoho.eu)
|
|
31
|
+
Not sure? Pick the standard servers \u2014 if they reject your login,
|
|
32
|
+
setup automatically tries the other combinations for you.`,altHostSets:[{label:"Zoho Europe (personal)",smtpHost:"smtp.zoho.eu",imapHost:"imap.zoho.eu"},{label:"Zoho US (paid, own domain)",smtpHost:"smtppro.zoho.com",imapHost:"imappro.zoho.com"},{label:"Zoho Europe (paid, own domain)",smtpHost:"smtppro.zoho.eu",imapHost:"imappro.zoho.eu"},{label:"Zoho India (personal)",smtpHost:"smtp.zoho.in",imapHost:"imap.zoho.in"},{label:"Zoho India (paid, own domain)",smtpHost:"smtppro.zoho.in",imapHost:"imappro.zoho.in"}],noAltWorkedHint:`None of Zoho's servers (US / Europe / India, personal + paid) accepted this
|
|
33
|
+
login, so the server isn't the problem. Two likely causes:
|
|
34
|
+
\u2022 The app password itself is wrong \u2014 generate a fresh one at
|
|
35
|
+
https://accounts.zoho.com/u/h#security/app_passwords
|
|
36
|
+
\u2022 Your Zoho account is on the FREE plan, which doesn't include
|
|
37
|
+
IMAP/SMTP access \u2014 upgrading to Mail Lite (~$1/month) unlocks it.`},titan:{label:"Titan",smtpHost:"smtp.titan.email",smtpPort:465,imapHost:"imap.titan.email",imapPort:993,sentFolder:"Sent",inboxFolder:"INBOX",usesAccountPassword:!0,appPasswordHelp:`Use your normal Titan mailbox password \u2014 the one you use for Titan
|
|
38
|
+
webmail. Titan has NO app-password mechanism, so don't go hunting
|
|
39
|
+
for one. Two settings must be right first, or the login is rejected
|
|
40
|
+
with what looks like a password error:
|
|
41
|
+
\u2022 Titan webmail \u2192 Settings \u2192 "Enable Titan on Other Apps" must be
|
|
42
|
+
turned ON (it's off by default).
|
|
43
|
+
\u2022 Two-Factor Authentication must be turned OFF \u2014 Titan blocks all
|
|
44
|
+
third-party access while 2FA is enabled.`,serverHelp:`Titan runs two sets of mail servers depending on which region your
|
|
45
|
+
mailbox is hosted in. The standard servers here (smtp.titan.email)
|
|
46
|
+
cover most accounts, but EU-hosted mailboxes (common when the
|
|
47
|
+
registrar is European, e.g. 123 Reg) use smtp0101.titan.email
|
|
48
|
+
instead. The "Enable Titan on Other Apps" screen in Titan webmail
|
|
49
|
+
shows your account's exact servers.
|
|
50
|
+
Not sure? Pick the standard servers \u2014 if they reject your login,
|
|
51
|
+
setup automatically tries the EU servers for you.`,altHostSets:[{label:"Titan EU-hosted",smtpHost:"smtp0101.titan.email",imapHost:"imap0101.titan.email"}],noAltWorkedHint:`Neither of Titan's server sets (standard / EU-hosted) accepted this
|
|
52
|
+
login, so the server isn't the problem. In Titan webmail, check:
|
|
53
|
+
\u2022 Settings \u2192 "Enable Titan on Other Apps" is turned ON
|
|
54
|
+
\u2022 Two-Factor Authentication is turned OFF (Titan blocks third-party
|
|
55
|
+
access entirely while 2FA is on)
|
|
56
|
+
\u2022 The password is your normal Titan mailbox password (there are no
|
|
57
|
+
app passwords on Titan).`}},L=`Check your provider's security settings for what SMTP/IMAP expects:
|
|
58
|
+
many providers require a generated app-specific password, while some
|
|
59
|
+
(e.g. IONOS, Titan) just use your normal mailbox password. If your
|
|
60
|
+
provider offers app passwords, prefer one \u2014 it's revocable on its own
|
|
61
|
+
and doesn't expose your account login.`;import se from"react";import{render as ie}from"ink";var re=new Set(["claude-pro","codex-plus"]);function F(e){return e&&re.has(e)?"off":"on"}var ea={"claude-pro":"Claude Pro","claude-max-5x":"Claude Max 5x","claude-max-20x":"Claude Max 20x","claude-other":"Claude (Team, Enterprise or API key)","codex-plus":"ChatGPT Plus","codex-pro":"ChatGPT Pro","codex-other":"ChatGPT (Business, Enterprise or API key)"};async function aa(e={},a={}){if(!process.stdin.isTTY)throw new Error("Klaudius's interactive wizard requires a terminal (TTY). Run `npx klaudius@latest init` directly from your terminal \u2014 not through a pipe, file redirect, or non-interactive shell context.");let{WizardApp:n}=await import("./WizardApp-YTYZG4A5.js"),t=null;w("runWizard:start",{onlySection:a.onlySection,hasDefaults:Object.keys(e).length>0}),K(),await new Promise(o=>setImmediate(o)),await new Promise(o=>setTimeout(o,0)),w("runWizard:event loop drained, mounting Ink");let i=ie(se.createElement(n,{defaults:e,onlySection:a.onlySection,banner:a.banner,onComplete:o=>{w("runWizard:onComplete called",{keys:Object.keys(o).length}),t=o}}),{stdout:process.stdout,stderr:process.stderr,stdin:process.stdin,exitOnCtrlC:!1});if(w("runWizard:render returned, awaiting exit"),await i.waitUntilExit(),w("runWizard:waitUntilExit resolved",{resultIsNull:t===null}),!t)throw new Error(`Wizard exited without completing. Diagnostic log: ${H}
|
|
62
|
+
Please share that file so we can trace what happened.`);return t}function S(e){if(!(e instanceof Error))return String(e);let a=e.cause;if(!a||!(a instanceof Error))return e.message;let n=a.code,t=a.message;return n&&t&&t!==n?`${e.message} (${n}: ${t})`:n?`${e.message} (${n})`:t?`${e.message} (${t})`:e.message}async function R(e){let a;try{let o=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/getUpdates`);if(a=await o.json(),!a.ok){let s=a.description??`HTTP ${o.status}`;return/webhook/i.test(s)?{ok:!1,reason:"webhook_set",message:"This bot has a webhook set, so getUpdates is unavailable. Auto-detect can't run; you'll need to paste the chat ID manually."}:{ok:!1,reason:"bad_token",message:`Telegram rejected the bot token: ${s}. Double-check the token from @BotFather.`}}}catch(o){return{ok:!1,reason:"network",message:`Could not reach Telegram: ${S(o)}`}}let n=a.result??[];if(n.length===0)return{ok:!1,reason:"no_messages",message:"No messages yet. Send your bot a regular text message in Telegram, then retry."};let t=n[n.length-1],i=t?.message?.chat?.id??t?.edited_message?.chat?.id??t?.channel_post?.chat?.id;return i===void 0?{ok:!1,reason:"no_messages",message:"Got an update from Telegram but couldn't find a chat ID in it. Send another text message and retry."}:{ok:!0,chatId:String(i)}}async function le(e){try{let a=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/getMe`),n=await a.json();return n.ok?{ok:!0,botHandle:n.result?.username?`@${n.result.username}`:n.result?.first_name}:{ok:!1,failedAt:"token",message:`Telegram rejected the bot token: ${n.description??`HTTP ${a.status}`}. Generate a new token by messaging @BotFather \u2192 /mytoken or /newbot.`}}catch(a){return{ok:!1,failedAt:"token",message:`Could not reach Telegram: ${S(a)}`}}}async function sa(e){let a=await le({botToken:e.botToken});if(!a.ok)return a;let n=a.botHandle;try{let t=await fetch(`https://api.telegram.org/bot${encodeURIComponent(e.botToken)}/sendMessage`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat_id:e.chatId,text:"\u2713 Klaudius connected. You'll get a notification here whenever outreach lands or a candidate replies. (You can ignore this setup message.)",disable_notification:!0})}),i=await t.json();if(!i.ok){let o=i.description??`HTTP ${t.status}`,s="";return/chat not found/i.test(o)?s=" The chat_id is wrong, or the bot hasn't been added to that chat yet. If it's a group, you must add the bot to the group first; then send /start to it.":(/bot was blocked/i.test(o)||/forbidden/i.test(o))&&(s=" The bot has been blocked by the chat, or never received a /start. Open Telegram, find your bot, and send /start to wake it up."),{ok:!1,failedAt:"chat",botHandle:n,message:`Telegram delivered the bot token check but couldn't send to chat_id ${e.chatId}: ${o}.${s}`}}}catch(t){return{ok:!1,failedAt:"chat",botHandle:n,message:`Could not reach Telegram for chat_id check: ${S(t)}`}}return{ok:!0,botHandle:n}}function U(e){let a=e.trim();if(a.length===0)return"Required \u2014 without this Klaudius can't deploy generated sites";if(a.startsWith("http://")||a.startsWith("https://"))return"This is the SSH/rsync destination, not a URL \u2014 e.g. deploy@yourvps:/var/www/klaudius-sites";if(/^[A-Za-z]:[\\/]/.test(a))return"That's a local Windows path \u2014 the target must be a remote rsync destination like user@host:/path";if(!/^[^\s:]+:\/?.+/.test(a))return"Should look like user@host:/path (an rsync-over-SSH destination)"}function G(e){let a=e.trim();if(a.length===0)return"Required \u2014 outreach links every pitch to the live site URL";if(!/^https?:\/\//.test(a))return"Must start with https:// (or http://)";if(!a.includes("{slug}"))return"Must contain {slug} \u2014 it's replaced with each client's slug";if(!(a.replace(/^https?:\/\//,"").split("/")[0]??"").includes("{slug}"))return"{slug} must be in the hostname (e.g. https://{slug}.sites.example.com) \u2014 a path like /sites/{slug} breaks static-export asset links"}var ue=[{country:"the United Kingdom",code:"GB",language:"English",langCode:"en",aliases:["uk","united kingdom","great britain","britain","england","scotland","wales","northern ireland"]},{country:"Ireland",code:"IE",language:"English",langCode:"en"},{country:"France",code:"FR",language:"French",langCode:"fr"},{country:"Germany",code:"DE",language:"German",langCode:"de",aliases:["deutschland"]},{country:"Austria",code:"AT",language:"German",langCode:"de",aliases:["\xF6sterreich","osterreich"]},{country:"Switzerland",code:"CH",language:"German",langCode:"de",aliases:["schweiz","suisse","svizzera"]},{country:"Liechtenstein",code:"LI",language:"German",langCode:"de"},{country:"Luxembourg",code:"LU",language:"French",langCode:"fr",aliases:["l\xEBtzebuerg"]},{country:"the Netherlands",code:"NL",language:"Dutch",langCode:"nl",aliases:["netherlands","holland","nederland"]},{country:"Belgium",code:"BE",language:"Dutch",langCode:"nl",aliases:["belgi\xEB","belgique"]},{country:"Monaco",code:"MC",language:"French",langCode:"fr"},{country:"Andorra",code:"AD",language:"Catalan",langCode:"ca"},{country:"Italy",code:"IT",language:"Italian",langCode:"it",aliases:["italia"]},{country:"Spain",code:"ES",language:"Spanish",langCode:"es",aliases:["espa\xF1a","espana"]},{country:"Portugal",code:"PT",language:"Portuguese",langCode:"pt"},{country:"Malta",code:"MT",language:"English",langCode:"en"},{country:"San Marino",code:"SM",language:"Italian",langCode:"it"},{country:"Vatican City",code:"VA",language:"Italian",langCode:"it",aliases:["the vatican","holy see"]},{country:"Sweden",code:"SE",language:"Swedish",langCode:"sv",aliases:["sverige"]},{country:"Norway",code:"NO",language:"Norwegian",langCode:"no",aliases:["norge"]},{country:"Denmark",code:"DK",language:"Danish",langCode:"da",aliases:["danmark"]},{country:"Finland",code:"FI",language:"Finnish",langCode:"fi",aliases:["suomi"]},{country:"Iceland",code:"IS",language:"Icelandic",langCode:"is",aliases:["\xEDsland"]},{country:"Poland",code:"PL",language:"Polish",langCode:"pl",aliases:["polska"]},{country:"Czech Republic",code:"CZ",language:"Czech",langCode:"cs",aliases:["czechia","\u010Desko"]},{country:"Slovakia",code:"SK",language:"Slovak",langCode:"sk",aliases:["slovensko"]},{country:"Hungary",code:"HU",language:"Hungarian",langCode:"hu",aliases:["magyarorsz\xE1g"]},{country:"Slovenia",code:"SI",language:"Slovenian",langCode:"sl",aliases:["slovenija"]},{country:"Croatia",code:"HR",language:"Croatian",langCode:"hr",aliases:["hrvatska"]},{country:"Bosnia and Herzegovina",code:"BA",language:"Bosnian",langCode:"bs",aliases:["bosnia"]},{country:"Serbia",code:"RS",language:"Serbian",langCode:"sr",aliases:["srbija"]},{country:"Montenegro",code:"ME",language:"Montenegrin",langCode:"sr",aliases:["crna gora"]},{country:"Kosovo",code:"XK",language:"Albanian",langCode:"sq"},{country:"North Macedonia",code:"MK",language:"Macedonian",langCode:"mk",aliases:["macedonia"]},{country:"Albania",code:"AL",language:"Albanian",langCode:"sq",aliases:["shqip\xEBria"]},{country:"Bulgaria",code:"BG",language:"Bulgarian",langCode:"bg"},{country:"Romania",code:"RO",language:"Romanian",langCode:"ro",aliases:["rom\xE2nia"]},{country:"Moldova",code:"MD",language:"Romanian",langCode:"ro"},{country:"Greece",code:"GR",language:"Greek",langCode:"el",aliases:["\u03B5\u03BB\u03BB\u03AC\u03B4\u03B1"]},{country:"Cyprus",code:"CY",language:"Greek",langCode:"el"},{country:"Russia",code:"RU",language:"Russian",langCode:"ru",aliases:["\u0440\u043E\u0441\u0441\u0438\u044F"]},{country:"Ukraine",code:"UA",language:"Ukrainian",langCode:"uk",aliases:["\u0443\u043A\u0440\u0430\u0457\u043D\u0430"]},{country:"Belarus",code:"BY",language:"Belarusian",langCode:"be"},{country:"Estonia",code:"EE",language:"Estonian",langCode:"et",aliases:["eesti"]},{country:"Latvia",code:"LV",language:"Latvian",langCode:"lv",aliases:["latvija"]},{country:"Lithuania",code:"LT",language:"Lithuanian",langCode:"lt",aliases:["lietuva"]},{country:"Turkey",code:"TR",language:"Turkish",langCode:"tr",aliases:["t\xFCrkiye","turkiye"]},{country:"Armenia",code:"AM",language:"Armenian",langCode:"hy"},{country:"Azerbaijan",code:"AZ",language:"Azerbaijani",langCode:"az",aliases:["az\u0259rbaycan"]},{country:"Georgia",code:"GE",language:"Georgian",langCode:"ka",aliases:["\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD"]},{country:"Israel",code:"IL",language:"Hebrew",langCode:"he"},{country:"Palestine",code:"PS",language:"Arabic",langCode:"ar"},{country:"Lebanon",code:"LB",language:"Arabic",langCode:"ar"},{country:"Syria",code:"SY",language:"Arabic",langCode:"ar"},{country:"Jordan",code:"JO",language:"Arabic",langCode:"ar"},{country:"Iraq",code:"IQ",language:"Arabic",langCode:"ar"},{country:"Iran",code:"IR",language:"Persian",langCode:"fa",aliases:["islamic republic of iran"]},{country:"Saudi Arabia",code:"SA",language:"Arabic",langCode:"ar"},{country:"Yemen",code:"YE",language:"Arabic",langCode:"ar"},{country:"Oman",code:"OM",language:"Arabic",langCode:"ar"},{country:"the United Arab Emirates",code:"AE",language:"English",langCode:"en",aliases:["uae","united arab emirates","dubai","abu dhabi"]},{country:"Qatar",code:"QA",language:"Arabic",langCode:"ar"},{country:"Bahrain",code:"BH",language:"Arabic",langCode:"ar"},{country:"Kuwait",code:"KW",language:"Arabic",langCode:"ar"},{country:"Kazakhstan",code:"KZ",language:"Kazakh",langCode:"kk"},{country:"Uzbekistan",code:"UZ",language:"Uzbek",langCode:"uz"},{country:"Kyrgyzstan",code:"KG",language:"Kyrgyz",langCode:"ky"},{country:"Turkmenistan",code:"TM",language:"Turkmen",langCode:"tk"},{country:"Tajikistan",code:"TJ",language:"Tajik",langCode:"tg"},{country:"Afghanistan",code:"AF",language:"Persian",langCode:"fa"},{country:"India",code:"IN",language:"English",langCode:"en"},{country:"Pakistan",code:"PK",language:"English",langCode:"en"},{country:"Bangladesh",code:"BD",language:"Bengali",langCode:"bn"},{country:"Sri Lanka",code:"LK",language:"English",langCode:"en"},{country:"Nepal",code:"NP",language:"Nepali",langCode:"ne"},{country:"Bhutan",code:"BT",language:"English",langCode:"en"},{country:"the Maldives",code:"MV",language:"English",langCode:"en",aliases:["maldives"]},{country:"China",code:"CN",language:"Chinese",langCode:"zh",aliases:["\u4E2D\u56FD","people's republic of china","prc"]},{country:"Hong Kong",code:"HK",language:"English",langCode:"en",aliases:["hk"]},{country:"Macao",code:"MO",language:"Chinese",langCode:"zh",aliases:["macau"]},{country:"Taiwan",code:"TW",language:"Chinese",langCode:"zh",aliases:["\u53F0\u7063","republic of china"]},{country:"Japan",code:"JP",language:"Japanese",langCode:"ja",aliases:["\u65E5\u672C"]},{country:"South Korea",code:"KR",language:"Korean",langCode:"ko",aliases:["korea","republic of korea"]},{country:"North Korea",code:"KP",language:"Korean",langCode:"ko",aliases:["dprk"]},{country:"Mongolia",code:"MN",language:"Mongolian",langCode:"mn"},{country:"Thailand",code:"TH",language:"Thai",langCode:"th"},{country:"Vietnam",code:"VN",language:"Vietnamese",langCode:"vi",aliases:["viet nam"]},{country:"Cambodia",code:"KH",language:"Khmer",langCode:"km"},{country:"Laos",code:"LA",language:"Lao",langCode:"lo"},{country:"Myanmar",code:"MM",language:"Burmese",langCode:"my",aliases:["burma"]},{country:"Malaysia",code:"MY",language:"Malay",langCode:"ms"},{country:"Singapore",code:"SG",language:"English",langCode:"en"},{country:"Brunei",code:"BN",language:"Malay",langCode:"ms",aliases:["brunei darussalam"]},{country:"Indonesia",code:"ID",language:"Indonesian",langCode:"id"},{country:"the Philippines",code:"PH",language:"English",langCode:"en",aliases:["philippines"]},{country:"Timor-Leste",code:"TL",language:"Portuguese",langCode:"pt",aliases:["east timor"]},{country:"the United States",code:"US",language:"English",langCode:"en",aliases:["us","usa","united states","united states of america","america","states"]},{country:"Canada",code:"CA",language:"English",langCode:"en"},{country:"Mexico",code:"MX",language:"Spanish",langCode:"es",aliases:["m\xE9xico"]},{country:"Guatemala",code:"GT",language:"Spanish",langCode:"es"},{country:"Belize",code:"BZ",language:"English",langCode:"en"},{country:"El Salvador",code:"SV",language:"Spanish",langCode:"es"},{country:"Honduras",code:"HN",language:"Spanish",langCode:"es"},{country:"Nicaragua",code:"NI",language:"Spanish",langCode:"es"},{country:"Costa Rica",code:"CR",language:"Spanish",langCode:"es"},{country:"Panama",code:"PA",language:"Spanish",langCode:"es",aliases:["panam\xE1"]},{country:"Cuba",code:"CU",language:"Spanish",langCode:"es"},{country:"the Dominican Republic",code:"DO",language:"Spanish",langCode:"es",aliases:["dominican republic"]},{country:"Haiti",code:"HT",language:"French",langCode:"fr"},{country:"Jamaica",code:"JM",language:"English",langCode:"en"},{country:"the Bahamas",code:"BS",language:"English",langCode:"en",aliases:["bahamas"]},{country:"Trinidad and Tobago",code:"TT",language:"English",langCode:"en"},{country:"Barbados",code:"BB",language:"English",langCode:"en"},{country:"Saint Lucia",code:"LC",language:"English",langCode:"en"},{country:"Saint Vincent and the Grenadines",code:"VC",language:"English",langCode:"en"},{country:"Grenada",code:"GD",language:"English",langCode:"en"},{country:"Dominica",code:"DM",language:"English",langCode:"en"},{country:"Saint Kitts and Nevis",code:"KN",language:"English",langCode:"en"},{country:"Antigua and Barbuda",code:"AG",language:"English",langCode:"en"},{country:"Puerto Rico",code:"PR",language:"Spanish",langCode:"es"},{country:"Brazil",code:"BR",language:"Portuguese",langCode:"pt",aliases:["brasil"]},{country:"Argentina",code:"AR",language:"Spanish",langCode:"es"},{country:"Colombia",code:"CO",language:"Spanish",langCode:"es"},{country:"Chile",code:"CL",language:"Spanish",langCode:"es"},{country:"Peru",code:"PE",language:"Spanish",langCode:"es",aliases:["per\xFA"]},{country:"Venezuela",code:"VE",language:"Spanish",langCode:"es"},{country:"Ecuador",code:"EC",language:"Spanish",langCode:"es"},{country:"Bolivia",code:"BO",language:"Spanish",langCode:"es"},{country:"Paraguay",code:"PY",language:"Spanish",langCode:"es"},{country:"Uruguay",code:"UY",language:"Spanish",langCode:"es"},{country:"Guyana",code:"GY",language:"English",langCode:"en"},{country:"Suriname",code:"SR",language:"Dutch",langCode:"nl"},{country:"Australia",code:"AU",language:"English",langCode:"en",aliases:["aus","oz"]},{country:"New Zealand",code:"NZ",language:"English",langCode:"en",aliases:["nz","aotearoa"]},{country:"Fiji",code:"FJ",language:"English",langCode:"en"},{country:"Papua New Guinea",code:"PG",language:"English",langCode:"en",aliases:["png"]},{country:"Samoa",code:"WS",language:"English",langCode:"en"},{country:"Tonga",code:"TO",language:"English",langCode:"en"},{country:"Vanuatu",code:"VU",language:"English",langCode:"en"},{country:"Solomon Islands",code:"SB",language:"English",langCode:"en"},{country:"Kiribati",code:"KI",language:"English",langCode:"en"},{country:"Tuvalu",code:"TV",language:"English",langCode:"en"},{country:"Nauru",code:"NR",language:"English",langCode:"en"},{country:"Palau",code:"PW",language:"English",langCode:"en"},{country:"the Marshall Islands",code:"MH",language:"English",langCode:"en",aliases:["marshall islands"]},{country:"Micronesia",code:"FM",language:"English",langCode:"en",aliases:["federated states of micronesia"]},{country:"Egypt",code:"EG",language:"Arabic",langCode:"ar"},{country:"Libya",code:"LY",language:"Arabic",langCode:"ar"},{country:"Tunisia",code:"TN",language:"Arabic",langCode:"ar"},{country:"Algeria",code:"DZ",language:"Arabic",langCode:"ar"},{country:"Morocco",code:"MA",language:"Arabic",langCode:"ar",aliases:["maroc"]},{country:"Sudan",code:"SD",language:"Arabic",langCode:"ar"},{country:"South Sudan",code:"SS",language:"English",langCode:"en"},{country:"Mauritania",code:"MR",language:"Arabic",langCode:"ar"},{country:"Nigeria",code:"NG",language:"English",langCode:"en"},{country:"Ghana",code:"GH",language:"English",langCode:"en"},{country:"Senegal",code:"SN",language:"French",langCode:"fr",aliases:["s\xE9n\xE9gal"]},{country:"C\xF4te d'Ivoire",code:"CI",language:"French",langCode:"fr",aliases:["ivory coast"]},{country:"Mali",code:"ML",language:"French",langCode:"fr"},{country:"Burkina Faso",code:"BF",language:"French",langCode:"fr"},{country:"Niger",code:"NE",language:"French",langCode:"fr"},{country:"Guinea",code:"GN",language:"French",langCode:"fr",aliases:["guin\xE9e"]},{country:"Guinea-Bissau",code:"GW",language:"Portuguese",langCode:"pt"},{country:"Sierra Leone",code:"SL",language:"English",langCode:"en"},{country:"Liberia",code:"LR",language:"English",langCode:"en"},{country:"the Gambia",code:"GM",language:"English",langCode:"en",aliases:["gambia"]},{country:"Cabo Verde",code:"CV",language:"Portuguese",langCode:"pt",aliases:["cape verde"]},{country:"Togo",code:"TG",language:"French",langCode:"fr"},{country:"Benin",code:"BJ",language:"French",langCode:"fr",aliases:["b\xE9nin"]},{country:"Cameroon",code:"CM",language:"French",langCode:"fr",aliases:["cameroun"]},{country:"the Central African Republic",code:"CF",language:"French",langCode:"fr",aliases:["central african republic","car"]},{country:"Chad",code:"TD",language:"French",langCode:"fr",aliases:["tchad"]},{country:"Equatorial Guinea",code:"GQ",language:"Spanish",langCode:"es"},{country:"Gabon",code:"GA",language:"French",langCode:"fr"},{country:"the Republic of the Congo",code:"CG",language:"French",langCode:"fr",aliases:["congo","republic of the congo","congo-brazzaville"]},{country:"the Democratic Republic of the Congo",code:"CD",language:"French",langCode:"fr",aliases:["dr congo","drc","democratic republic of the congo","congo-kinshasa","zaire"]},{country:"S\xE3o Tom\xE9 and Pr\xEDncipe",code:"ST",language:"Portuguese",langCode:"pt",aliases:["sao tome and principe","sao tome"]},{country:"Ethiopia",code:"ET",language:"Amharic",langCode:"am"},{country:"Eritrea",code:"ER",language:"Tigrinya",langCode:"ti"},{country:"Djibouti",code:"DJ",language:"French",langCode:"fr"},{country:"Somalia",code:"SO",language:"Somali",langCode:"so"},{country:"Kenya",code:"KE",language:"English",langCode:"en"},{country:"Uganda",code:"UG",language:"English",langCode:"en"},{country:"Tanzania",code:"TZ",language:"English",langCode:"en",aliases:["united republic of tanzania"]},{country:"Rwanda",code:"RW",language:"English",langCode:"en"},{country:"Burundi",code:"BI",language:"French",langCode:"fr"},{country:"Madagascar",code:"MG",language:"French",langCode:"fr"},{country:"Mauritius",code:"MU",language:"English",langCode:"en"},{country:"the Seychelles",code:"SC",language:"English",langCode:"en",aliases:["seychelles"]},{country:"Comoros",code:"KM",language:"French",langCode:"fr"},{country:"South Africa",code:"ZA",language:"English",langCode:"en",aliases:["sa"]},{country:"Namibia",code:"NA",language:"English",langCode:"en"},{country:"Botswana",code:"BW",language:"English",langCode:"en"},{country:"Zimbabwe",code:"ZW",language:"English",langCode:"en"},{country:"Zambia",code:"ZM",language:"English",langCode:"en"},{country:"Malawi",code:"MW",language:"English",langCode:"en"},{country:"Mozambique",code:"MZ",language:"Portuguese",langCode:"pt",aliases:["mo\xE7ambique"]},{country:"Angola",code:"AO",language:"Portuguese",langCode:"pt"},{country:"Lesotho",code:"LS",language:"English",langCode:"en"},{country:"Eswatini",code:"SZ",language:"English",langCode:"en",aliases:["swaziland"]}],de=[{language:"English",code:"en"},{language:"Italian",code:"it",aliases:["italiano"]},{language:"Spanish",code:"es",aliases:["espa\xF1ol","espanol","castellano"]},{language:"French",code:"fr",aliases:["fran\xE7ais","francais"]},{language:"German",code:"de",aliases:["deutsch"]},{language:"Portuguese",code:"pt",aliases:["portugu\xEAs","portugues"]},{language:"Dutch",code:"nl",aliases:["nederlands","flemish"]},{language:"Swedish",code:"sv",aliases:["svenska"]},{language:"Norwegian",code:"no",aliases:["norsk"]},{language:"Danish",code:"da",aliases:["dansk"]},{language:"Icelandic",code:"is",aliases:["\xEDslenska"]},{language:"Catalan",code:"ca",aliases:["catal\xE0"]},{language:"Romanian",code:"ro",aliases:["rom\xE2n\u0103","romana"]},{language:"Polish",code:"pl",aliases:["polski"]},{language:"Czech",code:"cs",aliases:["\u010De\u0161tina","cestina"]},{language:"Slovak",code:"sk",aliases:["sloven\u010Dina"]},{language:"Slovenian",code:"sl",aliases:["sloven\u0161\u010Dina"]},{language:"Croatian",code:"hr",aliases:["hrvatski"]},{language:"Bosnian",code:"bs",aliases:["bosanski"]},{language:"Serbian",code:"sr",aliases:["\u0441\u0440\u043F\u0441\u043A\u0438"]},{language:"Montenegrin",code:"sr",aliases:["crnogorski"]},{language:"Macedonian",code:"mk",aliases:["\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438"]},{language:"Bulgarian",code:"bg",aliases:["\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"]},{language:"Russian",code:"ru",aliases:["\u0440\u0443\u0441\u0441\u043A\u0438\u0439"]},{language:"Ukrainian",code:"uk",aliases:["\u0443\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"]},{language:"Belarusian",code:"be",aliases:["\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F"]},{language:"Latvian",code:"lv",aliases:["latvie\u0161u"]},{language:"Lithuanian",code:"lt",aliases:["lietuvi\u0173"]},{language:"Greek",code:"el",aliases:["\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC","ellinik\xE1"]},{language:"Albanian",code:"sq",aliases:["shqip"]},{language:"Armenian",code:"hy",aliases:["\u0570\u0561\u0575\u0565\u0580\u0565\u0576"]},{language:"Persian",code:"fa",aliases:["farsi","dari","\u0641\u0627\u0631\u0633\u06CC"]},{language:"Hindi",code:"hi",aliases:["\u0939\u093F\u0928\u094D\u0926\u0940"]},{language:"Urdu",code:"ur",aliases:["\u0627\u0631\u062F\u0648"]},{language:"Bengali",code:"bn",aliases:["bangla","\u09AC\u09BE\u0982\u09B2\u09BE"]},{language:"Nepali",code:"ne",aliases:["\u0928\u0947\u092A\u093E\u0932\u0940"]},{language:"Sinhala",code:"si",aliases:["\u0DC3\u0DD2\u0D82\u0DC4\u0DBD","sinhalese"]},{language:"Finnish",code:"fi",aliases:["suomi"]},{language:"Estonian",code:"et",aliases:["eesti"]},{language:"Hungarian",code:"hu",aliases:["magyar"]},{language:"Turkish",code:"tr",aliases:["t\xFCrk\xE7e","turkce"]},{language:"Azerbaijani",code:"az",aliases:["az\u0259rbaycan dili","azeri"]},{language:"Kazakh",code:"kk",aliases:["\u049B\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"]},{language:"Uzbek",code:"uz",aliases:["o'zbek"]},{language:"Kyrgyz",code:"ky",aliases:["\u043A\u044B\u0440\u0433\u044B\u0437\u0447\u0430"]},{language:"Turkmen",code:"tk",aliases:["t\xFCrkmen\xE7e"]},{language:"Arabic",code:"ar",aliases:["\u0627\u0644\u0639\u0631\u0628\u064A\u0629"]},{language:"Hebrew",code:"he",aliases:["\u05E2\u05D1\u05E8\u05D9\u05EA","ivrit"]},{language:"Amharic",code:"am",aliases:["\u12A0\u121B\u122D\u129B"]},{language:"Tigrinya",code:"ti",aliases:["\u1275\u130D\u122D\u129B"]},{language:"Chinese",code:"zh",aliases:["mandarin","\u4E2D\u6587","\u6C49\u8BED","putonghua"]},{language:"Japanese",code:"ja",aliases:["\u65E5\u672C\u8A9E","nihongo"]},{language:"Korean",code:"ko",aliases:["\uD55C\uAD6D\uC5B4"]},{language:"Thai",code:"th",aliases:["\u0E44\u0E17\u0E22"]},{language:"Vietnamese",code:"vi",aliases:["ti\u1EBFng vi\u1EC7t"]},{language:"Khmer",code:"km",aliases:["\u1781\u17D2\u1798\u17C2\u179A","cambodian"]},{language:"Lao",code:"lo",aliases:["\u0EA5\u0EB2\u0EA7"]},{language:"Burmese",code:"my",aliases:["\u1019\u103C\u1014\u103A\u1019\u102C","myanmar"]},{language:"Dzongkha",code:"dz",aliases:["\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41"]},{language:"Mongolian",code:"mn",aliases:["\u043C\u043E\u043D\u0433\u043E\u043B"]},{language:"Georgian",code:"ka",aliases:["\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8"]},{language:"Tajik",code:"tg",aliases:["\u0442\u043E\u04B7\u0438\u043A\u04E3"]},{language:"Malay",code:"ms",aliases:["bahasa malaysia","bahasa melayu"]},{language:"Indonesian",code:"id",aliases:["bahasa indonesia"]},{language:"Filipino",code:"fil",aliases:["tagalog","pilipino"]},{language:"Swahili",code:"sw",aliases:["kiswahili"]},{language:"Somali",code:"so",aliases:["af soomaali"]},{language:"Yoruba",code:"yo",aliases:["yor\xF9b\xE1"]},{language:"Hausa",code:"ha",aliases:["harshen hausa"]},{language:"Zulu",code:"zu",aliases:["isizulu"]},{language:"Afrikaans",code:"af"}];function C(e){return e.trim().toLowerCase()}function _(e){if(!e)return;let a=C(e);for(let n of ue)if(C(n.country)===a||n.aliases?.some(t=>C(t)===a))return n}function z(e){if(!e)return;let a=C(e);for(let n of de)if(C(n.language)===a||n.aliases?.some(t=>C(t)===a))return n}var ce={\u0410:"A",\u0430:"a",\u0412:"B",\u0432:"b",\u0415:"E",\u0435:"e",\u041A:"K",\u043A:"k",\u041C:"M",\u043C:"m",\u041D:"H",\u043D:"h",\u041E:"O",\u043E:"o",\u0420:"P",\u0440:"p",\u0421:"C",\u0441:"c",\u0422:"T",\u0442:"t",\u0423:"Y",\u0443:"y",\u0425:"X",\u0445:"x",\u0406:"I",\u0456:"i",\u0405:"S",\u0455:"s",\u0408:"J",\u0458:"j",\u0417:"3",\u0437:"3",\u0427:"4",\u0431:"6",\u0391:"A",\u03B1:"a",\u0392:"B",\u03B2:"b",\u0395:"E",\u03B5:"e",\u0396:"Z",\u0397:"H",\u0399:"I",\u03B9:"i",\u039A:"K",\u03BA:"k",\u039C:"M",\u039D:"N",\u039F:"O",\u03BF:"o",\u03A1:"P",\u03C1:"p",\u03A4:"T",\u03C4:"t",\u03A5:"Y",\u03A7:"X",\u03C7:"x",\u03BD:"v","\u2010":"-","\u2011":"-","\u2012":"-","\u2013":"-","\u2014":"-","\u2015":"-","\u2212":"-","\uFF3F":"_"},ge=/[\u200B-\u200F\u202A-\u202E\u2060\uFEFF\u00AD]/g,he=/[\u0000-\u001F\u007F]/g;function T(e){let a=e.replace(ge,"").replace(he,"").trim();return{value:a,changed:a!==e,repairs:[],unrepairable:[]}}function B(e){let n=T(e).value.normalize("NFKC").replace(/\s+/g,"");n.length>=2&&(n[0]==='"'&&n.at(-1)==='"'||n[0]==="'"&&n.at(-1)==="'")&&(n=n.slice(1,-1).trim());let t=[],i=[],o="";for(let s of n){let d=s.codePointAt(0);if(d<128){o+=s;continue}let h=ce[s],l=o.length+1;h?(t.push(`position ${l}: '${s}' (${ye(d)}, U+${$(d)}) \u2192 '${h}'`),o+=h):(i.push({position:l,char:s,code:d}),o+=s)}return{value:o,changed:o!==e,repairs:t,unrepairable:i}}var pe=/^AIza[0-9A-Za-z_-]{35}$/;function me(e){return pe.test(e)}function D(e){let a=B(e);if(a.value.length===0)return"Required \u2014 without this Klaudius can't find candidates.";if(a.unrepairable.length>0){let n=a.unrepairable[0];return`Character ${n.position} of this key is '${n.char}' (U+${$(n.code)}), which isn't a character a Google key can contain. Copy the key with the copy button next to it in the Cloud Console \u2014 reading it off a screenshot or retyping it introduces look-alike characters.`}}function ua(e){let a=B(e).value;if(!me(a))return a.startsWith("AIza")?a.length!==39?`A Google API key is normally 39 characters \u2014 this one is ${a.length}. `+(a.length>39?"It looks like two keys ran together, so paste just the one key.":"It looks truncated, so copy it again with the copy button next to it in the Cloud Console."):"This key contains characters a Google key normally doesn't. Re-copy it with the copy button in the Cloud Console.":`A Google API key normally starts with "AIza" \u2014 this one starts with "${a.slice(0,4)}". Check you copied the API key itself (Cloud Console \u2192 Credentials), not a project ID or client ID.`}function $(e){return e.toString(16).toUpperCase().padStart(4,"0")}function ye(e){return e>=1024&&e<=1279?"Cyrillic":e>=880&&e<=1023?"Greek":"non-Latin"}var V=class extends Error{constructor(){super("user pressed back"),this.name="BackSignal"}},W=class extends Error{constructor(){super("user cancelled"),this.name="CancelSignal"}},fe="Include the country code with a + (e.g. +12025550123 for US, +447123456789 for UK)",j=e=>/^\+\d{8,15}$/.test(e)?void 0:fe,q=e=>/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(e)?void 0:"Enter a valid email",b=e=>a=>a.trim().length===0?`${e} is required`:void 0,be=/[\u2022\u2023\u2024\u2027\u00B7\u2219\u22C5\u25CF\u25CB\u25AA\u25AB\u204E\u2217\uFE61\u25E6\u2218]/,we="That looks like the masked \u2022\u2022\u2022\u2022\u2022 value your screen shows, not the token itself. Click the reveal/copy icon next to it and paste the real value (letters and numbers).",x=e=>be.test(e)?we:void 0;function Ce(e){if(/^eyJ/.test(e))try{let a=e.split(".")[1];if(!a)return;let n=JSON.parse(Buffer.from(a,"base64url").toString("utf8"));return typeof n.role=="string"?n.role:void 0}catch{return}}var E=e=>a=>x(a)??(a.trim().length===0?`${e} is required`:void 0),ke=e=>{let a=e.replace(/\s+/g,"");return a.length===0?"Personal access token is required":x(a)??(/^sbp_[A-Za-z0-9._~+\/=-]{20,}$/.test(a)?void 0:"Doesn't look like a valid token \u2014 it should be 'sbp_' followed by letters and numbers.")},Se="one-off, no monthly fees",Z="per month";function v(e){if(!e)return!0;let a=e.trim();if(a==="")return!0;let n=a.replace(/[^\d.]/g,"");if(n==="")return/^\s*free\s*$/i.test(a);let t=parseFloat(n);return!isNaN(t)&&t===0}var ve={id:"ai-agent",title:"AI coding agent",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>(n({title:"Which AI coding agent do you use?",body:`Klaudius works with two AI coding agents in your terminal \u2014 Claude Code
|
|
63
|
+
(Anthropic) or Codex (OpenAI). Pick whichever you already pay for.
|
|
64
|
+
|
|
65
|
+
This choice only changes which agent runs the pipeline. Everything else \u2014
|
|
66
|
+
the businesses found, the websites built, the outreach sent \u2014 is identical
|
|
67
|
+
either way. You can switch later by re-running init in a fresh folder.`}),{aiAgent:await a({type:"select",message:"Which AI coding agent will drive Klaudius?",initialValue:e.aiAgent??"claude-code",options:[{value:"claude-code",label:"Claude Code (Anthropic)"},{value:"codex",label:"Codex (OpenAI)"}]})})},Pe={id:"ai-plan",title:"Subscription plan",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>{let t=e.aiAgent==="codex",i=t?"Codex":"Claude Code",o=t?"ChatGPT":"Claude";n({title:`Which ${o} plan are you on?`,body:`Klaudius tunes the pipeline to your plan's usage limits.
|
|
68
|
+
|
|
69
|
+
`+(t?`ChatGPT Plus: QA pass off and the Terra model pinned, so each run fits
|
|
70
|
+
the plan's usage window. Pro and above: full pipeline, QA pass included.
|
|
71
|
+
|
|
72
|
+
`:`Claude Pro: QA pass off, so each run fits the plan's usage window.
|
|
73
|
+
Max and above: full pipeline, QA pass included.
|
|
74
|
+
|
|
75
|
+
`)+`Not locked in \u2014 QA_PHASE lives in .env; flip it any time,
|
|
76
|
+
or re-run configure if you change plan.`});let s=t?[{value:"codex-plus",label:"ChatGPT Plus (QA pass off, Terra model)"},{value:"codex-pro",label:"ChatGPT Pro (full pipeline)"},{value:"codex-other",label:"Other \u2014 Business, Enterprise or API key (full pipeline)"}]:[{value:"claude-pro",label:"Claude Pro (QA pass off)"},{value:"claude-max-5x",label:"Claude Max 5x (full pipeline)"},{value:"claude-max-20x",label:"Claude Max 20x (full pipeline)"},{value:"claude-other",label:"Other \u2014 Team, Enterprise or API key (full pipeline)"}],d=s.some(c=>c.value===e.aiPlan)?e.aiPlan:void 0,h=await a({type:"select",message:`Which ${o} plan will ${i} run on?`,initialValue:d??s[0].value,options:s}),r=h===e.aiPlan&&e.qaPhase!==void 0?e.qaPhase:F(h);return{aiPlan:h,qaPhase:r}}},Ae={id:"location",title:"Location & language",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Which country are you finding businesses in?",body:`Klaudius searches for businesses in this country, writes outreach in
|
|
77
|
+
this country's language, and builds sites in this country's language.
|
|
78
|
+
This is the country your customers are in \u2014 not necessarily where
|
|
79
|
+
you live.
|
|
80
|
+
|
|
81
|
+
Example: if you're based in Bulgaria but want to sell websites to UK
|
|
82
|
+
businesses, pick United Kingdom here.
|
|
83
|
+
|
|
84
|
+
You can run the pipeline against more than one country from the same
|
|
85
|
+
install (\`/find Barcelona\` from a UK install works fine), but
|
|
86
|
+
starting with one market makes it easier to learn that market's
|
|
87
|
+
outreach rhythm.`});let t="__other__",i=[{value:"the United Kingdom",label:"United Kingdom"},{value:"the United States",label:"United States"},{value:"Italy",label:"Italy"},{value:"Spain",label:"Spain"},{value:"France",label:"France"},{value:"Germany",label:"Germany"},{value:"Ireland",label:"Ireland"},{value:"the Netherlands",label:"Netherlands"},{value:"Belgium",label:"Belgium"},{value:"Portugal",label:"Portugal"},{value:"Switzerland",label:"Switzerland"},{value:"Austria",label:"Austria"},{value:"Canada",label:"Canada"},{value:"Australia",label:"Australia"},{value:"New Zealand",label:"New Zealand"},{value:"Mexico",label:"Mexico"},{value:"Brazil",label:"Brazil"},{value:"Sweden",label:"Sweden"},{value:"Poland",label:"Poland"},{value:t,label:"Other (type it in)"}],o=e.country??"",s=i.some(p=>p.value===o),h=await a({type:"select",message:"Which country's businesses will Klaudius search for?",initialValue:s?o:o?t:"the United Kingdom",options:i}),l;h===t?l=await a({type:"text",message:"Type the country name (any common form is fine)",placeholder:"e.g. South Africa, Greece, Brazil",initialValue:s?"":o,validate:p=>p.trim().length===0?"Country is required":void 0,note:{title:"Free-form country",body:`We'll match what you type against our country lookup (covers all
|
|
88
|
+
ISO 3166 sovereign states + common territories like Hong Kong and
|
|
89
|
+
Puerto Rico). If we don't recognise the name, we'll ask you to type
|
|
90
|
+
the 2-letter ISO country code directly on the next prompt \u2014 the
|
|
91
|
+
same code Google Places uses for region biasing. Aliases like 'uk',
|
|
92
|
+
'usa', 'italia', 'maroc' all match.`}}):l=h;let r=_(l),c;r?c=r.code:c=(await a({type:"text",message:`What's the 2-letter ISO country code for ${l}?`,placeholder:"e.g. ID for Indonesia, ZA for South Africa, JO for Jordan",initialValue:e.countryCode??"",validate:p=>{let f=p.trim().toUpperCase();if(!/^[A-Z]{2}$/.test(f))return"Must be exactly 2 letters (ISO 3166-1 alpha-2 format)"},note:{title:`ISO code for ${l}`,body:`We didn't recognise "${l}" in our country lookup, so we need the
|
|
93
|
+
2-letter ISO 3166-1 alpha-2 code directly. Google Places uses this
|
|
94
|
+
for region biasing on every search.
|
|
95
|
+
|
|
96
|
+
Full list: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
|
97
|
+
|
|
98
|
+
Quick reference for less common markets:
|
|
99
|
+
Indonesia \u2192 ID Vietnam \u2192 VN Thailand \u2192 TH Egypt \u2192 EG
|
|
100
|
+
Kenya \u2192 KE Nigeria \u2192 NG Pakistan \u2192 PK Iran \u2192 IR
|
|
101
|
+
Saudi Arabia \u2192 SA Russia \u2192 RU Ukraine \u2192 UA Israel \u2192 IL`}})).trim().toUpperCase();let m=e.language??r?.language??"English",u=await a({type:"text",message:"What language should outreach + websites be written in?",placeholder:"e.g. Italian, Spanish, English",initialValue:m,validate:p=>p.trim().length===0?"Language is required":void 0,note:{title:"Outreach + website language",body:r?`Defaulting to ${m} (the usual operator-facing language
|
|
102
|
+
for ${l}). Edit this if you'd rather write in something else \u2014
|
|
103
|
+
e.g. an English-speaking operator running on Spain might pick "Spanish"
|
|
104
|
+
to localise everything, or might pick "English" to keep their own voice.
|
|
105
|
+
Klaudius will use this language for every outreach message it sends and
|
|
106
|
+
every website it builds.`:`Pick the language you want every outreach message and every built
|
|
107
|
+
website to be written in. If we don't recognise the language name
|
|
108
|
+
we'll ask for the ISO language code on the next prompt.`}}),y=z(u),g;return y?g=y.code:g=(await a({type:"text",message:`What's the ISO language code for ${u}?`,placeholder:"e.g. id for Indonesian, sw for Swahili, fil for Filipino",initialValue:e.languageCode??"",validate:p=>{let f=p.trim().toLowerCase();if(!/^[a-z]{2,3}$/.test(f))return"Must be 2 or 3 lowercase letters (ISO 639-1 or BCP 47 code)"},note:{title:`ISO code for ${u}`,body:`We didn't recognise "${u}" in our language lookup, so we need
|
|
109
|
+
the ISO language code directly. Google Places uses this for response
|
|
110
|
+
language, and it becomes the <html lang="..."> value on every built
|
|
111
|
+
site.
|
|
112
|
+
|
|
113
|
+
Most languages have a 2-letter ISO 639-1 code. A few (Filipino \u2192
|
|
114
|
+
"fil") use the 3-letter ISO 639-3 / BCP 47 code instead.
|
|
115
|
+
|
|
116
|
+
Full list: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes`}})).trim().toLowerCase(),{country:r?r.country:l.trim(),countryCode:c,language:y?y.language:u.trim(),languageCode:g}}},Ie={id:"pipeline-modes",title:"Lead streams",isApplicable:()=>!0,execute:async(e,{prompt:a})=>{let n=await a({type:"multiselect",message:"Which extra lead streams should the pipeline target?",options:[{value:"rescue",label:"Rescue - businesses whose existing website is dead or broken"},{value:"booking",label:"Booking - businesses whose only web presence is a booking-platform page (Fresha, Booksy, Square...)"}],initialValue:e.pipelineModes?e.pipelineModes.filter(s=>s!=="classic").join(","):"rescue,booking",note:{title:"Lead streams",body:`Klaudius always targets businesses with NO website (the classic
|
|
117
|
+
stream) - that one is always on. Rescue ADDS businesses whose
|
|
118
|
+
existing site is verifiably broken: dead domain, hosting
|
|
119
|
+
placeholder, security errors, doesn't work on phones. Booking
|
|
120
|
+
ADDS salons, clinics, spas and studios whose Google listing
|
|
121
|
+
points at a booking platform instead of a real website - they
|
|
122
|
+
already pay for booking software, and the site built for them
|
|
123
|
+
gets a complete booking system of its own. Both streams are
|
|
124
|
+
gated by bundled checkers, not judgment. Change any time by
|
|
125
|
+
asking your agent or re-running npx klaudius configure.`}}),t=new Set(["rescue","booking"]),i=String(n).split(",").map(s=>s.trim()).filter(s=>t.has(s)),o=(e.pipelineModes??[]).filter(s=>s!=="classic"&&!t.has(s));return{pipelineModes:[...new Set(["classic",...i,...o])]}}},Te={id:"pricing",title:"Pricing",isApplicable:()=>!0,execute:async(e,{prompt:a})=>{let n=e.pricingTerms===Z,t=n?"":e.pricing??"$999",i=e.pricingMonthly??(n?e.pricing??"":""),o=await a({type:"text",message:"What's the upfront fee you'll charge clients per site?",placeholder:"e.g. $999, \xA3799, \u20AC899 \u2014 or 0 for monthly-only billing",initialValue:t,note:{title:"Upfront fee",body:`The one-time amount charged when a client signs up. Type 0 (or
|
|
126
|
+
leave blank) if you only want to charge a monthly fee. You can
|
|
127
|
+
also add a recurring monthly fee on the next prompt \u2014 combining
|
|
128
|
+
the two is fine (e.g. $499 upfront + $49/month).
|
|
129
|
+
|
|
130
|
+
Use the currency that matches your clients' region. Klaudius
|
|
131
|
+
uses this string verbatim throughout outreach.`}}),s=await a({type:"text",message:"What's the monthly fee? (optional \u2014 leave blank for one-off only)",placeholder:"e.g. $49, \xA339, \u20AC45 \u2014 or blank for none",initialValue:i,validate:m=>{if(v(o)&&v(m))return"Set an upfront fee, a monthly fee, or both \u2014 they can't both be zero."},note:{title:"Monthly fee (optional)",body:`Leave blank to charge a one-off fee only. Fill it in to charge
|
|
132
|
+
a recurring monthly fee \u2014 either on its own (if upfront was 0)
|
|
133
|
+
or alongside the upfront fee.`}}),d=v(o),h=v(s),l,r,c;return d&&!h?(l=s.trim(),r=Z,c=s.trim()):!d&&h?(l=o.trim(),r=Se,c=void 0):(l=o.trim(),r=`upfront, then ${s.trim()}/month`,c=s.trim()),{pricing:l,pricingTerms:r,pricingMonthly:c}}},Ee={id:"outreach-enabled",title:"Automated outreach",isApplicable:()=>!0,execute:async(e,{prompt:a})=>({outreachEnabled:await a({type:"confirm",message:"Use Klaudius's automated outreach features?",initialValue:e.outreachEnabled??!0,note:{title:"Automated outreach features",body:`After finding candidates and building websites for them, Klaudius can
|
|
134
|
+
run outreach to them automatically (email, SMS, WhatsApp, or printed
|
|
135
|
+
postal letters).
|
|
136
|
+
If you'd rather handle outreach manually, you can skip this here.`}})})},xe={id:"operator-name",title:"Sign-off name",isApplicable:e=>e.outreachEnabled===!0,execute:async(e,{prompt:a})=>({name:await a({type:"text",message:"What name should sign off your outreach messages?",placeholder:"e.g. Mike Smith \u2014 or your business name if you'd rather",initialValue:e.name??e.emailFromName??"",validate:b("Name"),note:{title:"Sign-off name",body:`Klaudius signs off every outreach message and follow-up with this
|
|
137
|
+
name \u2014 e.g. "Cordiali saluti, Marco" in Italian, "Best, Mike" in
|
|
138
|
+
English. Use your first name, your full name, or your business name \u2014
|
|
139
|
+
whatever you want clients to see as the sender.
|
|
140
|
+
|
|
141
|
+
Klaudius composes the actual sign-off line at message time, picking
|
|
142
|
+
natural phrasing for your language. If you'd rather pin an exact
|
|
143
|
+
sign-off string instead, ask Klaudius to set it up for you once the
|
|
144
|
+
wizard's done.`}}),signature:e.signature})},Oe={id:"channels",title:"Outreach channels & priority",isApplicable:e=>e.outreachEnabled===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Outreach channels & priority",body:`Different businesses have different contact methods publicly available \u2014 some
|
|
145
|
+
list only an email, others only a phone number, others use WhatsApp as their
|
|
146
|
+
primary channel. Klaudius lets you opt into multiple channels so it can reach
|
|
147
|
+
more candidates, and you set a priority order for when a candidate has
|
|
148
|
+
multiple contact methods available.
|
|
149
|
+
|
|
150
|
+
How it works: for each candidate, Klaudius walks your priority list in order
|
|
151
|
+
and picks the first channel that's viable for THAT candidate. If a channel's
|
|
152
|
+
send fails for a per-recipient reason (e.g. number not on WhatsApp, hard
|
|
153
|
+
email bounce), it cascades to your next-priority channel for that same
|
|
154
|
+
candidate \u2014 so opting into multiple channels also gives you fallback coverage
|
|
155
|
+
when one channel doesn't work.
|
|
156
|
+
|
|
157
|
+
You'll be asked to pick your first-choice channel now, then optionally
|
|
158
|
+
more. The order matters: it's the order Klaudius tries.
|
|
159
|
+
|
|
160
|
+
The letter channel is special: a real printed letter (sent through a
|
|
161
|
+
print-and-post API, roughly \u20AC1/$1 per letter, billed by the provider to
|
|
162
|
+
your own account) carrying a QR code to the candidate's freshly built
|
|
163
|
+
site, where they can claim it. One letter per candidate, no letter
|
|
164
|
+
follow-ups. It's the standard lawful cold channel in countries where
|
|
165
|
+
email/WhatsApp/SMS to businesses need prior consent (Germany and
|
|
166
|
+
Austria in particular), and a premium opener anywhere else.`});let t={email:"Email",sms:"SMS (iMessage or Twilio, configured next)",whatsapp:"WhatsApp (Baileys / phone-linked device)",letter:"Letter (real printed post via Pingen or PostGrid, ~\u20AC1/$1 per letter)"},i=["email","sms","whatsapp","letter"],o=e.outreachPriority??[],s=[],d=await a({type:"select",message:"Which channel should Klaudius try FIRST for each candidate?",initialValue:o[0]??"email",options:i.map(h=>({value:h,label:t[h]}))});for(s.push(d);s.length<i.length;){let h=i.filter(u=>!s.includes(u)),l=s.length===1?"second":s.length===2?"third":"fourth",r=s[s.length-1],c=t[r].replace(/\s*\(.*\)$/,"").toLowerCase(),m=await a({type:"select",message:`Should Klaudius use another channel as ${l} priority (for candidates where ${c} isn't viable or fails)?`,initialValue:o[s.length]??"no",options:[...h.map(u=>({value:u,label:`Yes \u2014 also use ${t[u]}`})),{value:"no",label:"No, that's all"}]});if(m==="no")break;s.push(m)}return{outreachChannels:s,outreachPriority:s}}},Me={id:"email",title:"Email setup",isApplicable:e=>e.outreachChannels?.includes("email")===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Email setup",body:`Klaudius needs an email account to send outreach FROM. This is the
|
|
167
|
+
address candidates will see as the sender. Use a domain you control
|
|
168
|
+
(your own, your business's) \u2014 not your personal address.`});let t=await a({type:"select",message:"Who hosts the email account you'll send outreach from?",initialValue:e.emailProvider??"gmail",options:[{value:"gmail",label:"Gmail"},{value:"fastmail",label:"Fastmail"},{value:"outlook",label:"Outlook / Office 365"},{value:"zoho",label:"Zoho Mail"},{value:"ionos",label:"IONOS"},{value:"titan",label:"Titan (123 Reg, Hostinger, Name.com\u2026)"},{value:"custom",label:"Custom / other (enter SMTP/IMAP details manually)"}]}),i=t!=="custom"?k[t]:void 0;if(i?.oauthOnly){n({title:"How Outlook / Microsoft 365 connects",body:`Microsoft no longer allows password-based access to its mailboxes
|
|
169
|
+
(app passwords included \u2014 Microsoft retired them), so there's no
|
|
170
|
+
password to paste here.
|
|
171
|
+
|
|
172
|
+
Instead, at the end of setup you'll sign in to Microsoft ONCE in
|
|
173
|
+
your browser and approve Klaudius reading and sending your mail.
|
|
174
|
+
Your password never passes through Klaudius, and you can revoke
|
|
175
|
+
the access any time at https://account.microsoft.com (or, for
|
|
176
|
+
work accounts, https://myapps.microsoft.com).`});let g=await a({type:"text",message:"Outlook / Microsoft 365 address to send outreach from",placeholder:"you@yourbusiness.com",initialValue:e.emailAddress??"",validate:q}),p=i;return Y(e,n),{emailProvider:t,emailAuth:"oauth-microsoft",emailAddress:g,emailPassword:e.emailPassword??"",emailFromName:e.name,emailSmtpHost:p.smtpHost,emailSmtpPort:p.smtpPort,emailImapHost:p.imapHost,emailImapPort:p.imapPort,emailSentFolder:p.sentFolder,emailInboxFolder:p.inboxFolder}}let o=await a({type:"text",message:"Email address to send outreach from",placeholder:"you@yourbusiness.com",initialValue:e.emailAddress??"",validate:q}),s=i?.appPasswordHelp??L,d=i?.usesAccountPassword??!1,h=await a({type:"password",message:d?"Paste your mailbox password":"Paste the app password",initialValue:e.emailPassword??"",validate:b(d?"Mailbox password":"App password"),note:{title:d?"Mailbox password":"App password",body:(i&&!d?`An app password is a separate, single-purpose password that your
|
|
177
|
+
email provider issues for third-party apps like Klaudius. It is NOT
|
|
178
|
+
your normal account login password.
|
|
179
|
+
|
|
180
|
+
`:"")+s+`
|
|
181
|
+
|
|
182
|
+
The password is stored locally in this project's .env file.
|
|
183
|
+
It is never sent to Klaudius's servers \u2014 only to your email
|
|
184
|
+
provider when sending outreach.`}}),l,r,c,m,u,y;if(t==="custom"){l=await a({type:"text",message:"SMTP host (the server Klaudius connects to for sending)",placeholder:"e.g. smtp.yourprovider.com",initialValue:e.emailSmtpHost??"",validate:b("SMTP host")});let g=await a({type:"text",message:"SMTP port (usually 587 for STARTTLS or 465 for SSL)",initialValue:String(e.emailSmtpPort??587),validate:f=>/^\d+$/.test(f)?void 0:"Must be a number"});r=parseInt(g,10),c=await a({type:"text",message:"IMAP host (the server Klaudius connects to for reading replies)",placeholder:"e.g. imap.yourprovider.com",initialValue:e.emailImapHost??"",validate:b("IMAP host")});let p=await a({type:"text",message:"IMAP port (usually 993 for SSL)",initialValue:String(e.emailImapPort??993),validate:f=>/^\d+$/.test(f)?void 0:"Must be a number"});m=parseInt(p,10),u=await a({type:"text",message:"Sent folder name (so SMTP-sent messages also appear in your email client's Sent folder)",placeholder:'e.g. "Sent", "Sent Items"',initialValue:e.emailSentFolder??"Sent"}),y=await a({type:"text",message:"Inbox folder name (almost always INBOX)",initialValue:e.emailInboxFolder??"INBOX"})}else{let g=i,p=t===e.emailProvider,f=p?e.emailSmtpHost:void 0,J=p?e.emailSmtpPort:void 0,P=p?e.emailImapHost:void 0,Q=p?e.emailImapPort:void 0,X=!!f&&f!==g.smtpHost||!!P&&P!==g.imapHost;if(await a({type:"select",message:`Server settings for ${g.label}`,initialValue:X?"manual":"standard",options:[{value:"standard",label:`Use the standard ${g.label} servers \u2014 ${g.smtpHost} (Recommended)`},{value:"manual",label:"Enter servers manually (regional accounts, custom setups)"}],note:g.serverHelp?{title:"Server settings",body:g.serverHelp}:void 0})==="manual"){l=await a({type:"text",message:"SMTP host (the server Klaudius connects to for sending)",initialValue:f??g.smtpHost,validate:b("SMTP host")});let ee=await a({type:"text",message:"SMTP port (usually 587 for STARTTLS or 465 for SSL)",initialValue:String(J??g.smtpPort),validate:A=>/^\d+$/.test(A)?void 0:"Must be a number"});r=parseInt(ee,10),c=await a({type:"text",message:"IMAP host (the server Klaudius connects to for reading replies)",initialValue:P??g.imapHost,validate:b("IMAP host")});let ae=await a({type:"text",message:"IMAP port (usually 993 for SSL)",initialValue:String(Q??g.imapPort),validate:A=>/^\d+$/.test(A)?void 0:"Must be a number"});m=parseInt(ae,10),u=(p?e.emailSentFolder:void 0)??g.sentFolder,y=(p?e.emailInboxFolder:void 0)??g.inboxFolder}else l=g.smtpHost,r=g.smtpPort,c=g.imapHost,m=g.imapPort,u=g.sentFolder,y=g.inboxFolder}return Y(e,n),{emailProvider:t,emailAuth:"password",emailAddress:o,emailPassword:h,emailFromName:e.name,emailSmtpHost:l,emailSmtpPort:r,emailImapHost:c,emailImapPort:m,emailSentFolder:u,emailInboxFolder:y}}};function Y(e,a){let n=e.aiAgent==="codex"?"Codex":"Claude";a({title:"Sending from more than one mailbox?",body:`Most operators start with just this one. If you later want outreach
|
|
185
|
+
rotated across several mailboxes, ask ${n} to add another sending
|
|
186
|
+
mailbox \u2014 it updates your config and verifies the new mailbox with a
|
|
187
|
+
test send.`})}var Ne={id:"sms",title:"SMS setup",isApplicable:e=>e.outreachChannels?.includes("sms")===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"SMS setup",body:`Klaudius can send SMS one of two ways:
|
|
188
|
+
|
|
189
|
+
\u2022 macOS iMessage \u2014 free, uses Messages.app on your Mac.
|
|
190
|
+
Reaches other Apple users as iMessage for free. To reach
|
|
191
|
+
non-Apple phones (e.g. Android), you need a one-time setup:
|
|
192
|
+
1. Sign in to Messages.app on this Mac with your Apple ID.
|
|
193
|
+
2. On your iPhone, sign in to the SAME Apple ID.
|
|
194
|
+
3. On your iPhone: Settings \u2192 Messages \u2192 Text Message
|
|
195
|
+
Forwarding \u2192 toggle this Mac ON. (You'll be asked to
|
|
196
|
+
enter a 6-digit code that appears on the Mac.)
|
|
197
|
+
Once that's done, the iPhone doesn't need to be nearby.
|
|
198
|
+
Apple keeps the relay working as long as both devices stay
|
|
199
|
+
signed into the same Apple ID and have data/Wi-Fi.
|
|
200
|
+
|
|
201
|
+
\u2022 Twilio \u2014 cross-platform, ~$0.01 per SMS. Sender is a phone
|
|
202
|
+
number you buy from Twilio. Works on any OS, reaches any
|
|
203
|
+
phone, no iPhone required. Recommended for consistent delivery.`});let t=await a({type:"select",message:"Which SMS provider?",initialValue:e.smsProvider??(process.platform==="darwin"?"imessage":"twilio"),options:[{value:"imessage",label:"macOS iMessage (free, Mac only)"},{value:"twilio",label:"Twilio (cross-platform, paid per-message \u2014 recommended)"}]}),i=await a({type:"text",message:"Your mobile number (used as a safe target for test sends so Klaudius doesn't accidentally message real candidates while you're testing)",placeholder:"+12025550123",initialValue:e.testPhone??"",validate:j}),o={smsProvider:t,testPhone:i};return t==="twilio"&&(o.twilioAccountSid=await a({type:"text",message:"Twilio Account SID (starts with AC...)",initialValue:e.twilioAccountSid??"",validate:s=>/^AC[a-zA-Z0-9]+$/.test(s)?void 0:"Should start with 'AC'"}),o.twilioAuthToken=await a({type:"password",message:"Twilio Auth Token",initialValue:e.twilioAuthToken??"",validate:E("Twilio Auth Token")}),o.twilioPhoneNumber=await a({type:"text",message:"Twilio phone number (the number outreach will be sent FROM)",placeholder:"+15551234567",initialValue:e.twilioPhoneNumber??"",validate:j})),o}},He={id:"whatsapp",title:"WhatsApp setup",isApplicable:e=>e.outreachPriority?.includes("whatsapp")===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"WhatsApp setup",body:`Klaudius connects to WhatsApp as a linked device on your phone \u2014 same way
|
|
204
|
+
WhatsApp Web works. Setup is a one-time QR scan from the WhatsApp app on
|
|
205
|
+
the phone whose number you want to use. Klaudius will guide you through
|
|
206
|
+
that AFTER this wizard, once npm dependencies are installed.
|
|
207
|
+
|
|
208
|
+
Multiple numbers (advanced): if you plan to send at higher volume, you can
|
|
209
|
+
link 2-5 WhatsApp accounts. Klaudius round-robins across them for initial
|
|
210
|
+
outreach (spreading the load); follow-ups always use the same account that
|
|
211
|
+
started the thread. Each account is independent. For multi-number you need
|
|
212
|
+
a separate phone number per account (they're tied to real SIMs).
|
|
213
|
+
|
|
214
|
+
You'll be asked how many accounts to link and a short label for each
|
|
215
|
+
(used only locally \u2014 appears in logs, in the .env file, and in this
|
|
216
|
+
project's per-account directory under ~/.klaudius/whatsapp/).`});let t=await a({type:"select",message:"How many WhatsApp numbers do you want to link?",initialValue:String(e.whatsappAccounts?.length??1),options:[{value:"1",label:"1 number (recommended starting point)"},{value:"2",label:"2 numbers (spread load across two)"},{value:"3",label:"3 numbers"},{value:"4",label:"4 numbers"},{value:"5",label:"5 numbers (maximum)"}]}),i=parseInt(t,10),o=["primary","secondary","tertiary","quaternary","quinary"],s=[];for(let d=0;d<i;d++){let h=await a({type:"text",message:i===1?"Label for this WhatsApp account (used only locally \u2014 'primary' is fine)":`Label for WhatsApp account ${d+1} of ${i} (e.g. 'primary', 'uk-1', 'us-east')`,initialValue:e.whatsappAccounts?.[d]??o[d],validate:l=>{let r=l.trim();if(!r)return"Required";if(r.length>30)return"Too long (max 30 characters)";if(r.startsWith("-")||r.endsWith("-"))return"Can't start or end with a hyphen";if(!/^[A-Za-z0-9_-]+$/.test(r))return"Letters, digits, underscore, hyphen only (no spaces)";if(s.includes(r))return"Duplicate label"}});s.push(h.trim())}return{whatsappAccounts:s}}},Ke={id:"letter",title:"Letter setup",isApplicable:e=>e.outreachChannels?.includes("letter")===!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Letter setup",body:`Klaudius sends letters through a print-and-post API \u2014 you bring your
|
|
217
|
+
own provider account, the provider prints each letter locally and
|
|
218
|
+
hands it to the postal carrier. Two providers are supported:
|
|
219
|
+
|
|
220
|
+
\u2022 Pingen (pingen.com) \u2014 Europe. Prints locally in Germany, Austria,
|
|
221
|
+
Switzerland, the Netherlands, France, Belgium, Luxembourg, Spain
|
|
222
|
+
and the UK (elsewhere via DHL, slower). Prepaid credits, no
|
|
223
|
+
monthly fee. Create an account, then under your organisation's
|
|
224
|
+
'API Access' create an API client to get a Client ID + Secret;
|
|
225
|
+
the organisation id is in the dashboard URL.
|
|
226
|
+
|
|
227
|
+
\u2022 PostGrid (postgrid.com) \u2014 US, Canada, UK, Australia. One
|
|
228
|
+
country's print network per account (pick your own country's
|
|
229
|
+
at signup). Free tier covers hundreds of letters a month \u2014
|
|
230
|
+
you pay per letter. The API key is in the dashboard; a key
|
|
231
|
+
beginning 'test_' is the sandbox and prints nothing \u2014 paste
|
|
232
|
+
your LIVE key here when you're ready to actually send.
|
|
233
|
+
PostGrid also prints your return address on every letter \u2014
|
|
234
|
+
your AI agent will ask for it before the first send.
|
|
235
|
+
|
|
236
|
+
Klaudius refuses letters with incomplete street addresses and
|
|
237
|
+
verifies each letter's claim-page link is live before submitting,
|
|
238
|
+
so a letter is never wasted on a bad address or a dead link.`});let t=e.countryCode&&["US","CA","AU","GB","UK"].includes(e.countryCode)?"postgrid":"pingen",i=await a({type:"select",message:"Which letter provider?",initialValue:e.letterProvider??t,options:[{value:"pingen",label:"Pingen (Europe: DE, AT, CH, NL, FR, BE, LU, ES, UK)"},{value:"postgrid",label:"PostGrid (US, CA, UK, AU)"}]}),o={letterProvider:i};return i==="pingen"?(o.pingenClientId=await a({type:"text",message:"Pingen API Client ID",initialValue:e.pingenClientId??"",validate:b("Pingen Client ID")}),o.pingenClientSecret=await a({type:"password",message:"Pingen API Client Secret",initialValue:e.pingenClientSecret??"",validate:E("Pingen Client Secret")}),o.pingenOrgId=await a({type:"text",message:"Pingen organisation id (from the dashboard URL: app.pingen.com/organisations/<id>/...)",initialValue:e.pingenOrgId??"",validate:b("Pingen organisation id")})):o.postgridApiKey=await a({type:"password",message:"PostGrid API key (live_sk_... \u2014 a test_ key works but prints nothing)",initialValue:e.postgridApiKey??"",validate:E("PostGrid API key")}),o}},Le={id:"deploy-provider",title:"Deployment host",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>(n({title:"Where should Klaudius deploy the websites it builds?",body:`Every client site Klaudius builds is a static website, so it deploys
|
|
239
|
+
cleanly to any of the hosts below \u2014 pick whichever you'd rather have
|
|
240
|
+
an account with. All have a free tier that's plenty to get started.
|
|
241
|
+
|
|
242
|
+
\u2022 Vercel \u2014 the default. One API token to set up.
|
|
243
|
+
\u2022 Cloudflare Pages \u2014 one API token + your account ID. Free tier has
|
|
244
|
+
no bandwidth cap, which suits high-volume operators.
|
|
245
|
+
\u2022 Netlify \u2014 one API token. A good fit if you already host on it.
|
|
246
|
+
\u2022 Self-hosted \u2014 rsync the finished static files to your own server
|
|
247
|
+
over SSH. For operators who want to own the whole stack.
|
|
248
|
+
|
|
249
|
+
This only changes where sites are hosted and which credential you set
|
|
250
|
+
up next. Everything else \u2014 how sites are found, built, and pitched \u2014
|
|
251
|
+
is identical. (The optional dynamic add-ons \u2014 CMS, live Google
|
|
252
|
+
rating, booking \u2014 are Vercel-only today.)`}),{deployProvider:await a({type:"select",message:"Which host should Klaudius deploy client sites to?",initialValue:e.deployProvider??"vercel",options:[{value:"vercel",label:"Vercel (default)"},{value:"cloudflare",label:"Cloudflare Pages"},{value:"netlify",label:"Netlify"},{value:"selfhost",label:"Self-hosted (your own server over SSH)"}]})})},Fe={id:"vercel",title:"Vercel deployment",isApplicable:e=>(e.deployProvider??"vercel")==="vercel",execute:async(e,{prompt:a})=>({vercelToken:await a({type:"password",message:"Paste your Vercel API token",initialValue:e.vercelToken??"",validate:t=>t.trim().length===0?"Required \u2014 without this Klaudius can't deploy generated sites":void 0,note:{title:"Vercel deployment",body:`Klaudius deploys every generated client site to Vercel. We use a
|
|
253
|
+
Vercel API token to do this without an interactive login.
|
|
254
|
+
|
|
255
|
+
How to get one (one-time, ~30 seconds):
|
|
256
|
+
1. Open https://vercel.com/account/tokens
|
|
257
|
+
2. Click 'Create Token'
|
|
258
|
+
3. Name it 'Klaudius', set scope to your personal account, set
|
|
259
|
+
expiration to 'No expiration' (recommended) or your preferred
|
|
260
|
+
duration
|
|
261
|
+
4. Click Create, then copy the token shown
|
|
262
|
+
|
|
263
|
+
Don't have a Vercel account yet? Sign up free at vercel.com.
|
|
264
|
+
The Hobby (free) plan caps you at 200 projects and 100 deployments
|
|
265
|
+
per day. If you grow past 200 active client sites you can either
|
|
266
|
+
upgrade to Pro ($20/month, unlimited projects + 6,000 deploys/day),
|
|
267
|
+
or simply switch to a new Vercel account each time you hit the
|
|
268
|
+
200-project ceiling.
|
|
269
|
+
|
|
270
|
+
STUCK? Open Claude (or any LLM) in another tab/app and paste:
|
|
271
|
+
|
|
272
|
+
"I need to create a personal Vercel API token for the
|
|
273
|
+
Klaudius CLI tool. Walk me through generating one at
|
|
274
|
+
vercel.com/account/tokens, including which scope and
|
|
275
|
+
expiration to choose."`}})})},Re={id:"cloudflare",title:"Cloudflare deployment",isApplicable:e=>e.deployProvider==="cloudflare",execute:async(e,{prompt:a})=>{let n=await a({type:"password",message:"Paste your Cloudflare API token",initialValue:e.cloudflareApiToken??"",validate:i=>i.trim().length===0?"Required \u2014 without this Klaudius can't deploy generated sites":void 0,note:{title:"Cloudflare API token",body:`Klaudius deploys every generated client site to Cloudflare Pages
|
|
276
|
+
using \`wrangler\`. It authenticates with an API token (no interactive
|
|
277
|
+
login), so no browser step at deploy time.
|
|
278
|
+
|
|
279
|
+
How to create one (one-time, ~1 minute) \u2014 the SCOPE matters, an
|
|
280
|
+
under-scoped token is the #1 thing that makes deploys fail later:
|
|
281
|
+
1. Open https://dash.cloudflare.com/profile/api-tokens
|
|
282
|
+
2. Click 'Create Token' \u2192 scroll to 'Create Custom Token' \u2192
|
|
283
|
+
'Get started'
|
|
284
|
+
3. Name it 'Klaudius'
|
|
285
|
+
4. Under 'Permissions' add exactly this row:
|
|
286
|
+
Account \u2022 Cloudflare Pages \u2022 Edit
|
|
287
|
+
5. Under 'Account Resources' select your account (or 'All
|
|
288
|
+
accounts')
|
|
289
|
+
6. Click 'Continue to summary' \u2192 'Create Token', then copy the
|
|
290
|
+
token shown (you only see it once)
|
|
291
|
+
|
|
292
|
+
Don't have a Cloudflare account yet? Sign up free at
|
|
293
|
+
dash.cloudflare.com. The free Pages tier has unlimited sites and
|
|
294
|
+
unlimited bandwidth \u2014 you won't outgrow it.
|
|
295
|
+
|
|
296
|
+
STUCK? Open Claude (or any LLM) in another tab/app and paste:
|
|
297
|
+
|
|
298
|
+
"I need a Cloudflare API token for the Klaudius CLI. Walk me
|
|
299
|
+
through creating a Custom Token at
|
|
300
|
+
dash.cloudflare.com/profile/api-tokens with the
|
|
301
|
+
'Account \u2192 Cloudflare Pages \u2192 Edit' permission, and tell me
|
|
302
|
+
where to find my Account ID."`}}),t=await a({type:"text",message:"Paste your Cloudflare Account ID",placeholder:"e.g. 0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d",initialValue:e.cloudflareAccountId??"",validate:i=>{let o=i.trim();if(o.length===0)return"Required \u2014 wrangler needs it to pick the right account";if(!/^[0-9a-f]{32}$/i.test(o))return"Should be a 32-character hex string (copy it from the dashboard, not the token)"},note:{title:"Cloudflare Account ID",body:`This tells \`wrangler\` which account to deploy into. It's separate
|
|
303
|
+
from the API token above.
|
|
304
|
+
|
|
305
|
+
Where to find it:
|
|
306
|
+
\u2022 Open https://dash.cloudflare.com and select your account
|
|
307
|
+
\u2022 The Account ID is the 32-character hex string in the address
|
|
308
|
+
bar (dash.cloudflare.com/<ACCOUNT_ID>), and is also shown on
|
|
309
|
+
the account's Workers & Pages overview page under 'Account ID'
|
|
310
|
+
|
|
311
|
+
Without it, wrangler shows an interactive account picker that would
|
|
312
|
+
stall an unattended pipeline run, so Klaudius requires it up front.`}});return{cloudflareApiToken:n,cloudflareAccountId:t.trim()}}},Ue={id:"netlify",title:"Netlify deployment",isApplicable:e=>e.deployProvider==="netlify",execute:async(e,{prompt:a})=>({netlifyAuthToken:await a({type:"password",message:"Paste your Netlify access token",initialValue:e.netlifyAuthToken??"",validate:t=>t.trim().length===0?"Required \u2014 without this Klaudius can't deploy generated sites":void 0,note:{title:"Netlify access token",body:`Klaudius deploys every generated client site to Netlify using the
|
|
313
|
+
Netlify CLI. It authenticates with a personal access token (no
|
|
314
|
+
interactive login), so there's no browser step at deploy time.
|
|
315
|
+
|
|
316
|
+
How to create one (one-time, ~30 seconds):
|
|
317
|
+
1. Open
|
|
318
|
+
https://app.netlify.com/user/applications#personal-access-tokens
|
|
319
|
+
2. Click 'New access token'
|
|
320
|
+
3. Name it 'Klaudius', leave the expiry at 'No expiration'
|
|
321
|
+
(recommended) or pick a duration
|
|
322
|
+
4. Click 'Generate token', then copy it (you only see it once)
|
|
323
|
+
|
|
324
|
+
Don't have a Netlify account yet? Sign up free at netlify.com. The
|
|
325
|
+
free (Starter) tier includes 100 GB bandwidth/month across all your
|
|
326
|
+
sites \u2014 plenty to start. Klaudius builds each site on your own
|
|
327
|
+
machine and uploads the finished files, so it never spends your
|
|
328
|
+
monthly build-minutes allowance.
|
|
329
|
+
|
|
330
|
+
STUCK? Open Claude (or any LLM) in another tab/app and paste:
|
|
331
|
+
|
|
332
|
+
"I need to create a personal access token for the Klaudius CLI
|
|
333
|
+
tool in Netlify. Walk me through generating one at
|
|
334
|
+
app.netlify.com/user/applications, including which expiry to
|
|
335
|
+
choose."`}})})},Ge={id:"selfhost",title:"Self-host deployment",isApplicable:e=>e.deployProvider==="selfhost",execute:async(e,{prompt:a})=>{let n=await a({type:"text",message:"Where should sites be uploaded? (rsync destination)",placeholder:"e.g. deploy@203.0.113.7:/var/www/klaudius-sites",initialValue:e.selfhostDeployTarget??"",validate:U,note:{title:"Self-host deployment",body:`Klaudius builds each client site locally as plain static files and
|
|
336
|
+
uploads them to your server with rsync over SSH. Each client gets
|
|
337
|
+
its own subdirectory under the destination you enter here, e.g.
|
|
338
|
+
deploy@yourvps:/var/www/klaudius-sites \u2192 .../klaudius-sites/<slug>/
|
|
339
|
+
|
|
340
|
+
Authentication is SSH keys only \u2014 your key must already be
|
|
341
|
+
authorized on the server (the deploy fails loudly rather than ever
|
|
342
|
+
prompting for a password). Non-standard ports or identity files
|
|
343
|
+
belong in ~/.ssh/config.
|
|
344
|
+
|
|
345
|
+
STUCK? Open Claude (or any LLM) and paste:
|
|
346
|
+
|
|
347
|
+
"I'm setting up passwordless SSH key auth from my machine to
|
|
348
|
+
my VPS so an automated rsync deploy can upload files. Walk me
|
|
349
|
+
through ssh-keygen and ssh-copy-id, and where to put a custom
|
|
350
|
+
port in ~/.ssh/config."`}}),t=await a({type:"text",message:"What URL will each site be served at? (use {slug} in the hostname)",placeholder:"e.g. https://{slug}.sites.your-domain.com",initialValue:e.selfhostUrlTemplate??"",validate:G,note:{title:"Public URL pattern",body:`The deploy substitutes each client's slug into this template to get
|
|
351
|
+
the live URL it records and pitches. {slug} must be in the HOSTNAME
|
|
352
|
+
(each site is served from the root of its own subdomain) because
|
|
353
|
+
static exports use root-absolute asset links.
|
|
354
|
+
|
|
355
|
+
One-time server setup that makes this zero-work per site:
|
|
356
|
+
\u2022 wildcard DNS: *.sites.your-domain.com \u2192 your server
|
|
357
|
+
\u2022 a wildcard TLS cert (Let's Encrypt, DNS validation)
|
|
358
|
+
\u2022 one wildcard vhost mapping each subdomain to its site folder
|
|
359
|
+
|
|
360
|
+
After setup, ask Claude in your Klaudius project to verify a test
|
|
361
|
+
deploy end-to-end. STUCK on the server config? Paste into any LLM:
|
|
362
|
+
|
|
363
|
+
"Help me configure nginx (or Caddy) with a wildcard vhost that
|
|
364
|
+
serves https://<name>.sites.example.com from
|
|
365
|
+
/var/www/klaudius-sites/<name>/, plus a wildcard Let's Encrypt
|
|
366
|
+
certificate via DNS-01."`}});return{selfhostDeployTarget:n.trim().replace(/\/+$/,""),selfhostUrlTemplate:t.trim()}}},_e={id:"supabase",title:"Supabase",isApplicable:()=>!0,execute:async(e,{prompt:a,info:n})=>{n({title:"Supabase setup",body:`Supabase is your CRM. It's where Klaudius records every business it
|
|
367
|
+
finds, where each one sits in your funnel (gathered \u2192 built \u2192 deployed
|
|
368
|
+
\u2192 outreach sent \u2192 responded), and the follow-up state for every lead.
|
|
369
|
+
You can browse it at any time from the Supabase dashboard, or ask
|
|
370
|
+
Claude \u2014 your Klaudius project ships with the Supabase MCP wired in,
|
|
371
|
+
so Claude can read the CRM live (e.g. 'who replied this week?',
|
|
372
|
+
'who haven't I followed up with?').
|
|
373
|
+
|
|
374
|
+
The free tier (500 MB database, 5 GB bandwidth/month) is plenty:
|
|
375
|
+
Klaudius's records are tiny text rows (a few KB per client at most),
|
|
376
|
+
and the only reads/writes are the pipeline's own bookkeeping \u2014
|
|
377
|
+
no public traffic to your CRM. Even with thousands of leads tracked
|
|
378
|
+
you'll use a sliver of the limit.
|
|
379
|
+
|
|
380
|
+
If you don't have a project yet: open https://supabase.com/dashboard
|
|
381
|
+
and create one. The flow is:
|
|
382
|
+
1. Sign up (or sign in) with GitHub / Google / email
|
|
383
|
+
2. 'Create a new organization' page \u2014 name and type don't matter
|
|
384
|
+
for Klaudius, pick anything you like
|
|
385
|
+
3. Plan page \u2014 pick Free
|
|
386
|
+
4. 'Create a new project' page \u2014 set a database password (any
|
|
387
|
+
strong password \u2014 Klaudius doesn't use it directly, but you'll
|
|
388
|
+
want it later if you ever connect to the database manually).
|
|
389
|
+
Region defaults to the nearest one to you, leave it. Accept
|
|
390
|
+
defaults for any other security settings on the page.
|
|
391
|
+
5. Click 'Create new project'.
|
|
392
|
+
|
|
393
|
+
STUCK on any of the prompts below? Open Claude (or ChatGPT, or any LLM)
|
|
394
|
+
in another tab/app and paste this prompt verbatim:
|
|
395
|
+
|
|
396
|
+
"I'm setting up a Supabase project to use with the Klaudius CLI.
|
|
397
|
+
The wizard is asking for: (1) project URL, (2) the secret/service-
|
|
398
|
+
role key, (3) a personal access token. Walk me through where to
|
|
399
|
+
find each one in the current Supabase dashboard UI, including the
|
|
400
|
+
exact menu paths and any caveats for newer vs. legacy projects."`});let i=(await a({type:"text",message:"Paste your Supabase API URL",placeholder:"https://YOUR_REF.supabase.co",initialValue:e.supabaseUrl??"",validate:c=>/^https:\/\/[a-z0-9]+\.supabase\.co(\/rest\/v1\/?)?$/i.test(c.trim())?void 0:"Should look like https://xxxx.supabase.co (with or without /rest/v1/)",note:{title:"API URL",body:`In your Supabase dashboard, open your project, then go to:
|
|
401
|
+
Settings \u2192 Data API \u2192 'API URL'
|
|
402
|
+
|
|
403
|
+
It looks like https://xxxx.supabase.co. Click to copy and paste
|
|
404
|
+
below.`}})).trim().replace(/\/rest\/v1\/?$/i,"").replace(/\/$/,""),o=i.match(/^https:\/\/([a-z0-9]+)\.supabase\.co/i)?.[1]??"",d=(await a({type:"password",message:"Paste the Supabase secret key (sb_secret_\u2026)",initialValue:e.supabaseServiceKey??"",validate:c=>{let m=c.trim(),u=x(m);if(u)return u;if(m.length<20)return"Looks too short";if(m.startsWith("sb_publishable_"))return"That's the publishable key. Klaudius needs the 'sb_secret_\u2026' key on the same page (different row, below the publishable one).";if(!m.startsWith("sb_secret_")&&!m.startsWith("eyJ"))return"Doesn't look like a Supabase secret key. Expected 'sb_secret_\u2026' (or a legacy JWT starting with 'eyJ\u2026' on older projects)."},note:{title:"Secret key",body:`Open this exact page:
|
|
405
|
+
https://supabase.com/dashboard/project/${o}/settings/api-keys
|
|
406
|
+
|
|
407
|
+
Under 'Secret keys', find the row whose value starts with
|
|
408
|
+
'sb_secret_'. Click to copy the full value.
|
|
409
|
+
|
|
410
|
+
NEVER use the 'anon' / 'public' / 'sb_publishable_' key (those
|
|
411
|
+
are client-side keys with no write permissions).
|
|
412
|
+
|
|
413
|
+
Don't confuse this page with 'Edge Functions \u2192 Secrets' in the
|
|
414
|
+
left sidebar \u2014 that's an unrelated feature (env vars for Edge
|
|
415
|
+
Functions). The page you want is Settings (gear icon, bottom
|
|
416
|
+
of the left sidebar) \u2192 API Keys.`}})).replace(/\s+/g,""),l=(await a({type:"password",message:"Paste the Supabase personal access token",initialValue:e.supabasePat??"",validate:ke,note:{title:"Personal access token",body:`This is a separate credential from the secret key above \u2014 it's an
|
|
417
|
+
ACCOUNT-wide token (not project-scoped) used by the Supabase MCP and
|
|
418
|
+
by Klaudius's schema migration.
|
|
419
|
+
|
|
420
|
+
Open this exact page:
|
|
421
|
+
https://supabase.com/dashboard/account/tokens
|
|
422
|
+
|
|
423
|
+
Click 'Generate new token', name it 'Klaudius', and set the
|
|
424
|
+
expiration to 'Never' (recommended \u2014 saves you having to rotate
|
|
425
|
+
it later). Copy the value (starts with 'sbp_') and paste it
|
|
426
|
+
below.`}})).replace(/\s+/g,""),r=e.supabaseAnonKey;return e.outreachChannels?.includes("letter")&&(r=(await a({type:"password",message:"Paste the Supabase publishable (anon) key \u2014 needed for the letter channel's claim pages",initialValue:e.supabaseAnonKey??"",validate:m=>{let u=m.replace(/\s+/g,"");if(u.length<20)return"Looks too short";if(/^sb_secret_/i.test(u))return"That's the SECRET key \u2014 the claim page needs the 'sb_publishable_\u2026' (or legacy 'anon') key from the same page.";let y=Ce(u);if(y&&y!=="anon")return`That JWT has role '${y}' \u2014 the claim page needs the key whose role is 'anon' (same dashboard page, different row).`},note:{title:"Publishable (anon) key",body:`Same page as the secret key:
|
|
427
|
+
https://supabase.com/dashboard/project/${o}/settings/api-keys
|
|
428
|
+
|
|
429
|
+
Copy the 'sb_publishable_\u2026' value (labelled 'anon' / 'public' on
|
|
430
|
+
older projects). This key is safe to embed in public pages: on a
|
|
431
|
+
Klaudius database it can only insert claim-form submissions,
|
|
432
|
+
nothing else.`}})).replace(/\s+/g,"")),{supabaseUrl:i,supabaseServiceKey:d,supabasePat:l,supabaseAnonKey:r,supabaseProjectRef:o}}},ze={id:"google-places",title:"Google Places API",isApplicable:()=>!0,execute:async(e,{prompt:a})=>{let n=await a({type:"password",message:"Paste your Google Places API key",placeholder:"AIzaSy\u2026",initialValue:e.googlePlacesApiKey??"",validate:i=>D(i),note:{title:"Google Places API key",body:`Klaudius's /find skill queries Google's Places API to discover businesses
|
|
433
|
+
without websites in your target region. Without a key, the pipeline has
|
|
434
|
+
no source of leads \u2014 so this is required.
|
|
435
|
+
|
|
436
|
+
Cost: Google gives every new account $300 in trial credit to spend over
|
|
437
|
+
90 days. That's far more than you'll need at solo-operator volume \u2014
|
|
438
|
+
Klaudius's Places API calls are fractions of a cent each. If you do
|
|
439
|
+
exhaust it, sign up again with a different Google account to get
|
|
440
|
+
another $300 trial.
|
|
441
|
+
|
|
442
|
+
How to get a key (~5 min):
|
|
443
|
+
1. Open https://console.cloud.google.com and sign in (or create a
|
|
444
|
+
Google account if you don't have one yet).
|
|
445
|
+
2. On the welcome page, click 'Try for free' (or 'Start free' in the
|
|
446
|
+
top banner) and complete the signup. Google asks for a card to
|
|
447
|
+
verify identity, but won't charge it \u2014 the trial caps at the
|
|
448
|
+
$300 credit unless you manually upgrade to a paid account.
|
|
449
|
+
3. Once the trial is active, Google auto-creates a project called
|
|
450
|
+
'My First Project'. Make sure it's selected in the project picker
|
|
451
|
+
at the top of the console (it should be by default).
|
|
452
|
+
4. APIs & Services \u2192 Library \u2192 search 'Places API' \u2192 click
|
|
453
|
+
'Places API (New)' (NOT the legacy 'Places API') \u2192 Enable.
|
|
454
|
+
5. Google's 'Get Started on Google Maps Platform' page opens and
|
|
455
|
+
auto-generates an API key for you (starts with 'AIzaSy\u2026').
|
|
456
|
+
Click the copy icon next to it and paste below.
|
|
457
|
+
|
|
458
|
+
Optional but recommended once you've pasted the key: lock it down via
|
|
459
|
+
APIs & Services \u2192 Credentials \u2192 click your key \u2192 under 'API
|
|
460
|
+
restrictions' restrict it to 'Places API (New)'. Klaudius works either
|
|
461
|
+
way.
|
|
462
|
+
|
|
463
|
+
STUCK? Open Claude (or any LLM) in another tab/app and paste this prompt:
|
|
464
|
+
|
|
465
|
+
"I need a Google Places API (New) key for a CLI tool called
|
|
466
|
+
Klaudius. Walk me through claiming the $300 Google Cloud free trial
|
|
467
|
+
and getting the API key Google auto-generates after enabling
|
|
468
|
+
Places API (New), including any signup gotchas."`}});return{googlePlacesApiKey:T(n).value}}},Be={id:"notifications",title:"Notifications (optional)",isApplicable:()=>!0,clearOnSkip:["notifyChannel","notifyTo","telegramBotToken","telegramChatId"],execute:async(e,{prompt:a})=>{let n=!!e.emailAddress,t=!!e.smsProvider||!!e.testPhone,i=e.notifyChannel==="telegram"?!!e.telegramBotToken:e.notifyChannel==="email"?n:e.notifyChannel==="sms"?t:!1,o=await a({type:"select",message:"How should Klaudius send you pipeline alerts?",initialValue:i?e.notifyChannel:e.telegramBotToken?"telegram":"none",options:[{value:"telegram",label:"Telegram (recommended \u2014 instant phone pings, free)"},...n?[{value:"email",label:"Email (to your own inbox, reuses your outreach account)"}]:[],...t?[{value:"sms",label:"SMS (to your own phone, via your configured SMS setup)"}]:[],{value:"none",label:"None"}],note:{title:"Pipeline notifications (optional)",body:`Klaudius alerts you when outreach lands and when anything needs a
|
|
469
|
+
human eye (a failed deploy, an API error, odd-looking data).
|
|
470
|
+
|
|
471
|
+
\u2022 Telegram \u2014 needs a bot token (via @BotFather, ~30 seconds);
|
|
472
|
+
the next prompts walk you through it.
|
|
473
|
+
\u2022 Email / SMS \u2014 zero extra setup; alerts go to your own
|
|
474
|
+
inbox/phone through the account you already configured.`}});if(o==="none")return{notifyChannel:void 0,notifyTo:void 0,telegramBotToken:void 0,telegramChatId:void 0};if(o==="email"||o==="sms"){let c=o==="email"?e.emailAddress:e.testPhone,m=await a({type:"text",message:o==="email"?"Where should alert emails go?":"Which number should alert texts go to?",initialValue:e.notifyTo??c??"",validate:u=>u.trim().length===0?"Required":void 0});return{notifyChannel:o,notifyTo:m.trim()}}let s=await a({type:"password",message:"Paste your Telegram bot token",initialValue:e.telegramBotToken??"",validate:b("Bot token"),note:{title:"Bot token",body:`Telegram lets you create personal bots in ~30 seconds. Klaudius
|
|
475
|
+
uses a bot to send you private notifications.
|
|
476
|
+
|
|
477
|
+
How to create one:
|
|
478
|
+
1. Open Telegram (mobile, desktop, or web).
|
|
479
|
+
2. Search for the user '@BotFather' and open the chat.
|
|
480
|
+
3. Send /newbot.
|
|
481
|
+
4. BotFather asks for a display name \u2014 pick anything (e.g.
|
|
482
|
+
'Klaudius Notifier').
|
|
483
|
+
5. BotFather asks for a username \u2014 must end in 'bot' (e.g.
|
|
484
|
+
'KlaudiusNotifierBot'). Each username has to be globally
|
|
485
|
+
unique, so add a personal suffix if it's taken.
|
|
486
|
+
6. BotFather replies with a token like
|
|
487
|
+
'1234567890:AAEhBP_yourtokenhere\u2026'. Copy it and paste below.`}}),d=null,h=0,l=null,r=null;for(;d===null;){h++;let c=h>1,m=r==="network"?`${l}
|
|
488
|
+
|
|
489
|
+
This is usually a network problem on your end (corporate WiFi or VPN
|
|
490
|
+
blocking Telegram, ISP DNS issue, a momentary drop). Check your
|
|
491
|
+
connection, try a different network if available, then press Enter
|
|
492
|
+
to retry.`:`${l}
|
|
493
|
+
|
|
494
|
+
Make sure you sent a regular text message (e.g. 'hi'), not
|
|
495
|
+
just a /start tap \u2014 /start alone doesn't always register.
|
|
496
|
+
Then press Enter to retry.`;await a({type:"text",message:c?r==="network"?"Check your network, then press Enter to retry":"Send another message to the bot, then press Enter to retry":"Send a message to your bot, then press Enter to detect chat ID",initialValue:"",placeholder:"(press Enter when you've sent the message)",validate:()=>{},note:{title:c?"Detect chat ID \u2014 retry":"Detect chat ID",body:c?m:`Klaudius will auto-detect your chat ID by asking Telegram for
|
|
497
|
+
any messages your bot has received. To make that work:
|
|
498
|
+
|
|
499
|
+
1. In the Telegram app, search for the bot you just created
|
|
500
|
+
(the username ending in 'bot') and open the chat.
|
|
501
|
+
2. Send it a regular text message \u2014 type 'hi' and tap send.
|
|
502
|
+
If the chat starts with a 'Start' button, tap that first,
|
|
503
|
+
THEN send 'hi'. /start alone doesn't always show up.
|
|
504
|
+
3. Press Enter below \u2014 Klaudius will detect the chat ID for
|
|
505
|
+
you.`}});let u=await R({botToken:s});if(u.ok&&u.chatId)d=u.chatId;else if(u.reason==="no_messages")l="No messages from you to your bot have been picked up yet.",r="no_messages";else if(u.reason==="network")l=u.message??"Could not reach Telegram.",r="network";else throw new Error(`Telegram chat ID auto-detect failed: ${u.message??"unknown error"}`)}return{notifyChannel:"telegram",notifyTo:void 0,telegramBotToken:s,telegramChatId:d}}},fa=[ve,Pe,Ae,Ie,Te,Ee,xe,Oe,Me,Ne,He,Ke,Le,Fe,Re,Ue,Ge,_e,ze,Be];export{w as a,qe as b,Ze as c,k as d,S as e,le as f,sa as g,U as h,G as i,B as j,D as k,ua as l,V as m,W as n,Ce as o,fa as p,F as q,ea as r,aa as s};
|