creating-julia-app
Skill0 starsChanged 3 days agoMITView on GitHub
Create a Julia command-line application or MCP server with `@main`, `[apps]`, and `Pkg.Apps`. Use when packaging an executable Julia program.
In this repository55 other files it gives its agents.
- advanced-optimizationSkill
- bayesian-inferenceSkill
- bayesian-pinnSkill
- bayesian-ude-workflowSkill
- catalyst-reactionsSkill
- continuum-mechanics-and-rheologySkill
- control-theorySkill
- debugging-toolkitSkill
- differential-equationsSkill
- differentiationSkill
- equation-discoverySkill
- experiment-trackingSkill
- fem-feaSkill
- julia-graph-neural-networksSkill
- julia-languageSkill
- julia-ml-and-dlSkill
- julia-model-deploymentSkill
- julia-paper-implementationSkill
- julia-pro-helpSkill
- julia-pro-modeSkill
- julia-reinforcement-learningSkill
- modeling-toolkitSkill
- neural-pdeSkill
- nonlinear-dynamicsSkill
- numerical-methods-implementationSkill
- package-development-workflowSkill
- performance-tuningSkill
- physical-learning-systemsSkill
- playbook-debugSkill
- playbook-model-validateSkill
- playbook-package-releaseSkill
- playbook-paper-implementSkill
- playbook-perfSkill
- playbook-test-specSkill
- principle-both-sidesSkill
- principle-breakingSkill
- principle-file-is-truthSkill
- principle-gateSkill
- principle-limitsSkill
- principle-loud-failureSkill
- principle-one-stepSkill
- principle-proof-listSkill
- principle-rebuttalSkill
- principle-runtime-surfaceSkill
- principle-three-boundsSkill
- principle-three-clocksSkill
- scientific-visualizationSkill
- sciml-and-diffeqSkill
- setup-julia-proSkill
- signal-processingSkill
- simulation-and-hpcSkill
- statistical-physicsSkill
- symbolic-mathSkill
- web-development-juliaSkill
- zarr-cloud-arraysSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 49
Keep @main thin: parse arguments, call a library function, return a code.
- Distinctive: line 50
Start-up latency matters for CLIs.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Creating a Julia App
An app is a Julia package run as a standalone program (mytool args...) rather than loaded as a library. It is a normal package plus:
- a
@mainentry point in the package module, - an
[apps]table inProject.tomlnaming the executables.
Requires Julia 1.12+. Pkg app support is experimental; expect changes.
# src/MyReverseApp.jl
module MyReverseApp
function (@main)(ARGS)
for arg in ARGS
print(stdout, reverse(arg), " ")
end
return 0
end
end # module# Project.toml (standard package fields above)
[apps]
reverse = {}The empty table {} holds optional metadata. One package can define several apps, point one at a submodule, and set per-app Julia flags:
[apps]
main-app = {}
cli-app = { submodule = "CLI" }
fast-app = { julia_flags = ["--threads=auto", "--optimize=2"] }Entry-point conventions
- Return an
Integerexit code from@main(0success, non-zero failure); areturnofnothingexits 0. - Print results to
stdout, diagnostics and errors tostderr. - Validate
ARGSup front and print usage on bad input. Use ArgParse.jl or Comonicon.jl for non-trivial option parsing rather than hand-rolled loops. - Keep
@mainthin: parse arguments, call a library function, return a code. Test the library function with testing-julia-package, not the process. - Start-up latency matters for CLIs; see precompiling-julia-package. For a fully standalone binary, see compiler-patterns (PackageCompiler.jl).
Installing and running
pkg> app add MyReverseApp
pkg> app add https://github.com/example/MyReverseApp.jl
pkg> app develop path/to/MyReverseApp # local path must be a git repositorydevelop runs live from a local checkout so edits take effect immediately. Installation creates a shim in ~/.julia/bin, which you must add to PATH. Then:
reverse some input stringManage with pkg> app status, app update [name], app rm name. An app uses the Julia executable that installed it; override with JULIA_APPS_JULIA_CMD.
Security: installing an app installs third-party code that runs when invoked. Prefer a registry entry or an immutable tag/commit SHA over a mutable branch, and review source you did not write.
MCP servers
A Julia MCP server is an app speaking JSON-RPC over stdio: requests on stdin, responses on stdout. Use the same @main/[apps] structure so it installs and launches by name. Keep stdout reserved for protocol messages; send all logs to stderr, since a stray println corrupts the stream. See the Model Context Protocol spec for the wire format.
References: Apps, Multiple Apps per Package.
Adapted from AtelierArith/atelier-arith-julia-development-skills (MIT). See THIRD_PARTY_NOTICES.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

