@socketdocs/cli
v0.1.1
Published
The command-line interface for **SocketDocs**. Use it to initialize, generate, and visualize your WebSocket API documentation.
Readme
@socketdocs/cli
The command-line interface for SocketDocs. Use it to initialize, generate, and visualize your WebSocket API documentation.
📦 Installation
# Global installation (recommended for CLI use)
npm install -g @socketdocs/cli
# Local installation as devDependency
npm install -D @socketdocs/cli🚀 Getting Started
Initialize SocketDocs in your project:
socketdocs initThis creates a socketdocs.config.json file where you can specify your contract entry point and other settings.
🛠️ Commands
socketdocs init
Sets up the project configuration and a basic documentation structure.
socketdocs generate
Scans your contract and generates a JSON specification file.
socketdocs generate --output ./docs/spec.jsonsocketdocs serve
Launches a local development server with a UI to visualize your WebSocket API documentation in real-time.
socketdocs serve --spec ./docs/spec.json --port 4000📄 Configuration
A typical socketdocs.config.json:
{
"entry": "./src/contract.ts",
"output": "./docs/socketdocs.json",
"title": "My Realtime API",
"version": "1.0.0"
}⚖️ License
MIT
