| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
TypeScript + Node.js 24.14.0 CLI starter. The default artifact is a normal Node CLI bundle, and SEA is kept as an optional packaging path.
npm run bootstrap
npm run dev -- --help
npm run build
npm run start -- doctor --json
npm test
npm run sea
npm run sea -- --target linux-x64 --target win-x64
npm run sea -- --allsrc/
cli/ command parsing and process wiring
core/ reusable runtime logic
ui/ terminal UI layer
scripts/ build and optional SEA packaging scripts
tests/ subprocess-level CLI testsRun npm run bootstrap after cloning the repository. It checks the local Node.js version, installs dependencies, and runs the full project check.
zcode plugins are local bundles that can contribute skills, custom commands, and MCP servers.
Plugin state lives under ~/.zcode/cli/plugins:
This repository also ships built-in official plugins as workspace packages. The bundled Browser Use, Document Skills, Skill Creator, and ZCode Guide content plugins are default-enabled and appear as browser-use@zcode-plugins-official, document-skills@zcode-plugins-official, skill-creator@zcode-plugins-official, and zcode-guide@zcode-plugins-official. Runtime-heavy official plugins, and local-data migration plugins such as ios-simulator@zcode-plugins-official, android-emulator@zcode-plugins-official, and restore-legacy-sessions@zcode-plugins-official, are discovered by zcode but stay disabled until the user enables them.
zcode plugins list
zcode plugins enable ios-simulator
zcode plugins disable browser-use
zcode plugins enable restore-legacy-sessions
zcode plugins disable ios-simulatorFor local plugin development, put the plugin in any directory, then add it to the user config. Local plugin dirs default to enabled for that config.
{
"plugins": {
"enabled": true,
"dirs": ["/absolute/path/to/my-plugin"]
}
}MCP config can live directly in .zcode-plugin/plugin.json through mcpServers. A plugin may provide both .mcp.json and manifest mcpServers; when the same server name appears in both places, mcpServers from the selected manifest wins.
Supported fields in the current zcode plugin surface:
Example .zcode-plugin/plugin.json with inline MCP config:
{
"name": "ios-simulator",
"version": "0.1.0",
"skills": "skills",
"commands": "commands",
"mcpServers": {
"ios-simulator": {
"command": "node",
"args": ["${ZCODE_PLUGIN_ROOT}/dist/mcp/server.js"],
"cwd": "${ZCODE_PROJECT_DIR}",
"env": {
"PLUGIN_DATA": "${ZCODE_PLUGIN_DATA}",
"DEFAULT_DEVICE": "${user_config.default_device}"
}
}
},
"userConfig": {
"default_device": {
"type": "string",
"default": "iPhone 16"
}
}
}Plugin MCP config can use these variable names:
Only environment variables with the ZCODE_ prefix are expanded. Missing variables disable the affected MCP server and produce a plugin diagnostic.
my-plugin/
.zcode-plugin/plugin.json
.mcp.json
skills/
my-skill/SKILL.md
commands/
my-command.md
src/For MCP servers, prefer Node's normal package build and bin output when targeting zcode-cli, and keep all process/file/network side effects inside the MCP server boundary.
zcode reads MCP servers from the main JSON config. The default user config path is ~/.zcode/cli/config.json; MCP entries live under mcp.servers. MCP is enabled by default, so features.mcp only needs to be set when you want an explicit on/off switch. The current CLI does not auto-discover standalone mcp.json or .mcp.json files outside enabled plugins.
{
"features": {
"mcp": true
},
"mcp": {
"servers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"cwd": ".",
"timeoutMs": 30000
},
"docs": {
"type": "http",
"url": "https://mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer <token>"
}
},
"legacy-sse": {
"type": "sse",
"url": "https://mcp.example.com/sse",
"enabled": false
}
}
}
}Supported server types:
MCP tools are registered before the first model request and exposed as mcp__<server>__<tool>. Use /mcp list, /mcp status, /mcp connect <server>, and /mcp disconnect <server> inside the CLI to inspect or manage configured servers for the current session.
zcode reads hooks from the same main JSON config file as MCP, usually ~/.zcode/cli/config.json. Hooks are disabled by default; set hooks.enabled to true and add process hooks under hooks.events.
Supported hook events:
Example:
{
"hooks": {
"enabled": true,
"timeoutMs": 60000,
"maxOutputBytes": 32768,
"events": {
"SessionStart": [
{
"matcher": "startup|resume",
"hooks": [
{
"type": "process",
"command": "node",
"args": ["./scripts/session-start-hook.mjs"]
}
]
}
],
"PreToolUse": [
{
"matcher": "^(Bash|Write|Edit)$",
"hooks": [
{
"type": "process",
"command": "node",
"args": ["./scripts/pre-tool-hook.mjs"],
"timeoutMs": 5000
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "process",
"command": "node",
"args": ["./scripts/stop-hook.mjs"]
}
]
}
]
}
}
}Configuration shape:
Each process hook receives one JSON hook input on stdin and may print one JSON object to stdout. Empty stdout is treated as no-op. Non-JSON stdout, schema-invalid stdout, timeouts, and non-zero exits other than exit code 2 are recorded as hook failures and do not crash the turn by default. Exit code 2 is treated as an explicit block/deny request.
Common stdout examples:
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"additionalContext": "Use the internal API migration checklist for this repository."
}
}{
"continue": false,
"reason": "Do not run destructive shell commands in this workspace.",
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": "Blocked by project hook."
}
}{
"continue": true,
"hookSpecificOutput": {
"hookEventName": "Stop",
"additionalContext": "Before finalizing, verify that the answer mentions test coverage."
}
}| Back | FazBrowse Home | New Git URL |