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
| Command | Description |
|---|---|
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 login | Authenticate for cloud features |
aexol update | Update CLI to latest version |
aexol help | Show 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
| Method | Purpose |
|---|---|
initialize | Start session and negotiate capabilities |
ping | Health check |
tools/list | List available remote tools |
tools/call | Execute 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
| Tool | Purpose |
|---|---|
remote_ingest_cloud_document | Upload document to cloud knowledge base |
remote_cloud_search | Search knowledge base chunks |
remote_list_cloud_documents | List cloud documents |
remote_start_from | Generate Aexol from source content |
remote_refine_aexol_content | Refine Aexol content |
remote_start_inference | Start artifact generation task |
remote_get_inference_task | Retrieve inference task result |
remote_refine_inference_artifact | Refine generated artifact |
remote_set_context | Set 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
- Go to Aexol Studio
- Navigate to Team settings → API Keys
- Click Create new key
- Copy the key (format:
sk-aexol-team-...)
See Also
- Agent Overview — Spectral coding agent
- Studio Overview — Browser-based IDE
- API Reference — Programmatic API