JOS Language Support for VS Code

Full language support for .jos files in Visual Studio Code — the JOSFOX Open Standard configuration format.

Features
🎨 Syntax Highlighting
Rich color coding for JOS-specific constructs:
- Keywords (
version, type, name, config)
- Types (
guardian, foxtail, engine, schema, platform)
- Special variables (
$ref, $type, $version)
- Guardian names (
caishen, shield, toth, zataz)
🔍 Real-time Validation
Instant feedback as you type:
- YAML syntax validation
- Required field checks (
version, type)
- Type-specific validation rules
- Helpful warnings and suggestions
📝 Code Snippets
Quick templates for common patterns:
guardian - Create a new guardian configuration
foxtail - Create a new foxtail service
schema - Create a new schema definition
engine - Create a new engine workflow
platform - Create a new platform configuration
tenants - Create a new tenants configuration
⚡ CLI Integration
Run commands directly from VS Code:
- JOS: Validate Current File - Manually validate the active file
- JOS: Serve - Start the JOS development server
- JOS: Open Home Page - Learn about the .jos format
- JOS: Initialize New Project - Create a new JOS project
- JOS: Build Project - Build the current project
🏠 Interactive Home Page
Built-in documentation explaining:
- What is the .jos format
- Available file types
- Code examples
- Quick start guide
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X)
- Search for "JOS Language Support"
- Click Install
From VSIX File
code --install-extension jos-language-support-1.0.0.vsix
Configuration
Configure the extension in your VS Code settings:
{
"jos.validation.enabled": true,
"jos.validation.schemaPath": "",
"jos.cli.josctlPath": "josctl",
"jos.cli.josServePath": "jos"
}
| Setting |
Default |
Description |
jos.validation.enabled |
true |
Enable real-time validation |
jos.validation.schemaPath |
"" |
Custom schema file path |
jos.cli.josctlPath |
"josctl" |
Path to josctl executable |
jos.cli.josServePath |
"jos" |
Path to jos CLI executable |
Usage
Creating a New JOS File
- Create a file with
.jos extension
- Start typing a snippet prefix (e.g.,
guardian)
- Press
Tab to expand the snippet
- Fill in the placeholders
Validating Files
- Files are validated automatically as you type
- Check the Problems panel for errors and warnings
- Use
Ctrl+Shift+P → "JOS: Validate" for manual validation
Using CLI Commands
- Open Command Palette (
Ctrl+Shift+P)
- Type "JOS" to see available commands
- Select a command to execute
JOS File Types
| Type |
Description |
Example |
guardian |
Security and compliance modules |
shield.guardian.jos |
foxtail |
Nano-service definitions |
api-service.jos |
engine |
Workflow orchestrations |
onboarding.engine.jos |
schema |
Data type definitions |
user.schema.jos |
platform |
Platform configurations |
orchid.platform.jos |
pipeline |
CI/CD pipelines |
deploy.pipeline.jos |
tenants |
Multi-tenant configurations |
tenants.jos |
Development
Prerequisites
- Node.js 18+
- VS Code 1.85+
Building
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode
npm run watch
Testing
# Run extension in development mode
# Press F5 in VS Code to launch Extension Development Host
# Run tests
npm run test
Packaging
# Create VSIX package
npm run package
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
License
MIT © JOSFOX
Made with 💜 by the JOSFOX Team