@spayse/cli
v0.3.3
Published
Interactive terminal interface for Spayse to create, list, and modify architecture diagrams from your command line.
Maintainers
Readme
@spayse/cli
Interactive terminal interface for Spayse to create, list, and modify architecture diagrams from your command line.

What it is
Spayse is a precision canvas for technical diagrams that lets you build and modify system architecture, API flows, and databases using natural language. The Spayse CLI brings this power directly into your terminal, allowing developers to generate, list, update, and export diagrams interactively or programmatically without leaving their workspace.
Quick Start
npx @spayse/cli login
# then just run:
npx @spayse/cliInstallation
Run via npx (Recommended)
Use npx if you want to run the CLI on demand without polluting your global node modules:
npx @spayse/cli [options] [prompt]Install globally
Use global installation if you use Spayse frequently and want the shorthand spayse command available everywhere in your terminal:
# Install globally
npm install -g @spayse/cli
# Run anywhere
spayseCommands / Usage
CLI Commands and Options
| Command / Option | Description |
| :--- | :--- |
| spayse | Starts the interactive REPL shell in your current directory. |
| spayse login | Connects your terminal session to your Spayse account. |
| spayse whoami | Displays details of the currently authenticated account and credits. |
| spayse logout | Disconnects your Spayse account and removes local credentials. |
| spayse <prompt> | Creates a new diagram from a natural language prompt. |
| -u, --update <id> | Modifies an existing diagram by its ID or filename. |
| -o, --output <path> | Specifies the output file path for the diagram. |
| -l, --list | Lists all Spayse diagram files in the current folder. |
| -V, --validate <dsl> | Validates the syntax of a Spayse DSL string. |
| --version | Displays the installed CLI version. |
| --help | Shows the command line help message. |
REPL Interactive Slash Commands
When inside the interactive REPL shell, you can use these slash commands:
| Slash Command | Description |
| :--- | :--- |
| <prompt> | Generates a new diagram or updates the active one using natural language. |
| /update [id] | Modifies the active diagram (or a specific diagram by ID). |
| /export [format] | Exports the active diagram to png, svg, pdf, dsl, or json. |
| /validate | Validates the current diagram's DSL for errors. |
| /open | Opens the active diagram in your web browser. |
| /list | Lists all .spy files in the current directory. |
| /whoami | Displays account details and remaining credit balance. |
| /login | Starts the authentication flow to link your account. |
| /logout | Clears your local authentication credentials. |
| /clear | Clears all text and logs from the terminal screen. |
| /exit | Exits the interactive REPL shell. |
Configuration
| Name | Description | Default / Location |
| :--- | :--- | :--- |
| ~/.spayse/auth.json | Local configuration file storing your authentication credentials. | Saved automatically on login |
| SPAYSE_API_KEY | Developer API key for headless authentication (bypasses browser login). | None |
| SPAYSE_APP_URL | Override target URL for the Spayse server. | https://spayse.app |
Authentication Modes
We support three authentication options to fit your workflow:
- Interactive OAuth (Default): Run
spayse loginin your terminal to link your account using a standard browser authentication flow. - API Key: Generate a key in your developer settings dashboard and authenticate without browser interaction.
- Headless / CI: Pass your credentials securely using environment variables for automated environments.
For step by step setup guidelines, please check the @spayse/mcp documentation.
Feature Tiers
| Feature / Limit | Free Tier | Pro Tier | | :--- | :--- | :--- | | Generation Limit | 5 diagrams per month | Unlimited | | Preview Image | Watermarked SVG | Clean, High-Res SVG | | Share Link | Not returned (Private only) | Direct shareable public link | | Web Editor Link | Included | Included |
Related Packages
- @spayse/mcp - Model Context Protocol (MCP) server to integrate Spayse directly into AI editors like Cursor, Windsurf, or Claude Desktop.
Links
License
MIT
