arkaos 4.26.0 → 4.27.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/README.md +7 -5
- package/THE-ARKAOS-GUIDE.md +7 -7
- package/VERSION +1 -1
- package/arka/SKILL.md +1 -1
- package/arka/skills/human-writing/SKILL.md +68 -0
- package/arka/skills/human-writing/references/checklist.md +66 -0
- package/arka/skills/human-writing/references/content-refresh.md +38 -0
- package/arka/skills/human-writing/references/plain-english-alternatives.md +394 -0
- package/config/claude-agents/lifecycle-marketer.md +50 -0
- package/config/claude-agents/pr-partnerships.md +50 -0
- package/config/claude-agents/product-marketer.md +50 -0
- package/config/evals/community.yaml +137 -0
- package/config/evals/content.yaml +298 -0
- package/config/evals/landing.yaml +927 -0
- package/config/evals/marketing.yaml +3762 -0
- package/config/evals/saas.yaml +616 -0
- package/config/evals/sales.yaml +437 -0
- package/config/skills-curated.yaml +2 -2
- package/config/skills-provenance.yaml +194 -21
- package/core/registry/generator.py +7 -0
- package/departments/community/SKILL.md +1 -0
- package/departments/community/skills/community-marketing/SKILL.md +200 -0
- package/departments/content/SKILL.md +1 -0
- package/departments/content/skills/image-create/SKILL.md +375 -0
- package/departments/content/skills/image-create/references/ai-image-prompting.md +229 -0
- package/departments/content/skills/video-produce/SKILL.md +220 -0
- package/departments/content/skills/video-produce/references/ai-video-prompting.md +175 -0
- package/departments/content/skills/video-produce/references/edit-anatomy.md +84 -0
- package/departments/landing/SKILL.md +3 -0
- package/departments/landing/skills/affiliate-bridge/SKILL.md +291 -5
- package/departments/landing/skills/affiliate-bridge/references/affiliate-programs.md +167 -0
- package/departments/landing/skills/affiliate-bridge/references/program-examples.md +143 -0
- package/departments/landing/skills/copy-framework/SKILL.md +241 -0
- package/departments/landing/skills/copy-framework/references/copy-frameworks.md +344 -0
- package/departments/landing/skills/copy-framework/references/natural-transitions.md +272 -0
- package/departments/landing/skills/lead-magnet/SKILL.md +337 -0
- package/departments/landing/skills/lead-magnet/references/benchmarks.md +129 -0
- package/departments/landing/skills/lead-magnet/references/format-guide.md +196 -0
- package/departments/landing/skills/offer-create/SKILL.md +105 -8
- package/departments/landing/skills/offer-create/references/bonus-stacking.md +150 -0
- package/departments/landing/skills/offer-create/references/examples.md +215 -0
- package/departments/landing/skills/offer-create/references/guarantee-design.md +172 -0
- package/departments/landing/skills/offer-create/references/offer-anatomy.md +203 -0
- package/departments/landing/skills/offer-create/references/offer-formats.md +240 -0
- package/departments/landing/skills/offer-create/references/scarcity-urgency.md +175 -0
- package/departments/landing/skills/offer-create/references/value-equation.md +134 -0
- package/departments/landing/skills/optimize-page/SKILL.md +185 -4
- package/departments/landing/skills/optimize-page/references/experiments.md +248 -0
- package/departments/landing/skills/optimize-page/references/form.md +422 -0
- package/departments/landing/skills/page-architect/SKILL.md +373 -5
- package/departments/landing/skills/page-architect/references/mermaid-templates.md +216 -0
- package/departments/landing/skills/page-architect/references/navigation-patterns.md +305 -0
- package/departments/landing/skills/page-architect/references/site-type-templates.md +293 -0
- package/departments/landing/skills/popup-design/SKILL.md +481 -0
- package/departments/landing/skills/signup-optimize/SKILL.md +385 -0
- package/departments/marketing/SKILL.md +22 -1
- package/departments/marketing/agents/growth-marketing/lifecycle-marketer.yaml +74 -0
- package/departments/marketing/agents/growth-marketing/pr-partnerships.yaml +74 -0
- package/departments/marketing/agents/growth-marketing/product-marketer.yaml +78 -0
- package/departments/marketing/agents/marketing-director.yaml +1 -0
- package/departments/marketing/skills/ab-test/SKILL.md +322 -3
- package/departments/marketing/skills/ab-test/references/sample-size-guide.md +263 -0
- package/departments/marketing/skills/ab-test/references/test-templates.md +277 -0
- package/departments/marketing/skills/ad-creative/SKILL.md +451 -0
- package/departments/marketing/skills/ad-creative/references/creative-review-page.md +106 -0
- package/departments/marketing/skills/ad-creative/references/creative-roadmap.md +118 -0
- package/departments/marketing/skills/ad-creative/references/generative-tools.md +637 -0
- package/departments/marketing/skills/ad-creative/references/hook-system.md +115 -0
- package/departments/marketing/skills/ad-creative/references/imessage-video-ads.md +201 -0
- package/departments/marketing/skills/ad-creative/references/motion-video-ads.md +126 -0
- package/departments/marketing/skills/ad-creative/references/platform-specs.md +213 -0
- package/departments/marketing/skills/ad-creative/references/static-ad-templates.md +200 -0
- package/departments/marketing/skills/ai-seo/SKILL.md +520 -0
- package/departments/marketing/skills/ai-seo/references/citations-vs-recommendations.md +85 -0
- package/departments/marketing/skills/ai-seo/references/content-patterns.md +287 -0
- package/departments/marketing/skills/ai-seo/references/content-types.md +71 -0
- package/departments/marketing/skills/ai-seo/references/okf.md +104 -0
- package/departments/marketing/skills/ai-seo/references/platform-ranking-factors.md +154 -0
- package/departments/marketing/skills/analytics-report/SKILL.md +310 -1
- package/departments/marketing/skills/analytics-report/references/event-library.md +260 -0
- package/departments/marketing/skills/analytics-report/references/ga4-implementation.md +300 -0
- package/departments/marketing/skills/analytics-report/references/gtm-implementation.md +390 -0
- package/departments/marketing/skills/aso/SKILL.md +336 -0
- package/departments/marketing/skills/aso/references/apple-specs.md +107 -0
- package/departments/marketing/skills/aso/references/benchmarks.md +129 -0
- package/departments/marketing/skills/aso/references/google-play-specs.md +131 -0
- package/departments/marketing/skills/aso/references/report-template.md +213 -0
- package/departments/marketing/skills/aso/references/scoring-criteria.md +213 -0
- package/departments/marketing/skills/co-marketing/SKILL.md +316 -0
- package/departments/marketing/skills/cold-email/SKILL.md +80 -0
- package/departments/marketing/skills/cold-email/references/benchmarks.md +83 -0
- package/departments/marketing/skills/cold-email/references/follow-up-sequences.md +81 -0
- package/departments/marketing/skills/cold-email/references/frameworks.md +90 -0
- package/departments/marketing/skills/cold-email/references/personalization.md +79 -0
- package/departments/marketing/skills/cold-email/references/subject-lines.md +53 -0
- package/departments/marketing/skills/competitor-analysis/SKILL.md +262 -5
- package/departments/marketing/skills/competitor-analysis/references/content-architecture.md +271 -0
- package/departments/marketing/skills/competitor-analysis/references/templates.md +223 -0
- package/departments/marketing/skills/competitor-profile/SKILL.md +447 -0
- package/departments/marketing/skills/competitor-profile/references/templates.md +167 -0
- package/departments/marketing/skills/competitor-profile/references/tool-reference.md +179 -0
- package/departments/marketing/skills/content-strategy/SKILL.md +398 -0
- package/departments/marketing/skills/content-strategy/references/headless-cms.md +194 -0
- package/departments/marketing/skills/council/SKILL.md +185 -0
- package/departments/marketing/skills/council/references/advisor-template.md +51 -0
- package/departments/marketing/skills/council/references/advisors/alex-hormozi.md +43 -0
- package/departments/marketing/skills/council/references/advisors/ann-handley.md +43 -0
- package/departments/marketing/skills/council/references/advisors/april-dunford.md +41 -0
- package/departments/marketing/skills/council/references/advisors/byron-sharp.md +43 -0
- package/departments/marketing/skills/council/references/advisors/claude-hopkins.md +42 -0
- package/departments/marketing/skills/council/references/advisors/david-ogilvy.md +42 -0
- package/departments/marketing/skills/council/references/advisors/eugene-schwartz.md +42 -0
- package/departments/marketing/skills/council/references/advisors/gary-halbert.md +43 -0
- package/departments/marketing/skills/council/references/advisors/gary-vaynerchuk.md +43 -0
- package/departments/marketing/skills/council/references/advisors/rory-sutherland.md +42 -0
- package/departments/marketing/skills/council/references/advisors/russell-brunson.md +43 -0
- package/departments/marketing/skills/council/references/advisors/seth-godin.md +43 -0
- package/departments/marketing/skills/customer-research/SKILL.md +318 -0
- package/departments/marketing/skills/customer-research/references/source-guides.md +401 -0
- package/departments/marketing/skills/directory-submit/SKILL.md +409 -0
- package/departments/marketing/skills/directory-submit/references/directory-list.md +477 -0
- package/departments/marketing/skills/directory-submit/references/positioning-variations.md +232 -0
- package/departments/marketing/skills/directory-submit/references/submission-tracker-template.csv +266 -0
- package/departments/marketing/skills/email-sequence/SKILL.md +309 -2
- package/departments/marketing/skills/email-sequence/references/copy-guidelines.md +113 -0
- package/departments/marketing/skills/email-sequence/references/email-types.md +515 -0
- package/departments/marketing/skills/email-sequence/references/sequence-templates.md +168 -0
- package/departments/marketing/skills/free-tools/SKILL.md +203 -0
- package/departments/marketing/skills/free-tools/references/tool-types.md +217 -0
- package/departments/marketing/skills/marketing-ideas/SKILL.md +191 -0
- package/departments/marketing/skills/marketing-ideas/references/ideas-by-category.md +366 -0
- package/departments/marketing/skills/marketing-loops/SKILL.md +136 -0
- package/departments/marketing/skills/marketing-loops/references/loop-catalog.md +687 -0
- package/departments/marketing/skills/marketing-loops/references/loop-guardrails.md +73 -0
- package/departments/marketing/skills/marketing-loops/references/loop-orchestration.md +69 -0
- package/departments/marketing/skills/marketing-loops/references/loop-state.md +67 -0
- package/departments/marketing/skills/marketing-loops/references/loop-template.md +79 -0
- package/departments/marketing/skills/marketing-plan/SKILL.md +302 -0
- package/departments/marketing/skills/marketing-plan/references/aarrr-framework.md +180 -0
- package/departments/marketing/skills/marketing-plan/references/budget-planning.md +168 -0
- package/departments/marketing/skills/marketing-plan/references/client-types.md +373 -0
- package/departments/marketing/skills/marketing-plan/references/current-state-rubric.md +255 -0
- package/departments/marketing/skills/marketing-plan/references/example-quietude.md +972 -0
- package/departments/marketing/skills/marketing-plan/references/funding-stage-unlocks.md +230 -0
- package/departments/marketing/skills/marketing-plan/references/growth-patterns.md +148 -0
- package/departments/marketing/skills/marketing-plan/references/idea-cross-reference.md +265 -0
- package/departments/marketing/skills/marketing-plan/references/measurement-framework.md +213 -0
- package/departments/marketing/skills/marketing-plan/references/methodology.md +363 -0
- package/departments/marketing/skills/marketing-plan/references/ops-stack-mapping.md +197 -0
- package/departments/marketing/skills/marketing-plan/references/plan-template.md +494 -0
- package/departments/marketing/skills/marketing-plan/references/team-and-agency-model.md +278 -0
- package/departments/marketing/skills/marketing-psychology/SKILL.md +479 -0
- package/departments/marketing/skills/paid-campaign/SKILL.md +452 -3
- package/departments/marketing/skills/paid-campaign/references/abm-playbook.md +93 -0
- package/departments/marketing/skills/paid-campaign/references/ad-copy-templates.md +207 -0
- package/departments/marketing/skills/paid-campaign/references/audience-targeting.md +243 -0
- package/departments/marketing/skills/paid-campaign/references/b2b-paid-playbook.md +115 -0
- package/departments/marketing/skills/paid-campaign/references/conversion-tracking.md +361 -0
- package/departments/marketing/skills/paid-campaign/references/google-search-playbook.md +120 -0
- package/departments/marketing/skills/paid-campaign/references/linkedin-b2b-playbook.md +107 -0
- package/departments/marketing/skills/paid-campaign/references/meta-decision-system.md +143 -0
- package/departments/marketing/skills/paid-campaign/references/platform-setup-checklists.md +277 -0
- package/departments/marketing/skills/paid-campaign/references/rsa-output-spec.md +88 -0
- package/departments/marketing/skills/product-marketing/SKILL.md +141 -0
- package/departments/marketing/skills/programmatic-seo/SKILL.md +74 -3
- package/departments/marketing/skills/programmatic-seo/references/playbooks.md +308 -0
- package/departments/marketing/skills/public-relations/SKILL.md +167 -0
- package/departments/marketing/skills/public-relations/references/journalist-pitching.md +368 -0
- package/departments/marketing/skills/public-relations/references/media-outlets.md +207 -0
- package/departments/marketing/skills/public-relations/references/newsjacking.md +218 -0
- package/departments/marketing/skills/public-relations/references/press-platforms.md +188 -0
- package/departments/marketing/skills/schema-markup/SKILL.md +203 -0
- package/departments/marketing/skills/schema-markup/references/schema-examples.md +398 -0
- package/departments/marketing/skills/seo-audit/SKILL.md +470 -1
- package/departments/marketing/skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/departments/marketing/skills/seo-audit/references/international-seo.md +230 -0
- package/departments/marketing/skills/sms-campaign/SKILL.md +363 -0
- package/departments/marketing/skills/sms-campaign/references/compliance.md +202 -0
- package/departments/marketing/skills/sms-campaign/references/platforms.md +318 -0
- package/departments/marketing/skills/sms-campaign/references/sequence-templates.md +282 -0
- package/departments/marketing/skills/social-strategy/SKILL.md +414 -3
- package/departments/marketing/skills/social-strategy/references/carousel-frameworks.md +141 -0
- package/departments/marketing/skills/social-strategy/references/listening-sources-template.md +123 -0
- package/departments/marketing/skills/social-strategy/references/listening.md +283 -0
- package/departments/marketing/skills/social-strategy/references/platform-limits.md +110 -0
- package/departments/marketing/skills/social-strategy/references/platforms.md +170 -0
- package/departments/marketing/skills/social-strategy/references/post-templates.md +179 -0
- package/departments/marketing/skills/social-strategy/references/reverse-engineering.md +195 -0
- package/departments/marketing/skills/social-strategy/references/short-form-video.md +237 -0
- package/departments/marketing/squad.yaml +10 -1
- package/departments/marketing/tools/LICENSE +21 -0
- package/departments/marketing/tools/REGISTRY.md +590 -0
- package/departments/marketing/tools/clis/README.md +198 -0
- package/departments/marketing/tools/clis/activecampaign.js +435 -0
- package/departments/marketing/tools/clis/adobe-analytics.js +161 -0
- package/departments/marketing/tools/clis/ahrefs.js +192 -0
- package/departments/marketing/tools/clis/airops.js +163 -0
- package/departments/marketing/tools/clis/amplitude.js +182 -0
- package/departments/marketing/tools/clis/apollo.js +142 -0
- package/departments/marketing/tools/clis/beehiiv.js +245 -0
- package/departments/marketing/tools/clis/brevo.js +368 -0
- package/departments/marketing/tools/clis/buffer.js +260 -0
- package/departments/marketing/tools/clis/calendly.js +253 -0
- package/departments/marketing/tools/clis/clay.js +159 -0
- package/departments/marketing/tools/clis/clearbit.js +163 -0
- package/departments/marketing/tools/clis/close.js +232 -0
- package/departments/marketing/tools/clis/coupler.js +173 -0
- package/departments/marketing/tools/clis/crossbeam.js +193 -0
- package/departments/marketing/tools/clis/customer-io.js +205 -0
- package/departments/marketing/tools/clis/dataforseo.js +257 -0
- package/departments/marketing/tools/clis/demio.js +149 -0
- package/departments/marketing/tools/clis/dub.js +158 -0
- package/departments/marketing/tools/clis/exa.js +147 -0
- package/departments/marketing/tools/clis/g2.js +186 -0
- package/departments/marketing/tools/clis/ga4.js +194 -0
- package/departments/marketing/tools/clis/github-prospects.js +257 -0
- package/departments/marketing/tools/clis/google-ads.js +189 -0
- package/departments/marketing/tools/clis/google-search-console.js +166 -0
- package/departments/marketing/tools/clis/hotjar.js +167 -0
- package/departments/marketing/tools/clis/hunter.js +249 -0
- package/departments/marketing/tools/clis/instantly.js +270 -0
- package/departments/marketing/tools/clis/intercom.js +399 -0
- package/departments/marketing/tools/clis/keywords-everywhere.js +185 -0
- package/departments/marketing/tools/clis/kit.js +232 -0
- package/departments/marketing/tools/clis/klaviyo.js +348 -0
- package/departments/marketing/tools/clis/lemlist.js +221 -0
- package/departments/marketing/tools/clis/linkedin-ads.js +185 -0
- package/departments/marketing/tools/clis/livestorm.js +292 -0
- package/departments/marketing/tools/clis/mailchimp.js +220 -0
- package/departments/marketing/tools/clis/mention-me.js +161 -0
- package/departments/marketing/tools/clis/meta-ads.js +181 -0
- package/departments/marketing/tools/clis/mixpanel.js +248 -0
- package/departments/marketing/tools/clis/onesignal.js +241 -0
- package/departments/marketing/tools/clis/optimizely.js +233 -0
- package/departments/marketing/tools/clis/outreach.js +213 -0
- package/departments/marketing/tools/clis/paddle.js +385 -0
- package/departments/marketing/tools/clis/partnerstack.js +382 -0
- package/departments/marketing/tools/clis/pendo.js +221 -0
- package/departments/marketing/tools/clis/plausible.js +249 -0
- package/departments/marketing/tools/clis/postmark.js +375 -0
- package/departments/marketing/tools/clis/rankparse.js +196 -0
- package/departments/marketing/tools/clis/resend.js +370 -0
- package/departments/marketing/tools/clis/rewardful.js +160 -0
- package/departments/marketing/tools/clis/savvycal.js +223 -0
- package/departments/marketing/tools/clis/segment.js +192 -0
- package/departments/marketing/tools/clis/semrush.js +207 -0
- package/departments/marketing/tools/clis/sendgrid.js +211 -0
- package/departments/marketing/tools/clis/similarweb.js +214 -0
- package/departments/marketing/tools/clis/snov.js +237 -0
- package/departments/marketing/tools/clis/supermetrics.js +169 -0
- package/departments/marketing/tools/clis/tiktok-ads.js +190 -0
- package/departments/marketing/tools/clis/tolt.js +153 -0
- package/departments/marketing/tools/clis/trustpilot.js +276 -0
- package/departments/marketing/tools/clis/typeform.js +269 -0
- package/departments/marketing/tools/clis/wistia.js +301 -0
- package/departments/marketing/tools/clis/zapier.js +165 -0
- package/departments/marketing/tools/clis/zoominfo.js +223 -0
- package/departments/marketing/tools/composio/README.md +105 -0
- package/departments/marketing/tools/composio/marketing-tools.md +91 -0
- package/departments/marketing/tools/integrations/activecampaign.md +337 -0
- package/departments/marketing/tools/integrations/adobe-analytics.md +156 -0
- package/departments/marketing/tools/integrations/ahrefs.md +142 -0
- package/departments/marketing/tools/integrations/airops.md +128 -0
- package/departments/marketing/tools/integrations/amplitude.md +135 -0
- package/departments/marketing/tools/integrations/apollo.md +148 -0
- package/departments/marketing/tools/integrations/attentive.md +152 -0
- package/departments/marketing/tools/integrations/audiencetap.md +125 -0
- package/departments/marketing/tools/integrations/beehiiv.md +157 -0
- package/departments/marketing/tools/integrations/brevo.md +268 -0
- package/departments/marketing/tools/integrations/browserbase.md +111 -0
- package/departments/marketing/tools/integrations/buffer.md +138 -0
- package/departments/marketing/tools/integrations/calendly.md +161 -0
- package/departments/marketing/tools/integrations/clay.md +149 -0
- package/departments/marketing/tools/integrations/clearbit.md +142 -0
- package/departments/marketing/tools/integrations/close.md +191 -0
- package/departments/marketing/tools/integrations/cogny.md +153 -0
- package/departments/marketing/tools/integrations/composio.md +190 -0
- package/departments/marketing/tools/integrations/contentful.md +160 -0
- package/departments/marketing/tools/integrations/coupler.md +142 -0
- package/departments/marketing/tools/integrations/crossbeam.md +137 -0
- package/departments/marketing/tools/integrations/customer-io.md +187 -0
- package/departments/marketing/tools/integrations/dataforseo.md +165 -0
- package/departments/marketing/tools/integrations/demio.md +182 -0
- package/departments/marketing/tools/integrations/dub-co.md +160 -0
- package/departments/marketing/tools/integrations/exa.md +145 -0
- package/departments/marketing/tools/integrations/firecrawl.md +144 -0
- package/departments/marketing/tools/integrations/firehose.md +159 -0
- package/departments/marketing/tools/integrations/g2.md +179 -0
- package/departments/marketing/tools/integrations/ga4.md +126 -0
- package/departments/marketing/tools/integrations/github.md +182 -0
- package/departments/marketing/tools/integrations/gong.md +144 -0
- package/departments/marketing/tools/integrations/google-ads.md +159 -0
- package/departments/marketing/tools/integrations/google-search-console.md +147 -0
- package/departments/marketing/tools/integrations/heygen.md +126 -0
- package/departments/marketing/tools/integrations/hotjar.md +147 -0
- package/departments/marketing/tools/integrations/hubspot.md +178 -0
- package/departments/marketing/tools/integrations/hunter.md +90 -0
- package/departments/marketing/tools/integrations/hyperframes.md +180 -0
- package/departments/marketing/tools/integrations/instantly.md +104 -0
- package/departments/marketing/tools/integrations/intercom.md +292 -0
- package/departments/marketing/tools/integrations/introw.md +182 -0
- package/departments/marketing/tools/integrations/keywords-everywhere.md +207 -0
- package/departments/marketing/tools/integrations/kit.md +167 -0
- package/departments/marketing/tools/integrations/klaviyo.md +228 -0
- package/departments/marketing/tools/integrations/lemlist.md +110 -0
- package/departments/marketing/tools/integrations/linkedin-ads.md +164 -0
- package/departments/marketing/tools/integrations/livestorm.md +313 -0
- package/departments/marketing/tools/integrations/mailchimp.md +150 -0
- package/departments/marketing/tools/integrations/mention-me.md +160 -0
- package/departments/marketing/tools/integrations/meta-ads.md +147 -0
- package/departments/marketing/tools/integrations/mixpanel.md +137 -0
- package/departments/marketing/tools/integrations/nitrosend.md +113 -0
- package/departments/marketing/tools/integrations/onesignal.md +229 -0
- package/departments/marketing/tools/integrations/optimizely.md +171 -0
- package/departments/marketing/tools/integrations/outreach.md +172 -0
- package/departments/marketing/tools/integrations/paddle.md +212 -0
- package/departments/marketing/tools/integrations/partnerstack.md +222 -0
- package/departments/marketing/tools/integrations/pendo.md +208 -0
- package/departments/marketing/tools/integrations/plausible.md +177 -0
- package/departments/marketing/tools/integrations/plivo.md +140 -0
- package/departments/marketing/tools/integrations/posthog.md +151 -0
- package/departments/marketing/tools/integrations/postmark.md +234 -0
- package/departments/marketing/tools/integrations/postscript.md +126 -0
- package/departments/marketing/tools/integrations/rankparse.md +257 -0
- package/departments/marketing/tools/integrations/rb2b.md +110 -0
- package/departments/marketing/tools/integrations/resend.md +212 -0
- package/departments/marketing/tools/integrations/rewardful.md +147 -0
- package/departments/marketing/tools/integrations/salesforce.md +150 -0
- package/departments/marketing/tools/integrations/sanity.md +148 -0
- package/departments/marketing/tools/integrations/savvycal.md +181 -0
- package/departments/marketing/tools/integrations/segment.md +159 -0
- package/departments/marketing/tools/integrations/semrush.md +121 -0
- package/departments/marketing/tools/integrations/sendgrid.md +161 -0
- package/departments/marketing/tools/integrations/sequenzy.md +306 -0
- package/departments/marketing/tools/integrations/shopify.md +176 -0
- package/departments/marketing/tools/integrations/similarweb.md +150 -0
- package/departments/marketing/tools/integrations/snov.md +94 -0
- package/departments/marketing/tools/integrations/sparktoro.md +127 -0
- package/departments/marketing/tools/integrations/strapi.md +167 -0
- package/departments/marketing/tools/integrations/stripe.md +148 -0
- package/departments/marketing/tools/integrations/supermetrics.md +145 -0
- package/departments/marketing/tools/integrations/tiktok-ads.md +161 -0
- package/departments/marketing/tools/integrations/tolt.md +144 -0
- package/departments/marketing/tools/integrations/truelist.md +184 -0
- package/departments/marketing/tools/integrations/trustpilot.md +191 -0
- package/departments/marketing/tools/integrations/twilio.md +152 -0
- package/departments/marketing/tools/integrations/typeform.md +190 -0
- package/departments/marketing/tools/integrations/webflow.md +198 -0
- package/departments/marketing/tools/integrations/wistia.md +164 -0
- package/departments/marketing/tools/integrations/wordpress.md +175 -0
- package/departments/marketing/tools/integrations/zapier.md +244 -0
- package/departments/marketing/tools/integrations/zoominfo.md +191 -0
- package/departments/saas/SKILL.md +1 -0
- package/departments/saas/skills/churn-analysis/SKILL.md +421 -4
- package/departments/saas/skills/churn-analysis/references/cancel-flow-patterns.md +316 -0
- package/departments/saas/skills/churn-analysis/references/dunning-playbook.md +408 -0
- package/departments/saas/skills/launch-execute/SKILL.md +346 -4
- package/departments/saas/skills/onboarding-optimize/SKILL.md +218 -4
- package/departments/saas/skills/onboarding-optimize/references/experiments.md +258 -0
- package/departments/saas/skills/paywall-design/SKILL.md +256 -0
- package/departments/saas/skills/paywall-design/references/experiments.md +164 -0
- package/departments/saas/skills/pricing-strategy/SKILL.md +224 -0
- package/departments/saas/skills/pricing-strategy/references/research-methods.md +152 -0
- package/departments/saas/skills/pricing-strategy/references/tier-structure.md +232 -0
- package/departments/sales/SKILL.md +3 -0
- package/departments/sales/skills/prospecting/SKILL.md +297 -0
- package/departments/sales/skills/prospecting/references/b2b-prospecting.md +106 -0
- package/departments/sales/skills/prospecting/references/compliance.md +123 -0
- package/departments/sales/skills/prospecting/references/data-sources.md +287 -0
- package/departments/sales/skills/prospecting/references/demand-signals.md +129 -0
- package/departments/sales/skills/prospecting/references/local-prospecting.md +165 -0
- package/departments/sales/skills/prospecting/references/saas-prospecting.md +123 -0
- package/departments/sales/skills/revops/SKILL.md +379 -0
- package/departments/sales/skills/revops/references/automation-playbooks.md +290 -0
- package/departments/sales/skills/revops/references/lifecycle-definitions.md +278 -0
- package/departments/sales/skills/revops/references/routing-rules.md +203 -0
- package/departments/sales/skills/revops/references/scoring-models.md +247 -0
- package/departments/sales/skills/sales-enablement/SKILL.md +396 -0
- package/departments/sales/skills/sales-enablement/references/deck-frameworks.md +263 -0
- package/departments/sales/skills/sales-enablement/references/demo-scripts.md +355 -0
- package/departments/sales/skills/sales-enablement/references/objection-library.md +270 -0
- package/departments/sales/skills/sales-enablement/references/one-pager-templates.md +208 -0
- package/harness/codex/AGENTS.md +8 -8
- package/harness/copilot/copilot-instructions.md +8 -8
- package/harness/cursor/rules/arkaos.mdc +9 -9
- package/harness/gemini/GEMINI.md +8 -8
- package/harness/opencode/AGENTS.md +8 -8
- package/harness/zed/.rules +8 -8
- package/knowledge/agents-registry-v2.json +161 -8
- package/knowledge/commands-registry.json +693 -99
- package/knowledge/skills-manifest.json +459 -20
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/tools/evals_import.py +183 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const API_KEY = process.env.BREVO_API_KEY
|
|
4
|
+
const BASE_URL = 'https://api.brevo.com/v3'
|
|
5
|
+
|
|
6
|
+
if (!API_KEY) {
|
|
7
|
+
console.error(JSON.stringify({ error: 'BREVO_API_KEY environment variable required' }))
|
|
8
|
+
process.exit(1)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async function api(method, path, body) {
|
|
12
|
+
if (args['dry-run']) {
|
|
13
|
+
return { _dry_run: true, method, url: `${BASE_URL}${path}`, headers: { 'api-key': '***', 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: body || undefined }
|
|
14
|
+
}
|
|
15
|
+
const res = await fetch(`${BASE_URL}${path}`, {
|
|
16
|
+
method,
|
|
17
|
+
headers: {
|
|
18
|
+
'api-key': API_KEY,
|
|
19
|
+
'Content-Type': 'application/json',
|
|
20
|
+
'Accept': 'application/json',
|
|
21
|
+
},
|
|
22
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
23
|
+
})
|
|
24
|
+
const text = await res.text()
|
|
25
|
+
try {
|
|
26
|
+
return JSON.parse(text)
|
|
27
|
+
} catch {
|
|
28
|
+
return { status: res.status, body: text }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function parseArgs(args) {
|
|
33
|
+
const result = { _: [] }
|
|
34
|
+
for (let i = 0; i < args.length; i++) {
|
|
35
|
+
const arg = args[i]
|
|
36
|
+
if (arg.startsWith('--')) {
|
|
37
|
+
const key = arg.slice(2)
|
|
38
|
+
const next = args[i + 1]
|
|
39
|
+
if (next && !next.startsWith('--')) {
|
|
40
|
+
result[key] = next
|
|
41
|
+
i++
|
|
42
|
+
} else {
|
|
43
|
+
result[key] = true
|
|
44
|
+
}
|
|
45
|
+
} else {
|
|
46
|
+
result._.push(arg)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return result
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const args = parseArgs(process.argv.slice(2))
|
|
53
|
+
const [cmd, sub, ...rest] = args._
|
|
54
|
+
|
|
55
|
+
async function main() {
|
|
56
|
+
let result
|
|
57
|
+
const limit = args.limit ? Number(args.limit) : 50
|
|
58
|
+
const offset = args.offset ? Number(args.offset) : 0
|
|
59
|
+
|
|
60
|
+
switch (cmd) {
|
|
61
|
+
case 'account':
|
|
62
|
+
switch (sub) {
|
|
63
|
+
case 'get':
|
|
64
|
+
result = await api('GET', '/account')
|
|
65
|
+
break
|
|
66
|
+
default:
|
|
67
|
+
result = { error: 'Unknown account subcommand. Use: get' }
|
|
68
|
+
}
|
|
69
|
+
break
|
|
70
|
+
|
|
71
|
+
case 'contacts':
|
|
72
|
+
switch (sub) {
|
|
73
|
+
case 'list': {
|
|
74
|
+
const params = new URLSearchParams()
|
|
75
|
+
params.set('limit', String(limit))
|
|
76
|
+
params.set('offset', String(offset))
|
|
77
|
+
if (args.sort) params.set('sort', args.sort)
|
|
78
|
+
result = await api('GET', `/contacts?${params.toString()}`)
|
|
79
|
+
break
|
|
80
|
+
}
|
|
81
|
+
case 'get': {
|
|
82
|
+
const id = args.id || args.email
|
|
83
|
+
if (!id) { result = { error: '--id or --email required' }; break }
|
|
84
|
+
result = await api('GET', `/contacts/${encodeURIComponent(id)}`)
|
|
85
|
+
break
|
|
86
|
+
}
|
|
87
|
+
case 'create': {
|
|
88
|
+
const email = args.email
|
|
89
|
+
if (!email) { result = { error: '--email required' }; break }
|
|
90
|
+
const body = { email }
|
|
91
|
+
if (args['first-name'] || args['last-name']) {
|
|
92
|
+
body.attributes = {}
|
|
93
|
+
if (args['first-name']) body.attributes.FIRSTNAME = args['first-name']
|
|
94
|
+
if (args['last-name']) body.attributes.LASTNAME = args['last-name']
|
|
95
|
+
}
|
|
96
|
+
if (args['list-ids']) body.listIds = args['list-ids'].split(',').map(Number)
|
|
97
|
+
result = await api('POST', '/contacts', body)
|
|
98
|
+
break
|
|
99
|
+
}
|
|
100
|
+
case 'update': {
|
|
101
|
+
const id = args.id || args.email
|
|
102
|
+
if (!id) { result = { error: '--id or --email required' }; break }
|
|
103
|
+
const body = {}
|
|
104
|
+
if (args['first-name'] || args['last-name']) {
|
|
105
|
+
body.attributes = {}
|
|
106
|
+
if (args['first-name']) body.attributes.FIRSTNAME = args['first-name']
|
|
107
|
+
if (args['last-name']) body.attributes.LASTNAME = args['last-name']
|
|
108
|
+
}
|
|
109
|
+
if (args['list-ids']) body.listIds = args['list-ids'].split(',').map(Number)
|
|
110
|
+
if (args['unlink-list-ids']) body.unlinkListIds = args['unlink-list-ids'].split(',').map(Number)
|
|
111
|
+
result = await api('PUT', `/contacts/${encodeURIComponent(id)}`, body)
|
|
112
|
+
break
|
|
113
|
+
}
|
|
114
|
+
case 'delete': {
|
|
115
|
+
const id = args.id || args.email
|
|
116
|
+
if (!id) { result = { error: '--id or --email required' }; break }
|
|
117
|
+
result = await api('DELETE', `/contacts/${encodeURIComponent(id)}`)
|
|
118
|
+
break
|
|
119
|
+
}
|
|
120
|
+
case 'import': {
|
|
121
|
+
const emails = args.emails?.split(',')
|
|
122
|
+
if (!emails) { result = { error: '--emails required (comma-separated)' }; break }
|
|
123
|
+
const body = {
|
|
124
|
+
jsonBody: emails.map(e => ({ email: e.trim() })),
|
|
125
|
+
}
|
|
126
|
+
if (args['list-ids']) body.listIds = args['list-ids'].split(',').map(Number)
|
|
127
|
+
result = await api('POST', '/contacts/import', body)
|
|
128
|
+
break
|
|
129
|
+
}
|
|
130
|
+
default:
|
|
131
|
+
result = { error: 'Unknown contacts subcommand. Use: list, get, create, update, delete, import' }
|
|
132
|
+
}
|
|
133
|
+
break
|
|
134
|
+
|
|
135
|
+
case 'lists':
|
|
136
|
+
switch (sub) {
|
|
137
|
+
case 'list': {
|
|
138
|
+
const params = new URLSearchParams()
|
|
139
|
+
params.set('limit', String(limit))
|
|
140
|
+
params.set('offset', String(offset))
|
|
141
|
+
if (args.sort) params.set('sort', args.sort)
|
|
142
|
+
result = await api('GET', `/contacts/lists?${params.toString()}`)
|
|
143
|
+
break
|
|
144
|
+
}
|
|
145
|
+
case 'get': {
|
|
146
|
+
const id = args.id
|
|
147
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
148
|
+
result = await api('GET', `/contacts/lists/${id}`)
|
|
149
|
+
break
|
|
150
|
+
}
|
|
151
|
+
case 'create': {
|
|
152
|
+
const name = args.name
|
|
153
|
+
if (!name) { result = { error: '--name required' }; break }
|
|
154
|
+
const body = { name, folderId: args.folder ? Number(args.folder) : 1 }
|
|
155
|
+
result = await api('POST', '/contacts/lists', body)
|
|
156
|
+
break
|
|
157
|
+
}
|
|
158
|
+
case 'update': {
|
|
159
|
+
const id = args.id
|
|
160
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
161
|
+
const body = {}
|
|
162
|
+
if (args.name) body.name = args.name
|
|
163
|
+
if (args.folder) body.folderId = Number(args.folder)
|
|
164
|
+
result = await api('PUT', `/contacts/lists/${id}`, body)
|
|
165
|
+
break
|
|
166
|
+
}
|
|
167
|
+
case 'delete': {
|
|
168
|
+
const id = args.id
|
|
169
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
170
|
+
result = await api('DELETE', `/contacts/lists/${id}`)
|
|
171
|
+
break
|
|
172
|
+
}
|
|
173
|
+
case 'contacts': {
|
|
174
|
+
const id = args.id
|
|
175
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
176
|
+
const params = new URLSearchParams()
|
|
177
|
+
params.set('limit', String(limit))
|
|
178
|
+
params.set('offset', String(offset))
|
|
179
|
+
result = await api('GET', `/contacts/lists/${id}/contacts?${params.toString()}`)
|
|
180
|
+
break
|
|
181
|
+
}
|
|
182
|
+
case 'add-contacts': {
|
|
183
|
+
const id = args.id
|
|
184
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
185
|
+
const emails = args.emails?.split(',')
|
|
186
|
+
if (!emails) { result = { error: '--emails required (comma-separated)' }; break }
|
|
187
|
+
result = await api('POST', `/contacts/lists/${id}/contacts/add`, { emails })
|
|
188
|
+
break
|
|
189
|
+
}
|
|
190
|
+
case 'remove-contacts': {
|
|
191
|
+
const id = args.id
|
|
192
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
193
|
+
const emails = args.emails?.split(',')
|
|
194
|
+
if (!emails) { result = { error: '--emails required (comma-separated)' }; break }
|
|
195
|
+
result = await api('POST', `/contacts/lists/${id}/contacts/remove`, { emails })
|
|
196
|
+
break
|
|
197
|
+
}
|
|
198
|
+
default:
|
|
199
|
+
result = { error: 'Unknown lists subcommand. Use: list, get, create, update, delete, contacts, add-contacts, remove-contacts' }
|
|
200
|
+
}
|
|
201
|
+
break
|
|
202
|
+
|
|
203
|
+
case 'email':
|
|
204
|
+
switch (sub) {
|
|
205
|
+
case 'send': {
|
|
206
|
+
const senderEmail = args.from
|
|
207
|
+
const to = args.to
|
|
208
|
+
const subject = args.subject
|
|
209
|
+
if (!senderEmail) { result = { error: '--from required' }; break }
|
|
210
|
+
if (!to) { result = { error: '--to required' }; break }
|
|
211
|
+
if (!subject) { result = { error: '--subject required' }; break }
|
|
212
|
+
const body = {
|
|
213
|
+
sender: { email: senderEmail },
|
|
214
|
+
to: to.split(',').map(e => ({ email: e.trim() })),
|
|
215
|
+
subject,
|
|
216
|
+
}
|
|
217
|
+
if (args['sender-name']) body.sender.name = args['sender-name']
|
|
218
|
+
if (args.html) body.htmlContent = args.html
|
|
219
|
+
if (args.text) body.textContent = args.text
|
|
220
|
+
if (!args.html && !args.text) body.textContent = ''
|
|
221
|
+
if (args['reply-to']) body.replyTo = { email: args['reply-to'] }
|
|
222
|
+
if (args.tags) body.tags = args.tags.split(',')
|
|
223
|
+
result = await api('POST', '/smtp/email', body)
|
|
224
|
+
break
|
|
225
|
+
}
|
|
226
|
+
default:
|
|
227
|
+
result = { error: 'Unknown email subcommand. Use: send' }
|
|
228
|
+
}
|
|
229
|
+
break
|
|
230
|
+
|
|
231
|
+
case 'campaigns':
|
|
232
|
+
switch (sub) {
|
|
233
|
+
case 'list': {
|
|
234
|
+
const params = new URLSearchParams()
|
|
235
|
+
params.set('limit', String(limit))
|
|
236
|
+
params.set('offset', String(offset))
|
|
237
|
+
if (args.type) params.set('type', args.type)
|
|
238
|
+
if (args.status) params.set('status', args.status)
|
|
239
|
+
if (args.sort) params.set('sort', args.sort)
|
|
240
|
+
result = await api('GET', `/emailCampaigns?${params.toString()}`)
|
|
241
|
+
break
|
|
242
|
+
}
|
|
243
|
+
case 'get': {
|
|
244
|
+
const id = args.id
|
|
245
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
246
|
+
result = await api('GET', `/emailCampaigns/${id}`)
|
|
247
|
+
break
|
|
248
|
+
}
|
|
249
|
+
case 'create': {
|
|
250
|
+
const name = args.name
|
|
251
|
+
if (!name) { result = { error: '--name required' }; break }
|
|
252
|
+
const body = {
|
|
253
|
+
name,
|
|
254
|
+
sender: { email: args.from || '' },
|
|
255
|
+
subject: args.subject || '',
|
|
256
|
+
}
|
|
257
|
+
if (args['sender-name']) body.sender.name = args['sender-name']
|
|
258
|
+
if (args.html) body.htmlContent = args.html
|
|
259
|
+
if (args['list-ids']) body.recipients = { listIds: args['list-ids'].split(',').map(Number) }
|
|
260
|
+
result = await api('POST', '/emailCampaigns', body)
|
|
261
|
+
break
|
|
262
|
+
}
|
|
263
|
+
case 'update': {
|
|
264
|
+
const id = args.id
|
|
265
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
266
|
+
const body = {}
|
|
267
|
+
if (args.name) body.name = args.name
|
|
268
|
+
if (args.subject) body.subject = args.subject
|
|
269
|
+
if (args.html) body.htmlContent = args.html
|
|
270
|
+
result = await api('PUT', `/emailCampaigns/${id}`, body)
|
|
271
|
+
break
|
|
272
|
+
}
|
|
273
|
+
case 'delete': {
|
|
274
|
+
const id = args.id
|
|
275
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
276
|
+
result = await api('DELETE', `/emailCampaigns/${id}`)
|
|
277
|
+
break
|
|
278
|
+
}
|
|
279
|
+
case 'send-now': {
|
|
280
|
+
const id = args.id
|
|
281
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
282
|
+
result = await api('POST', `/emailCampaigns/${id}/sendNow`)
|
|
283
|
+
break
|
|
284
|
+
}
|
|
285
|
+
case 'send-test': {
|
|
286
|
+
const id = args.id
|
|
287
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
288
|
+
const emails = args.emails?.split(',')
|
|
289
|
+
if (!emails) { result = { error: '--emails required (comma-separated)' }; break }
|
|
290
|
+
result = await api('POST', `/emailCampaigns/${id}/sendTest`, { emailTo: emails })
|
|
291
|
+
break
|
|
292
|
+
}
|
|
293
|
+
default:
|
|
294
|
+
result = { error: 'Unknown campaigns subcommand. Use: list, get, create, update, delete, send-now, send-test' }
|
|
295
|
+
}
|
|
296
|
+
break
|
|
297
|
+
|
|
298
|
+
case 'sms':
|
|
299
|
+
switch (sub) {
|
|
300
|
+
case 'send': {
|
|
301
|
+
const sender = args.from
|
|
302
|
+
const recipient = args.to
|
|
303
|
+
const content = args.content
|
|
304
|
+
if (!sender) { result = { error: '--from required (sender name)' }; break }
|
|
305
|
+
if (!recipient) { result = { error: '--to required (phone number)' }; break }
|
|
306
|
+
if (!content) { result = { error: '--content required' }; break }
|
|
307
|
+
result = await api('POST', '/transactionalSMS/sms', {
|
|
308
|
+
sender,
|
|
309
|
+
recipient,
|
|
310
|
+
content,
|
|
311
|
+
type: args.type || 'transactional',
|
|
312
|
+
})
|
|
313
|
+
break
|
|
314
|
+
}
|
|
315
|
+
case 'campaigns': {
|
|
316
|
+
const params = new URLSearchParams()
|
|
317
|
+
params.set('limit', String(limit))
|
|
318
|
+
params.set('offset', String(offset))
|
|
319
|
+
if (args.status) params.set('status', args.status)
|
|
320
|
+
result = await api('GET', `/smsCampaigns?${params.toString()}`)
|
|
321
|
+
break
|
|
322
|
+
}
|
|
323
|
+
default:
|
|
324
|
+
result = { error: 'Unknown sms subcommand. Use: send, campaigns' }
|
|
325
|
+
}
|
|
326
|
+
break
|
|
327
|
+
|
|
328
|
+
case 'senders':
|
|
329
|
+
switch (sub) {
|
|
330
|
+
case 'list':
|
|
331
|
+
result = await api('GET', '/senders')
|
|
332
|
+
break
|
|
333
|
+
case 'create': {
|
|
334
|
+
const name = args.name
|
|
335
|
+
const email = args.email
|
|
336
|
+
if (!name) { result = { error: '--name required' }; break }
|
|
337
|
+
if (!email) { result = { error: '--email required' }; break }
|
|
338
|
+
result = await api('POST', '/senders', { name, email })
|
|
339
|
+
break
|
|
340
|
+
}
|
|
341
|
+
default:
|
|
342
|
+
result = { error: 'Unknown senders subcommand. Use: list, create' }
|
|
343
|
+
}
|
|
344
|
+
break
|
|
345
|
+
|
|
346
|
+
default:
|
|
347
|
+
result = {
|
|
348
|
+
error: 'Unknown command',
|
|
349
|
+
usage: {
|
|
350
|
+
account: 'account [get]',
|
|
351
|
+
contacts: 'contacts [list | get --email <email> | create --email <email> | update --email <email> | delete --email <email> | import --emails <e1,e2>]',
|
|
352
|
+
lists: 'lists [list | get --id <id> | create --name <name> | delete --id <id> | contacts --id <id> | add-contacts --id <id> --emails <e1,e2> | remove-contacts --id <id> --emails <e1,e2>]',
|
|
353
|
+
email: 'email [send --from <from> --to <to> --subject <subj>]',
|
|
354
|
+
campaigns: 'campaigns [list | get --id <id> | create --name <name> | send-now --id <id> | send-test --id <id> --emails <e1,e2>]',
|
|
355
|
+
sms: 'sms [send --from <name> --to <phone> --content <msg> | campaigns]',
|
|
356
|
+
senders: 'senders [list | create --name <name> --email <email>]',
|
|
357
|
+
options: '--limit <n> --offset <n> --status <status>',
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
console.log(JSON.stringify(result, null, 2))
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
main().catch(err => {
|
|
366
|
+
console.error(JSON.stringify({ error: err.message }))
|
|
367
|
+
process.exit(1)
|
|
368
|
+
})
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const API_KEY = process.env.BUFFER_API_KEY
|
|
4
|
+
const BASE_URL = 'https://api.bufferapp.com/1'
|
|
5
|
+
|
|
6
|
+
if (!API_KEY) {
|
|
7
|
+
console.error(JSON.stringify({ error: 'BUFFER_API_KEY environment variable required' }))
|
|
8
|
+
process.exit(1)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async function api(method, path, body) {
|
|
12
|
+
const headers = {
|
|
13
|
+
'Authorization': `Bearer ${API_KEY}`,
|
|
14
|
+
'Accept': 'application/json',
|
|
15
|
+
}
|
|
16
|
+
if (body && method !== 'GET') {
|
|
17
|
+
headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
18
|
+
}
|
|
19
|
+
if (args['dry-run']) {
|
|
20
|
+
return { _dry_run: true, method, url: `${BASE_URL}${path}`, headers: { ...headers, 'Authorization': '***' }, body: body || undefined }
|
|
21
|
+
}
|
|
22
|
+
const res = await fetch(`${BASE_URL}${path}`, {
|
|
23
|
+
method,
|
|
24
|
+
headers,
|
|
25
|
+
body: body ? new URLSearchParams(body).toString() : undefined,
|
|
26
|
+
})
|
|
27
|
+
const text = await res.text()
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(text)
|
|
30
|
+
} catch {
|
|
31
|
+
return { status: res.status, body: text }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function apiJson(method, path, body) {
|
|
36
|
+
if (args['dry-run']) {
|
|
37
|
+
return { _dry_run: true, method, url: `${BASE_URL}${path}`, headers: { 'Authorization': '***', 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: body || undefined }
|
|
38
|
+
}
|
|
39
|
+
const res = await fetch(`${BASE_URL}${path}`, {
|
|
40
|
+
method,
|
|
41
|
+
headers: {
|
|
42
|
+
'Authorization': `Bearer ${API_KEY}`,
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
'Accept': 'application/json',
|
|
45
|
+
},
|
|
46
|
+
body: body ? JSON.stringify(body) : undefined,
|
|
47
|
+
})
|
|
48
|
+
const text = await res.text()
|
|
49
|
+
try {
|
|
50
|
+
return JSON.parse(text)
|
|
51
|
+
} catch {
|
|
52
|
+
return { status: res.status, body: text }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function parseArgs(args) {
|
|
57
|
+
const result = { _: [] }
|
|
58
|
+
for (let i = 0; i < args.length; i++) {
|
|
59
|
+
const arg = args[i]
|
|
60
|
+
if (arg.startsWith('--')) {
|
|
61
|
+
const key = arg.slice(2)
|
|
62
|
+
const next = args[i + 1]
|
|
63
|
+
if (next && !next.startsWith('--')) {
|
|
64
|
+
result[key] = next
|
|
65
|
+
i++
|
|
66
|
+
} else {
|
|
67
|
+
result[key] = true
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
result._.push(arg)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return result
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const args = parseArgs(process.argv.slice(2))
|
|
77
|
+
const [cmd, sub, ...rest] = args._
|
|
78
|
+
|
|
79
|
+
async function main() {
|
|
80
|
+
let result
|
|
81
|
+
|
|
82
|
+
switch (cmd) {
|
|
83
|
+
case 'user':
|
|
84
|
+
switch (sub) {
|
|
85
|
+
case 'info':
|
|
86
|
+
result = await api('GET', '/user.json')
|
|
87
|
+
break
|
|
88
|
+
case 'deauthorize':
|
|
89
|
+
result = await api('POST', '/user/deauthorize.json')
|
|
90
|
+
break
|
|
91
|
+
default:
|
|
92
|
+
result = { error: 'Unknown user subcommand. Use: info, deauthorize' }
|
|
93
|
+
}
|
|
94
|
+
break
|
|
95
|
+
|
|
96
|
+
case 'profiles':
|
|
97
|
+
switch (sub) {
|
|
98
|
+
case 'list':
|
|
99
|
+
result = await api('GET', '/profiles.json')
|
|
100
|
+
break
|
|
101
|
+
case 'get': {
|
|
102
|
+
const id = args.id
|
|
103
|
+
if (!id) { result = { error: '--id required' }; break }
|
|
104
|
+
result = await api('GET', `/profiles/${id}.json`)
|
|
105
|
+
break
|
|
106
|
+
}
|
|
107
|
+
case 'schedules': {
|
|
108
|
+
const id = args.id
|
|
109
|
+
if (!id) { result = { error: '--id required (profile ID)' }; break }
|
|
110
|
+
result = await api('GET', `/profiles/${id}/schedules.json`)
|
|
111
|
+
break
|
|
112
|
+
}
|
|
113
|
+
default:
|
|
114
|
+
result = { error: 'Unknown profiles subcommand. Use: list, get, schedules' }
|
|
115
|
+
}
|
|
116
|
+
break
|
|
117
|
+
|
|
118
|
+
case 'updates':
|
|
119
|
+
switch (sub) {
|
|
120
|
+
case 'get': {
|
|
121
|
+
const id = args.id
|
|
122
|
+
if (!id) { result = { error: '--id required (update ID)' }; break }
|
|
123
|
+
result = await api('GET', `/updates/${id}.json`)
|
|
124
|
+
break
|
|
125
|
+
}
|
|
126
|
+
case 'pending': {
|
|
127
|
+
const id = args.id
|
|
128
|
+
if (!id) { result = { error: '--id required (profile ID)' }; break }
|
|
129
|
+
const params = new URLSearchParams()
|
|
130
|
+
if (args.page) params.set('page', args.page)
|
|
131
|
+
if (args.count) params.set('count', args.count)
|
|
132
|
+
if (args.since) params.set('since', args.since)
|
|
133
|
+
const qs = params.toString() ? `?${params.toString()}` : ''
|
|
134
|
+
result = await api('GET', `/profiles/${id}/updates/pending.json${qs}`)
|
|
135
|
+
break
|
|
136
|
+
}
|
|
137
|
+
case 'sent': {
|
|
138
|
+
const id = args.id
|
|
139
|
+
if (!id) { result = { error: '--id required (profile ID)' }; break }
|
|
140
|
+
const params = new URLSearchParams()
|
|
141
|
+
if (args.page) params.set('page', args.page)
|
|
142
|
+
if (args.count) params.set('count', args.count)
|
|
143
|
+
if (args.since) params.set('since', args.since)
|
|
144
|
+
const qs = params.toString() ? `?${params.toString()}` : ''
|
|
145
|
+
result = await api('GET', `/profiles/${id}/updates/sent.json${qs}`)
|
|
146
|
+
break
|
|
147
|
+
}
|
|
148
|
+
case 'create': {
|
|
149
|
+
const profileIds = args['profile-ids']
|
|
150
|
+
const text = args.text
|
|
151
|
+
if (!profileIds) { result = { error: '--profile-ids required (comma-separated)' }; break }
|
|
152
|
+
if (!text) { result = { error: '--text required' }; break }
|
|
153
|
+
const body = { text }
|
|
154
|
+
profileIds.split(',').forEach(id => {
|
|
155
|
+
if (!body['profile_ids[]']) body['profile_ids[]'] = []
|
|
156
|
+
})
|
|
157
|
+
const formBody = new URLSearchParams()
|
|
158
|
+
formBody.append('text', text)
|
|
159
|
+
profileIds.split(',').forEach(id => formBody.append('profile_ids[]', id.trim()))
|
|
160
|
+
if (args['scheduled-at']) formBody.append('scheduled_at', args['scheduled-at'])
|
|
161
|
+
if (args.now) formBody.append('now', 'true')
|
|
162
|
+
if (args.top) formBody.append('top', 'true')
|
|
163
|
+
if (args.shorten) formBody.append('shorten', 'true')
|
|
164
|
+
if (args['dry-run']) {
|
|
165
|
+
result = { _dry_run: true, method: 'POST', url: `${BASE_URL}/updates/create.json`, headers: { 'Authorization': '***', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json' }, body: formBody.toString() }
|
|
166
|
+
break
|
|
167
|
+
}
|
|
168
|
+
const res = await fetch(`${BASE_URL}/updates/create.json`, {
|
|
169
|
+
method: 'POST',
|
|
170
|
+
headers: {
|
|
171
|
+
'Authorization': `Bearer ${API_KEY}`,
|
|
172
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
173
|
+
'Accept': 'application/json',
|
|
174
|
+
},
|
|
175
|
+
body: formBody.toString(),
|
|
176
|
+
})
|
|
177
|
+
const resText = await res.text()
|
|
178
|
+
try { result = JSON.parse(resText) } catch { result = { status: res.status, body: resText } }
|
|
179
|
+
break
|
|
180
|
+
}
|
|
181
|
+
case 'update': {
|
|
182
|
+
const id = args.id
|
|
183
|
+
const text = args.text
|
|
184
|
+
if (!id) { result = { error: '--id required (update ID)' }; break }
|
|
185
|
+
if (!text) { result = { error: '--text required' }; break }
|
|
186
|
+
const body = { text }
|
|
187
|
+
if (args['scheduled-at']) body.scheduled_at = args['scheduled-at']
|
|
188
|
+
result = await api('POST', `/updates/${id}/update.json`, body)
|
|
189
|
+
break
|
|
190
|
+
}
|
|
191
|
+
case 'share': {
|
|
192
|
+
const id = args.id
|
|
193
|
+
if (!id) { result = { error: '--id required (update ID)' }; break }
|
|
194
|
+
result = await api('POST', `/updates/${id}/share.json`)
|
|
195
|
+
break
|
|
196
|
+
}
|
|
197
|
+
case 'destroy': {
|
|
198
|
+
const id = args.id
|
|
199
|
+
if (!id) { result = { error: '--id required (update ID)' }; break }
|
|
200
|
+
result = await api('POST', `/updates/${id}/destroy.json`)
|
|
201
|
+
break
|
|
202
|
+
}
|
|
203
|
+
case 'reorder': {
|
|
204
|
+
const id = args.id
|
|
205
|
+
const order = args.order
|
|
206
|
+
if (!id) { result = { error: '--id required (profile ID)' }; break }
|
|
207
|
+
if (!order) { result = { error: '--order required (comma-separated update IDs)' }; break }
|
|
208
|
+
const formBody = new URLSearchParams()
|
|
209
|
+
order.split(',').forEach(uid => formBody.append('order[]', uid.trim()))
|
|
210
|
+
if (args['dry-run']) {
|
|
211
|
+
result = { _dry_run: true, method: 'POST', url: `${BASE_URL}/profiles/${id}/updates/reorder.json`, headers: { 'Authorization': '***', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json' }, body: formBody.toString() }
|
|
212
|
+
break
|
|
213
|
+
}
|
|
214
|
+
const res = await fetch(`${BASE_URL}/profiles/${id}/updates/reorder.json`, {
|
|
215
|
+
method: 'POST',
|
|
216
|
+
headers: {
|
|
217
|
+
'Authorization': `Bearer ${API_KEY}`,
|
|
218
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
219
|
+
'Accept': 'application/json',
|
|
220
|
+
},
|
|
221
|
+
body: formBody.toString(),
|
|
222
|
+
})
|
|
223
|
+
const resText = await res.text()
|
|
224
|
+
try { result = JSON.parse(resText) } catch { result = { status: res.status, body: resText } }
|
|
225
|
+
break
|
|
226
|
+
}
|
|
227
|
+
case 'shuffle': {
|
|
228
|
+
const id = args.id
|
|
229
|
+
if (!id) { result = { error: '--id required (profile ID)' }; break }
|
|
230
|
+
result = await api('POST', `/profiles/${id}/updates/shuffle.json`)
|
|
231
|
+
break
|
|
232
|
+
}
|
|
233
|
+
default:
|
|
234
|
+
result = { error: 'Unknown updates subcommand. Use: get, pending, sent, create, update, share, destroy, reorder, shuffle' }
|
|
235
|
+
}
|
|
236
|
+
break
|
|
237
|
+
|
|
238
|
+
case 'info':
|
|
239
|
+
result = await api('GET', '/info/configuration.json')
|
|
240
|
+
break
|
|
241
|
+
|
|
242
|
+
default:
|
|
243
|
+
result = {
|
|
244
|
+
error: 'Unknown command',
|
|
245
|
+
usage: {
|
|
246
|
+
user: 'user [info | deauthorize]',
|
|
247
|
+
profiles: 'profiles [list | get --id <id> | schedules --id <id>]',
|
|
248
|
+
updates: 'updates [get --id <id> | pending --id <profile-id> | sent --id <profile-id> | create --profile-ids <ids> --text <text> [--scheduled-at <time>] [--now] | update --id <id> --text <text> | share --id <id> | destroy --id <id> | reorder --id <profile-id> --order <id1,id2> | shuffle --id <profile-id>]',
|
|
249
|
+
info: 'info',
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
console.log(JSON.stringify(result, null, 2))
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
main().catch(err => {
|
|
258
|
+
console.error(JSON.stringify({ error: err.message }))
|
|
259
|
+
process.exit(1)
|
|
260
|
+
})
|