AML Support for VS Code 🪄
A VS Code extension to design database schemas using AML, a simple DSL that speed your design by 2x ✨
🌟 Features
- Syntax highlight, error reporting and suggestions for AML code (
.aml
files)
- AML rename and symbol navigation
- convert AML to PostgreSQL, JSON, DOT, Mermaid, Markdown (Command Palette)
- convert SQL and JSON to AML (Command Palette)
- Open any AML file in Azimutt
💡 Usage
- Create an empty
.aml
file or use command: AML: New database schema (ERD)
(suggests samples)
- Write your schema using AML, use suggestions (
Ctrl+Space
) or check documentation if needed
Here is how AML looks:
users
id uuid pk
name varchar index
email varchar unique
role user_role(admin, guest)=guest
posts | store all posts
id uuid pk
title varchar
content text | allow markdown formatting
author uuid -> users(id) # inline relation
created_at timestamp=`now()`
📋 Roadmap
Any idea, suggestion or issue? Let us know.
🤝 Issues & Contributing
If you have any issue or bug, please create an issue.
If you want to improve this extension, feel free to reach out or submit a pull request.
🛠️ Development
VS Code language extensions are made of several and quite independent part.
For general knowledge, look at the extension documentation and more specifically the language extension overview.
Here are the different parts of this extension:
Tips:
- Debug extension via F5 (Run Web Extension)
- Relaunch the extension from the debug toolbar after changing code in
src/web/extension.ts
- Reload (
Ctrl+R
or Cmd+R
on Mac) the VS Code window with your extension to load your changes
If you need to develop on multiple libs at the same time, depend on local libs but publish & revert before commit.
- Remove published lib & depend on local one, ex:
npm uninstall @azimutt/aml && npm install ../../libs/aml
- Publish lib locally by building it:
npm run build
- Then publish it on npm
- And finally add it back, ex:
npm uninstall @azimutt/aml && npm install @azimutt/aml
🚀 Publication
Publish extension on the VS Code marketplace:
- Update
package.json
version and CHANGELOG.md
- Package the extension:
vsce package
- Publish the extension:
vsce publish
Tips:
- Install vsce with
npm install -g @vscode/vsce
- Get Personal Access Token from azimutt
- Manage extension from the marketplace