Tooling Commands
Developer tooling: IDE integration, shell completions, and AI agent integration.
ide setup
archetect ide setup
Sets up IDE support for authoring Lua archetypes:
-
Installs Lua type annotations (
archetect.luaandarchetect_modules.lua) into the Archetect data directory:~/.local/share/archetect/lua/annotations. These give lua-language-server (LuaLS) autocompletion and type checking for thearchetect.*API. -
Creates a
.luarc.jsonin the current directory if it looks like a Lua archetype — i.e. it contains both an archetype manifest (archetype.yaml,archetype.yml,archetect.yaml, orarchetect.yml) and anarchetype.lua. The generated file sets the Lua runtime to 5.4 and pointsworkspace.libraryat the installed annotations:{"runtime.version": "Lua 5.4","workspace.library": ["/home/jane/.local/share/archetect/lua/annotations"]}The write is idempotent: if an existing
.luarc.jsonis byte-identical, nothing happens; if it is missing or differs (for example, the annotations directory moved), it is rewritten. A manifest without anarchetype.luaskips the.luarc.jsonstep with a notice.
Run it once per machine to install annotations, and again inside each archetype
directory you author. archetect check reports whether the
annotations are installed.
completions
archetect completions <shell>
Generates a shell completion script on stdout.
| Argument | Values |
|---|---|
<shell> | bash, elvish, fish, powershell, zsh |
# bash
archetect completions bash > ~/.local/share/bash-completion/completions/archetect
# zsh (put on your fpath)
archetect completions zsh > "${fpath[1]}/_archetect"
# fish
archetect completions fish > ~/.config/fish/completions/archetect.fish
mcp
archetect mcp
Starts an MCP (Model Context Protocol) server on stdio, exposing Archetect to AI agents such as Claude Code. This is not meant to be run interactively — configure it in your agent's MCP server settings:
{
"mcpServers": {
"archetect": {
"command": "archetect",
"args": ["mcp"]
}
}
}
In MCP mode, the shell execution policy is forced to Forbidden — archetypes cannot execute commands, and there is no flag or environment variable to override this.