saycoder
v0.1.4
Published
SayCoder setup helper for OpenCode models, MCP servers, and skills.
Readme
saycoder
A small CLI that configures OpenCode to use SayCoder as the model layer, plus practical third-party MCP servers and lightweight coding skills.
Setup flow
- Checks whether
opencodeis installed. - If missing, asks whether to install it with
npm install -g opencode-ai --foreground-scripts --verbose --loglevel verbose. - Optionally enables China mirror optimization, measures available mirrors, and lets the user choose with arrow keys or number input on Windows.
- Installs OpenCode and verifies
opencode --versionbefore continuing. - Prompts the user for a SayCoder API key.
- Validates the key with
GET https://jstapi.xinbai.icu/v1/models. - Uses the returned model list to populate OpenCode provider models.
- Writes OpenCode config and installs lightweight SayCoder skills.
- Tells the user to choose a model and start coding.
MCP defaults
context7: official remote MCP athttps://mcp.context7.com/mcpfor current docs.time: optional local MCP via--time-mcpanduvx mcp-server-timefor current time and timezone conversion.tavily: optional remote web search MCP when--tavily-api-keyis provided.exa: optional remote web/code search MCP when--exa-api-keyis provided and Tavily is not set.
SayCoder's base URL is only used for the OpenAI-compatible model channel, not for MCP hosting.
China mirror
When OpenCode is missing, setup asks whether to install through China mirror optimization. If enabled, it measures common npm mirrors and lets you choose one with arrow keys, or number input on Windows/non-TTY terminals. Mirror probes use the package metadata endpoint and fall back from HEAD to GET for registries that reject HEAD.
If OpenCode installation or verification fails, setup stops before writing OpenCode config and prints the npm exit code, any npm spawn error, a detected npm debug log path when npm reports one, and the manual install command. You can also force it with:
node bin/saycoder.js setup --npm-registry https://registry.npmmirror.comWindows PowerShell troubleshooting
If automatic opencode-ai installation fails on Windows, rerun the printed command in a fresh PowerShell window as the same user. For example:
npm install -g opencode-ai --foreground-scripts --verbose --loglevel verbose --registry https://registry.npmmirror.comThen check the npm debug log shown by saycoder or the newest log under your npm cache _logs directory. After a successful manual install, close and reopen PowerShell so the global npm bin path is refreshed, verify with opencode --version, then run npx saycoder again.
Installed skills
saycoder-lite-superpowers: clarify user intent, split logical goals, implement production code, and report completed/not completed work.saycoder-code-review: lightweight production-readiness review before handoff.saycoder-test-check: choose and report the smallest meaningful verification.
Local test
node bin/saycoder.js setup --dry-run --skip-install-check --skip-validate --api-key test-keyDry-run output redacts API keys and other token-like fields.
Intended usage
npx saycoderYou can also pass options directly:
npx saycoder --npm-registry https://registry.npmmirror.com