复制安装命令
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
Give any AI agent a secure command line to your growth stack.
用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。
复制前请先查看来源、License 和安全提示。
来源文件:README.md
Give any AI agent a secure command line to your growth stack.
Query marketing data, manage campaigns, publish SEO content, and automate
recurring work from Claude Code, Codex, Cursor, or any terminal.
Website · Agent guide · npm · Contributing
Soku CLI turns the tools and data already connected to your Soku workspace into typed, discoverable commands. An agent can move from a question to an answer—or from a plan to a human-approved action—without you copying data between tabs, sharing API keys, or running an MCP host.
soku call as a forward-compatible
escape hatch.Paste this into Claude Code, Codex, Cursor, or another coding agent:
Read https://soku.ai/cli/skill.md, install or update Soku CLI, sign in,
select my workspace, and install all business skills.
The agent guide walks the agent through installation, device login, workspace selection, skill installation, and a first capability check.
# Install globally (Node.js 20+)
npm install -g @soku-ai/cli
# Sign in with the browser-based device flow
soku auth login
# Find and select a Soku brand workspace
soku workspace resolve <brand>
soku workspace use-brand <brand>
soku workspace status
# See everything available to you
soku --help
No global install needed? Start with npx @soku-ai/cli --help.
Start with cached, normalized reporting across supported ad platforms:
soku ads list-ad-accounts --platform google
soku ads query-single-dimension \
--platform google \
--account-id <account_id> \
--dimension campaign \
--date-start 2026-06-01 \
--date-end 2026-06-30
Use the same workflow for Meta, TikTok, or ChatGPT Ads, or reach for Google Ads GAQL when you need a custom breakdown.
# Website acquisition and conversion
soku ga4 list-properties
soku ga4 get-property-overview --property-id <property_id>
soku ga4 list-traffic-sources --property-id <property_id>
# Product behavior
soku posthog list-projects
soku posthog query \
--project-id <project_id> \
--tool execute-sql \
--arguments '{"query":"SELECT count() FROM events WHERE event = '\''$pageview'\''"}'
This makes it possible for an agent to investigate the path from campaign spend to site traffic to in-product behavior without asking you to export CSV files.
soku ads meta campaign create \
--account-id <meta_account_id> \
--name "Launch Test" \
--objective OUTCOME_TRAFFIC \
--summary "Create paused Meta traffic campaign Launch Test"
Delivery-changing writes return a review ID instead of executing immediately:
soku review show <review_id>
soku review approve <review_id>
An agent can prepare the exact change and explain it; a human still decides whether it runs.
# Publish a complete HTML page through Soku SEO Hosting
soku seo-hosting pages put \
--section blog \
--slug launch-notes \
--title "Launch notes" \
--html-file page.html
soku seo-hosting pages publish --section blog --slug launch-notes
# Schedule a recurring agent task
soku automation create \
--name "Weekly account health" \
--prompt "Review paid acquisition performance and flag anomalies" \
--cron "0 9 * * 1" \
--timezone America/Los_Angeles
# Add source material to the workspace Context Hub
soku context upload ./campaign-brief.pdf --dir research
In a non-interactive shell, every command returns a predictable JSON envelope:
{"ok":true,"data":{"...":"..."}}
Errors use the same shape and a non-zero exit code:
{"ok":false,"error":{"code":"...","message":"..."}}
Install Soku's agent skills to give your agent the workflows and guardrails behind the commands—not just their names:
soku skill install --all --global
soku skill list
soku skill status
The bundled meta skill is available at skills/soku/SKILL.md.
| Area | Start here | Typical use |
|---|---|---|
| Authentication | soku auth --help | Sign in, sign out, and check session state |
| Workspace | soku workspace --help | Resolve and switch organization/brand context |
| Advertising | soku ads --help | Query reporting data and prepare reviewed writes |
| Analytics | soku ga4 --help, soku posthog --help | Analyze acquisition, conversion, and product behavior |
| SEO Hosting | soku seo-hosting --help | Stage, publish, and manage SEO pages and domains |
| Automations | soku automation --help | Schedule and inspect recurring agent work |
| Context Hub | soku context --help | Organize files an agent can use as context |
| Secure egress | soku egress --help | Call supported third-party APIs without exposing keys |
| Reviews | soku review --help | Inspect and decide on gated operations |
| Skills | soku skill --help | Install and update Soku workflows for AI agents |
Run soku <namespace> <action> --help before an unfamiliar call. Typed command
names use kebab-case; raw capability names used with soku call use snake_case.
The CLI talks to Soku over /api/cli/*; it does not require an MCP host. Its
typed commands are generated from
src/generated/capabilities.json, which is
synced automatically from the Soku backend. Do not edit that file by hand.
If a newly released capability does not yet have an ergonomic typed command, you can still discover it and call it directly:
soku call ads list_ad_accounts -p platform=google
soku call <namespace> <action> --help
pnpm install
pnpm typecheck
pnpm test
pnpm build
The project is TypeScript with ESM and NodeNext module resolution. Tests are
colocated as *.test.ts files and run with Node's built-in test runner.
keytar is optional; when it is unavailable, credential storage falls back to
a file-backed store.
Issues and pull requests are welcome. Read CONTRIBUTING.md and our Code of Conduct before contributing. Please use SECURITY.md to report security issues.
MIT © About Intelligence
name: soku
description: >-
Use when calling Soku CLI capabilities from a shell: auth, workspace
selection, ads/GA4/PostHog data reads, typed ads writes, SEO Hosting,
automations, Context Hub files, migrating context or project files from
Claude, temporary file publishing, brand skills, third-party egress,
review-gated writes, skill installation, or CLI updates.
license: MIT
metadata:
author: About Intelligence
version: "0.4"The soku CLI is the shell-native way for an AI agent to use Soku from Claude
Code, Codex, Cursor, or any terminal. It talks to Soku over /api/cli/*; no MCP
host is required. Treat this file as the router. Load the relevant reference
file before acting on a detailed workflow.
Read only the reference files needed for the user's task:
| Task | Read |
|---|---|
| First-time setup, expired token, workspace selection, org/brand ambiguity | references/auth-workspace.md |
Ads, GA4, or PostHog reads; raw soku call; command discovery | references/data-capabilities.md and references/capability-flow.md |
| Meta/Google/ChatGPT Ads writes, uploads, bulk create, review-gated approval | references/ads-write.md |
| SEO Hosting, automations, Context Hub files, temporary public file URLs | references/seo-automation-files.md |
| Third-party APIs through server-side credential injection; security rules | references/egress-security.md |
| Installing, updating, or removing Soku-managed local skills | references/skills-updates.md |
| Migrate context, project files, or workspaces from Claude into Soku | Run soku skill install migrate-from-claude, then read the installed soku-migrate-from-claude skill. |
For an installed business skill such as soku-ads-report, read that skill too.
Business skills carry their own "Running this skill with the Soku CLI" section.
soku auth status
soku workspace status
If auth is missing or expired, use the agent split-flow from
references/auth-workspace.md.
If the workspace is not ready, resolve and select the remote Soku brand:
soku workspace resolve <brand>
soku workspace use-brand <brand>
Pick the reference for the task. Do not infer Soku org/brand from the current local repo directory.
Inspect command help before unfamiliar calls:
soku --help
soku <namespace> --help
soku <namespace> <action> --help
{"ok":true,"data":...} and errors are {"ok":false,"error":...}.soku egress -- curl ... for covered third-party APIs.soku review approve <id> yourself after showing the user the diff/summary;
that confirmation prompt is the human gate. Never allowlist or auto-approve
soku review approve/deny, and never approve a write the user has not seen.
If your harness runs commands without per-command human confirmation, do NOT
self-approve — surface the review_id for the user to run.AGENTS.md, or context/ folders for Soku
workspace state unless the user explicitly asks about local files.| Exit | Meaning | What to do |
|---|---|---|
| 0 | Success | Parse data. |
| 1 | Usage or no workspace | Fix args, or run soku workspace status / use-brand. |
| 2 | Auth missing, expired, or revoked | Run soku auth login --no-wait. |
| 4 | Not found or unknown capability | Re-check soku --help / soku <ns> --help. |
| 5 | Runtime or network failure | Retry if transient; if behind a proxy set ALL_PROXY. |
Typed command names are kebab-case:
soku ads query-single-dimension --help
Raw soku call action names use registry snake_case:
soku call ads query_single_dimension --payload '{"account_id":"123","dimension":"campaign"}'
Prefer typed commands when they exist. Use soku call only as a forward-compatible
escape hatch for a newer action or an action not yet exposed ergonomically.
The bundled CLI meta skill is named soku. Business skills are installed with a
Soku prefix, for example soku-ads-report and soku-google-ads.
soku skill list
soku skill install ads-report google-ads
soku skill status
When asking an AI client to invoke a business skill, write
use @soku-ads-report skill, not @ads-report.
soku update skills refreshes the bundled soku meta skill and every installed
Soku-managed business skill recorded in .soku-skills.json. It also refreshes
legacy meta-only installs that have soku/SKILL.md but no manifest, so older
installations receive this references/ directory.
soku update cli also silently refreshes an already-installed global soku
meta skill as an npm postinstall side effect. Its JSON result carries
mustRereadMetaSkill: true plus metaSkillRefreshed: [<paths>] when that
happened. After running soku update cli, check that field: if true, re-read
this file (and references/) from the listed path before continuing — do not
keep acting on this session's previously loaded copy of this skill.
评论 (0)
暂无评论,成为第一个评论者吧!