aru

command module
v0.42.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 38 Imported by: 0

README

Arandu

arandu-io/aru

The command line: a project, a full module, and a lint that checks the architecture held.

Build Status Go Reference Latest Version License

About aru

brew install arandu-io/tap/aru
aru new my-app
cd my-app && aru dev

aru is the toolchain of a Go framework for web applications, services and APIs: it generates a full module — Model-backed entity, policy, service, request, controller, migration, screens — compiling and tested, in one command, and its doctor reads a project's source to check that the architecture it compiled against is still the one it is running.

What it delivers

aru help lists every command, grouped here by what they do:

group commands
run the project serve dev build new doctor trace generate schema
generate a module make:module make:model make:migration make:controller make:middleware make:request make:factory make:seeder make:job make:mail make:command make:listener make:event make:enum make:policy make:test
migrations migrate migrate:rollback migrate:status migrate:fresh
queues queue:work queue:listen queue:restart queue:pause queue:resume queue:clear queue:monitor queue:failed queue:retry queue:forget queue:flush queue:prune-failed queue:retry-batch queue:prune-batches
fonts font:add font:search font:info font:list font:remove
everything else key:generate schedule:list schedule:run route:list db:seed view:build

plus help and version.

  • aru make:module — a Model-backed entity with its policy, service, request, controller, migration and four screens, compiling and tested from the moment it lands.
  • aru generate — the same output, from a written specification: the model writes the spec, never the Go.
  • aru doctor — 39 named rules read the AST of a project, without running it, and fail CI on the first error. Among them: repository-without-policy, grant-not-checked, sql-without-tenant-scope, tenant-from-request, tenant-from-header, sql-built-by-concatenation, view-does-not-exist, session-not-rotated. Three of them answer only to --profile=performance, where a join and a transaction across two aggregates stop being ordinary SQL and become findings.
  • aru trace — a request reconstructed in the terminal, from the running application.
  • aru font:add — vendors a font into the project: the unicode range and the metric overrides are read out of the font file itself, not guessed.

The view compiler is part of this binary rather than something it downloads: one fewer thing to pin, verify and cache.

One direct dependency: gopkg.in/yaml.v3, for the specification format. CI refuses a second one. 21,677 lines of production code and 10,737 of test, across 37 test files.

The authentication screens are not here — go run github.com/arandu-io/ui@latest auth publishes them into your project, and they are yours to edit from the moment they land.

Install

brew install arandu-io/tap/aru

The rest of Arandu

arandu is the skeleton this CLI clones; arandu-io/framework is what a project runs on; hesape is the collection of packages the framework is built from; examples is a complete application, generated the same way aru make:module generates one.

Learning Arandu

The API reference is generated from the doc comments and lives on pkg.go.dev. Every exported symbol carries one, and that is deliberate: it is the documentation that cannot drift from the code, because it sits in the same file.

The CLI documents itself. aru help lists every command, and each one explains what it writes and what to do with it. aru doctor explains what it found and what breaks, not which rule was violated.

A guide and a website do not exist yet, and that is a decision rather than a gap: a guide written against an API that still moves is work done twice, and the second time is worse — there is wrong documentation published. The site is the next phase, and it will be an Arandu application.

Contributing

See CONTRIBUTING.md. Before opening a pull request, the three commands that file lists have to pass. CI runs them, and then four more: a dependency budget, the build, a linter and govulncheck.

Security Vulnerabilities

Please review our security policy on how to report a vulnerability. Never open a public issue for one.

License

Open-sourced software licensed under the MIT license.

Documentation

Overview

Command aru is the Arandu CLI.

It does two kinds of work, and the split matters. Commands that only touch files -- key:generate, new, make:*, doctor -- run here. Commands that need the registered modules -- serve, migrate, routes -- are delegated to the project's own binary, because only that binary knows which modules exist. Nothing is resolved by reflection, and everything the CLI generates is readable, committable Go.

The binary is called aru rather than arandu: the arandu name is already taken by another tool: the framework and the tool that drives it are separate names.

Directories

Path Synopsis
internal
doctor
Package doctor turns the architecture rules into static analysis.
Package doctor turns the architecture rules into static analysis.
fonts
Package fonts vendors a web font into a project, once, from the command line.
Package fonts vendors a web font into a project, once, from the command line.
gen
Package gen turns a module specification into Go source.
Package gen turns a module specification into Go source.
kyse
Package kyse compiles a view into Go.
Package kyse compiles a view into Go.
lsp
Package lsp serves Kyse language intelligence over the Language Server Protocol.
Package lsp serves Kyse language intelligence over the Language Server Protocol.
lsp/htmxgen command
Command htmxgen writes the HTMX attribute table the language server offers.
Command htmxgen writes the HTMX attribute table the language server offers.
manifest
Package manifest reads arandu.mod.toml, the metadata every module declares.
Package manifest reads arandu.mod.toml, the metadata every module declares.
spec
Package spec is the declarative form of a module: the DSL a model writes.
Package spec is the declarative form of a module: the DSL a model writes.
testlayout
Package testlayout checks that a Go module's tests are where they can run.
Package testlayout checks that a Go module's tests are where they can run.
toolchain
Package toolchain downloads and caches the one binary the view layer needs.
Package toolchain downloads and caches the one binary the view layer needs.
Package tests is the base every suite in this repository builds on.
Package tests is the base every suite in this repository builds on.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL