Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

About

djLint plugins for AI coding agents: Claude Code, Codex, GitHub Copilot CLI, Gemini CLI and OpenCode get lint findings on the HTML templates they edit, and an Agent Skill covers the rest. Django, Jinja, Twig, Nunjucks, Handlebars, Mustache, Liquid, Go templates, Angular, Tera, Askama and Mako.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

djLint for coding agents

Plugins that hand an AI coding agent the findings of djLint on the HTML templates it edits, so that it fixes them before it moves on, without being told to run a linter. djLint lints Django, Jinja, Twig, Nunjucks, Handlebars, Mustache, Liquid, Go templates, Angular, Tera, Askama and Mako templates.

Agent How the findings reach it
Claude Code The plugin runs djLint's language server, whose findings Claude Code shows the model after each edit.
Codex A hook lints each template the agent adds or changes, and adds the findings to the result of its edit.
GitHub Copilot CLI The same hook.
Gemini CLI The same hook, in an extension.
OpenCode A plugin that does the same in OpenCode 1 and 2, and in forks of OpenCode such as Kilo Code.

The plugins of Claude Code, Codex, Copilot CLI and Gemini CLI also bring a djLint skill. It tells the agent how to run djLint when no findings arrive, look a rule up, silence a finding and when to leave the formatting alone.

They lint files with these extensions: .html, .htm, .jinja, .jinja2, .j2, .njk, .twig, .hbs, .handlebars, .mustache, .liquid, .gotmpl, .gohtml, .tera and .mako. djLint reads the project's configuration as usual, so set the profile of your templates there.

Installation

The plugins need djLint 1.49 or newer on PATH, such as one from uv tool install djlint, pipx, Homebrew or npm i -g djlint, or the one in the project's virtual environment if you start the agent with it active. The hooks of Codex, Copilot CLI and Gemini CLI run on the Node.js on PATH, which Gemini CLI needs anyway. OpenCode runs its plugin itself.

Claude Code

In a session:

/plugin marketplace add djlint/agent-plugins
/plugin install djlint@djlint

Claude Code doesn't update plugins from other marketplaces by itself. Turn on auto-update for the djlint marketplace in /plugin, or update it from your shell:

claude plugin marketplace update djlint
claude plugin update djlint@djlint

Codex

codex plugin marketplace add djlint/agent-plugins
codex plugin add djlint@djlint

Codex runs the hook only after you trust it in /hooks, and asks again after each update. To update, run codex plugin marketplace upgrade djlint.

GitHub Copilot CLI

copilot plugin marketplace add djlint/agent-plugins
copilot plugin install djlint@djlint

To update, run copilot plugin update djlint.

Gemini CLI

gemini extensions install https://github.com/djlint/agent-plugins

To update, run gemini extensions update djlint.

OpenCode

OpenCode 2:

opencode plugin add github:djlint/agent-plugins#main

OpenCode 1 and its forks, such as Kilo Code, take it in opencode.json:

{ "plugin": ["github:djlint/agent-plugins#main"] }

It updates from the main branch by itself.

Crush

Crush needs no plugin: it runs the language server from crush.json, and shows the agent its findings after each edit.

{
  "lsp": {
    "djlint": {
      "command": "djlint",
      "args": ["--lsp"],
      "filetypes": [
        "html",
        "htm",
        "jinja",
        "jinja2",
        "j2",
        "njk",
        "twig",
        "hbs",
        "handlebars",
        "mustache",
        "liquid",
        "gotmpl",
        "gohtml",
        "tera",
        "mako"
      ]
    }
  }
}

Aider

Aider needs no plugin either: it lints the files it edits and hands the model what the linter prints. To lint HTML files with djLint:

aider --lint-cmd "html: djlint --lint"

Other agents

Agents that work in an editor, such as the ones of Cursor, Windsurf or Zed, or Copilot in VS Code, see the findings of the editor's djLint extension: djlint-vscode, from Open VSX in editors built on VS Code, or djlint-zed.

Other agents get no findings by themselves, but most of them read Agent Skills: Kimi Code, Qwen Code, ZCode, Factory Droid, Junie, Amp, Goose, Cline, Devin and many more. The djLint skill has them lint the templates they edit. Install it, in OpenCode too, with:

npx skills add djlint/agent-plugins

Troubleshooting

  • Run djlint --lint on the template from the folder you start the agent in. When that finds nothing, the plugin has nothing to report, and when it fails, the plugin fails the same way.
  • Claude Code lists a language server that didn't start in the Errors tab of /plugin. It hands the model the findings on an edit with the result of the next tool call.

License

MIT

About

djLint plugins for AI coding agents: Claude Code, Codex, GitHub Copilot CLI, Gemini CLI and OpenCode get lint findings on the HTML templates they edit, and an Agent Skill covers the rest. Django, Jinja, Twig, Nunjucks, Handlebars, Mustache, Liquid, Go templates, Angular, Tera, Askama and Mako.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages