Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zondax/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Zondax CLI
A comprehensive CLI tool for Zondax development workflows, featuring infrastructure management, CI/CD integration, and TypeScript refactoring tools.
Installation
npm install -g @zondax/cli
# or
npx @zondax/cli@latestCommands
Infrastructure Management (infra)
cloudsql- Cloud SQL Proxy managementdevpod- Development pod managementkubeconfig- Kubernetes configuration managementimages- Container image managementonboard- Developer onboarding tools
CI/CD Integration (ci)
checkout- GitHub App authentication and checkout
Environment Management (env)
- Environment variable management using GCP Secret Manager
Model Context Protocol (mcp)
ts-server- TypeScript MCP server for refactoring tools
MCP TypeScript Server
The MCP TypeScript server provides advanced refactoring capabilities through the Model Context Protocol, enabling AI assistants like Claude to perform sophisticated TypeScript operations.
Usage
# Start the TypeScript MCP server
npx @zondax/cli@latest mcp ts-server
# With custom project path
npx @zondax/cli@latest mcp ts-server -p /path/to/your/project
# With verbose logging
npx @zondax/cli@latest mcp ts-server -v
# With file watching
npx @zondax/cli@latest mcp ts-server -wAvailable MCP Tools
The TypeScript MCP server exposes the following tools:
rename_symbol
Rename a symbol (variable, function, class, etc.) across the entire codebase.
Parameters:
filePath: Path to the file containing the symbolposition: Character position of the symbol in the filenewName: New name for the symbol
extract_function
Extract selected code into a new function.
Parameters:
filePath: Path to the file containing the codestartPosition: Start position of the code to extractendPosition: End position of the code to extractfunctionName: Name for the new function
move_declaration
Move a declaration (function, class, interface) to another file.
Parameters:
sourceFilePath: Path to the source filetargetFilePath: Path to the target filedeclarationName: Name of the declaration to move
find_references
Find all references to a symbol across the codebase.
Parameters:
filePath: Path to the file containing the symbolposition: Character position of the symbol in the file
analyze_imports
Analyze import statements for unused imports and optimization opportunities.
Parameters:
filePath: Path to specific file (optional - analyzes all files if not provided)optimize: Whether to automatically optimize imports
get_project_info
Get information about the TypeScript project structure.
Parameters: None
Integration with AI Assistants
The MCP TypeScript server can be integrated with AI assistants like Claude by configuring the MCP client to connect to the server's stdio interface. This enables the AI to perform complex refactoring operations with full TypeScript AST analysis.
Example MCP Client Configuration
{
"mcpServers": {
"zondax-typescript": {
"command": "npx",
"args": ["@zondax/cli@latest", "mcp", "ts-server", "-p", "/path/to/project"],
"env": {}
}
}
}Development
Prerequisites
- Node.js 20+
- Bun 1.1+
- TypeScript 5.8+
Setup
bun installTesting
bun testCode Quality
bun run check # Format and lint
bun run lint # Lint only
bun run format # Format onlyArchitecture
The CLI follows a modular command structure:
src/cmd/- Command definitions grouped by functionalitysrc/lib/- Shared utilities and librariessrc/main.ts- Main entry point using Commander.js
Key Libraries
- Commander.js - CLI framework
- ts-morph - TypeScript AST manipulation
- @modelcontextprotocol/sdk - MCP server implementation
- Biome - Code formatting and linting
- Vitest - Testing framework
License
UNLICENSED - Proprietary to Zondax AG