CLI & Tooling

The Aexol CLI provides commands for parsing, validating, and working with Aexol specifications. Plus LSP support for editors and MCP integration for AI assistants.

Installation

npm install -g @aexol/spectral

Requires Node.js 20 or newer. Both aexol and spectral commands become available.

CLI Commands

CommandDescription
aexol parse <file>Parse an Aexol file and display AST structure
aexol validate <file>Validate syntax and semantic structure
aexol analyze <file>Generate detailed analysis report
aexol docs <file> [-o output.md]Generate Markdown documentation
aexol lsp [--info|--stdio]Language Server Protocol for editors
aexol auth loginAuthenticate for cloud features
aexol updateUpdate CLI to latest version
aexol helpShow all commands

Examples

# Parse and validate
aexol parse app.aexol
aexol validate app.aexol

# Analyze structure
aexol analyze app.aexol

# Generate documentation
aexol docs app.aexol -o API.md

Spectral Agent

The Spectral coding agent is an always-on AI that runs on your machine:

# Start the agent relay
spectral serve

# Local TUI mode (no relay, terminal-only)
spectral

Once spectral serve is running, open the Agent page in your browser, pick your machine, and start chatting. The agent can read/write files, execute shell commands, and search your codebase.

See the Agent documentation for full details.


LSP — Editor Integration

Aexol includes a Language Server Protocol server for any LSP-compatible editor.

Start LSP Server

aexol lsp --stdio
aexol lsp --info

VS Code

Install the Aexol extension from the VS Code marketplace for syntax highlighting, autocomplete, and error checking.

Neovim

require('lspconfig').aexol.setup{
  cmd = { 'aexol', 'lsp', '--stdio' },
  filetypes = { 'aexol' },
}

Other Editors

Any editor with LSP support can use aexol lsp --stdio. See the LSP documentation for your editor.


Remote MCP — AI Integration

Connect AI assistants to Aexol via the backend MCP endpoint.

Endpoint

https://api.aexol.ai/mcp

Authentication

Authorization: Bearer sk-aexol-team-...
Content-Type: application/json

JSON-RPC Methods

MethodPurpose
initializeStart session and negotiate capabilities
pingHealth check
tools/listList available remote tools
tools/callExecute a remote tool

Claude Code Setup

claude mcp add --transport http aexol https://api.aexol.ai/mcp \
  --header "Authorization: Bearer sk-aexol-team-..."

GitHub Copilot CLI

~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "aexol": {
      "type": "http",
      "url": "https://api.aexol.ai/mcp",
      "headers": {
        "Authorization": "Bearer sk-aexol-team-..."
      }
    }
  }
}

Cursor / Windsurf / Other IDEs

Add as an MCP provider with:

  • URL: https://api.aexol.ai/mcp
  • Header: Authorization: Bearer sk-aexol-team-...

Remote MCP Tools

ToolPurpose
remote_ingest_cloud_documentUpload document to cloud knowledge base
remote_cloud_searchSearch knowledge base chunks
remote_list_cloud_documentsList cloud documents
remote_start_fromGenerate Aexol from source content
remote_refine_aexol_contentRefine Aexol content
remote_start_inferenceStart artifact generation task
remote_get_inference_taskRetrieve inference task result
remote_refine_inference_artifactRefine generated artifact
remote_set_contextSet default team/project context

Quick Test

# Health check
curl -s -X POST "https://api.aexol.ai/mcp" \
  -H "Authorization: Bearer sk-aexol-team-..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"ping"}'

# List tools
curl -s -X POST "https://api.aexol.ai/mcp" \
  -H "Authorization: Bearer sk-aexol-team-..." \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

Model Provider Setup

Set up API keys for AI-powered features:

# For Claude models
export ANTHROPIC_API_KEY=sk-ant-...

# For GPT models
export OPENAI_API_KEY=sk-...

# For Gemini models
export GOOGLE_API_KEY=...

Or use the built-in Spectral model at https://api.aexol.ai/v1 with model name built-in/spectral and your team API key.


Getting a Team API Key

  1. Go to Aexol Studio
  2. Navigate to Team settingsAPI Keys
  3. Click Create new key
  4. Copy the key (format: sk-aexol-team-...)

See Also