Just — 18 Operations for AI Agents
A justfile is the front door to a repository — the commands a team actually runs, with recipes and dependencies. act101 reads recipes as structure, so agents discover and follow a project's workflows without trial-and-error.
This page is the canonical reference an AI coding agent uses to refactor, query, and analyze Just code through the act MCP server. 18 operations available: 0 refactor, 18 query, 0 analysis. Each operation is callable from Claude Code, Cursor, Codex, OpenCode, or any MCP-compatible agent host. Click any operation for a stable anchor link suitable for citation.
Worked Just examples
act101 reads a justfile's five top-level constructs: a recipe surfaces as a function named for the recipe, a variable assignment surfaces as a constant, an alias surfaces as a type_alias named for the alias rather than the recipe it points to, and a set directive surfaces as an annotation named for the setting. symbols covers the recipe, assignment, and alias cases identically to the skeleton, but has no rule for set directives, so that declaration disappears. query complexity scores a recipe's or a variable's expression body for branching, adding one point per if_expression and else_clause it finds. Each example below is the verbatim output of the command shown, run against the file shown. Query outputs are pretty-printed with the timing block omitted.
Read recipes, variables, and the alias as a skeleton
migrate.just runs database migrations: a dotenv-load setting, an env and db_url variable, three recipes (migrate, rollback, seed), and a down alias for rollback.
$ act query skeleton migrate.just
Before
set dotenv-load
env := env_var_or_default("DEPLOY_ENV", "local")
db_url := if env == "staging" { "postgres://staging/app" } else { "postgres://localhost/app" }
migrate:
sqlx migrate run --database-url {{db_url}}
rollback:
sqlx migrate revert --database-url {{db_url}}
seed: migrate
psql {{db_url}} -f fixtures/seed.sql
alias down := rollback
Output
{
"type": "Skeleton",
"declarations": [
{
"kind": "annotation",
"name": "dotenv-load",
"range": {
"start": {
"file": "migrate.just",
"line": 1,
"column": 1,
"byte_offset": 0
},
"end": {
"file": "migrate.just",
"line": 2,
"column": 1,
"byte_offset": 16
}
},
"name_range": {
"start": {
"file": "migrate.just",
"line": 1,
"column": 5,
"byte_offset": 4
},
"end": {
"file": "migrate.just",
"line": 1,
"column": 16,
"byte_offset": 15
}
}
},
{
"kind": "constant",
"name": "env",
"range": {
"start": {
"file": "migrate.just",
"line": 3,
"column": 1,
"byte_offset": 17
},
"end": {
"file": "migrate.just",
"line": 4,
"column": 1,
"byte_offset": 66
}
},
"name_range": {
"start": {
"file": "migrate.just",
"line": 3,
"column": 1,
"byte_offset": 17
},
"end": {
"file": "migrate.just",
"line": 3,
"column": 4,
"byte_offset": 20
}
}
},
{
"kind": "constant",
"name": "db_url",
"range": {
"start": {
"file": "migrate.just",
"line": 4,
"column": 1,
"byte_offset": 66
},
"end": {
"file": "migrate.just",
"line": 5,
"column": 1,
"byte_offset": 161
}
},
"name_range": {
"start": {
"file": "migrate.just",
"line": 4,
"column": 1,
"byte_offset": 66
},
"end": {
"file": "migrate.just",
"line": 4,
"column": 7,
"byte_offset": 72
}
}
},
{
"kind": "function",
"name": "migrate",
"range": {
"start": {
"file": "migrate.just",
"line": 6,
"column": 1,
"byte_offset": 162
},
"end": {
"file": "migrate.just",
"line": 9,
"column": 1,
"byte_offset": 219
}
},
"name_range": {
"start": {
"file": "migrate.just",
"line": 6,
"column": 1,
"byte_offset": 162
},
"end": {
"file": "migrate.just",
"line": 6,
"column": 8,
"byte_offset": 169
}
}
},
{
"kind": "function",
"name": "rollback",
"range": {
"start": {
"file": "migrate.just",
"line": 9,
"column": 1,
"byte_offset": 219
},
"end": {
"file": "migrate.just",
"line": 12,
"column": 1,
"byte_offset": 280
}
},
"name_range": {
"start": {
"file": "migrate.just",
"line": 9,
"column": 1,
"byte_offset": 219
},
"end": {
"file": "migrate.just",
"line": 9,
"column": 9,
"byte_offset": 227
}
}
},
{
"kind": "function",
"name": "seed",
"range": {
"start": {
"file": "migrate.just",
"line": 12,
"column": 1,
"byte_offset": 280
},
"end": {
"file": "migrate.just",
"line": 15,
"column": 1,
"byte_offset": 336
}
},
"name_range": {
"start": {
"file": "migrate.just",
"line": 12,
"column": 1,
"byte_offset": 280
},
"end": {
"file": "migrate.just",
"line": 12,
"column": 5,
"byte_offset": 284
}
}
},
{
"kind": "type_alias",
"name": "down",
"range": {
"start": {
"file": "migrate.just",
"line": 15,
"column": 1,
"byte_offset": 336
},
"end": {
"file": "migrate.just",
"line": 15,
"column": 23,
"byte_offset": 358
}
},
"name_range": {
"start": {
"file": "migrate.just",
"line": 15,
"column": 7,
"byte_offset": 342
},
"end": {
"file": "migrate.just",
"line": 15,
"column": 11,
"byte_offset": 346
}
}
}
]
}
The skeleton reports dotenv-load as an annotation, env and db_url as constant declarations, migrate, rollback, and seed as function recipes, and down as a type_alias.
List the recipes, variables, and alias as symbols
seed depends on migrate running first, and both read db_url to reach the right database.
$ act query symbols migrate.just
Before
set dotenv-load
env := env_var_or_default("DEPLOY_ENV", "local")
db_url := if env == "staging" { "postgres://staging/app" } else { "postgres://localhost/app" }
migrate:
sqlx migrate run --database-url {{db_url}}
rollback:
sqlx migrate revert --database-url {{db_url}}
seed: migrate
psql {{db_url}} -f fixtures/seed.sql
alias down := rollback
Output
{
"type": "Symbols",
"symbols": [
{
"name": "env",
"kind": "variable",
"range": {
"start": {
"file": "migrate.just",
"line": 3,
"column": 1,
"byte_offset": 17
},
"end": {
"file": "migrate.just",
"line": 3,
"column": 4,
"byte_offset": 20
}
},
"visibility": "unknown"
},
{
"name": "db_url",
"kind": "variable",
"range": {
"start": {
"file": "migrate.just",
"line": 4,
"column": 1,
"byte_offset": 66
},
"end": {
"file": "migrate.just",
"line": 4,
"column": 7,
"byte_offset": 72
}
},
"visibility": "unknown"
},
{
"name": "migrate",
"kind": "function",
"range": {
"start": {
"file": "migrate.just",
"line": 6,
"column": 1,
"byte_offset": 162
},
"end": {
"file": "migrate.just",
"line": 6,
"column": 8,
"byte_offset": 169
}
},
"visibility": "unknown"
},
{
"name": "rollback",
"kind": "function",
"range": {
"start": {
"file": "migrate.just",
"line": 9,
"column": 1,
"byte_offset": 219
},
"end": {
"file": "migrate.just",
"line": 9,
"column": 9,
"byte_offset": 227
}
},
"visibility": "unknown"
},
{
"name": "seed",
"kind": "function",
"range": {
"start": {
"file": "migrate.just",
"line": 12,
"column": 1,
"byte_offset": 280
},
"end": {
"file": "migrate.just",
"line": 12,
"column": 5,
"byte_offset": 284
}
},
"visibility": "unknown"
},
{
"name": "down",
"kind": "type_alias",
"range": {
"start": {
"file": "migrate.just",
"line": 15,
"column": 7,
"byte_offset": 342
},
"end": {
"file": "migrate.just",
"line": 15,
"column": 11,
"byte_offset": 346
}
},
"visibility": "unknown"
}
]
}
symbols reports env and db_url as variable rather than constant, the same three recipes as function, and down as type_alias; the dotenv-load setting has no rule in this query and is absent.
Score the database-URL branch for complexity
db_url picks between the staging and local Postgres URL with an if/else expression rather than a plain assignment.
$ act query complexity migrate.just
Before
set dotenv-load
env := env_var_or_default("DEPLOY_ENV", "local")
db_url := if env == "staging" { "postgres://staging/app" } else { "postgres://localhost/app" }
migrate:
sqlx migrate run --database-url {{db_url}}
rollback:
sqlx migrate revert --database-url {{db_url}}
seed: migrate
psql {{db_url}} -f fixtures/seed.sql
alias down := rollback
Output
{
"type": "Complexity",
"score": 3,
"details": "Base complexity: 1, +1 if_expression, +1 else_clause"
}
The score comes back 3: a base complexity of 1, plus one point each for the if_expression and the else_clause in db_url's conditional — the only branching construct in the file.
Query
18 query tools, the same on every supported language. Descriptions live in the shared reference: /docs/query-tools.
callers control_flow data_flow definition diagnostics effect_closure effect_summary fix_auto get_type graph import_organize interface mutations references repo_outline skeleton symbols symbols_batch