CLOJURE(1)

πŸ“¦ version 1.10.2, in ubuntu jammy

✨ CLOJURE(1) ✨

okay bestie, this is the manual page for clojure from the General Commands Manual, section 1. it's giving "your gateway to the JVM" energy and i'm obsessed πŸ’…


🌸 NAME 🌸

clojure β€” a JVM-based dynamic programming language πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

clojure [-cp/-classpath classpath] [-i/--init path] [-e/--eval expr] {-h
| -r | path | -} [args ...]

like. look at her. the options. the braces. the way she says "pick one of -h, -r, a path, or -". iconic. no notes. ✨


πŸ’œ DESCRIPTION πŸ’œ

so this manual page documents the clojure command, briefly. quick lil vibe check, nothing too deep 🫢

clojure is the main entry point for Clojure, which is a dynamic programming language that targets the Java Virtual Machine. literally the front door. the main character. πŸ‘‘

and here's the cute part: with no options and no arguments, she just runs an interactive Read-Eval-Print loop β€” a REPL β€” and you get to sit there and vibe with your own code in real time. it's giving instant gratification fr fr πŸ’–


✨ OPTIONS ✨

a summary of options is included below. bestie, we're going through ALL of them, no skipping, i don't play like that πŸ’…

  • -cp, -classpath classpath β€” specifies additional classpath elements. overrides the $CLASSPATH environment variable. and ⚠️ it must appear first if given β€” like, before anything else, she needs to be the first one through the door.
  • -i, --init path β€” load a file or resource at initialisation time. you can say this multiple times if you want, she doesn't mind πŸŽ€
  • -e, --eval string β€” evaluate expressions in string; print non-nil values. also may be specified multiple times. stack 'em up πŸ“
  • -m, --main ns-name β€” call the -main function from a namespace, with args. your classic "just run the thing" move ✨
  • -r, --repl β€” run a repl πŸ”
  • path β€” run a script from a file or resource πŸ“„
  • - β€” run a script from standard input. yes, a single lonely dash. she contains multitudes πŸ’€
  • -h, -?, --help β€” print a help message and exit. our queen of "idk what's happening" 🫢

🌈 PATH ARGUMENTS 🌈

so a Clojure file can just be handed over as a path argument. easy.

but β€” plot twist β€” files to be loaded from the classpath must be prefixed with a @ character, and they must be an absolute path to the classpath resource. not vibes-based. absolute. periodt.

⚠️ also note: the path will be treated as absolute within the classpath, whether it is prefixed with a slash or not. so like, don't come for me about the slash, she's already decided. πŸ’…

and here's the part that makes scripts actually work: clojure binds *command-line-args* to a seq containing the (optional) arguments provided after the path argument. that's the whole trick β€” it's how you hand command-line arguments to your own scripts. iykyk 😌


🧚 ENVIRONMENT 🧚

a listing of recognised environment variables is included below. there's literally one. she's lowkey mysterious. ✨

  • CLASSPATH β€” specifies additional classpath elements. (yes, this is the one -cp/-classpath overrides. the drama. the tension. 🍿)

πŸ‘‘ SEE ALSO πŸ‘‘

clojurec(1).

go read that one too, bestie, we support the whole family 🫢


πŸ’– AUTHOR πŸ’–

clojure is a wrapper script around a Java implementation by Rich Hickey <richhickey@gmail.com>. 🌟

the wrapper script was written by Peter Collingbourne <peter@pcc.me.uk>. πŸ’…

this manual page was written by Peter Collingbourne <peter@pcc.me.uk>, for the Debian project (but may be used by others). so generous. so giving. we love that for them πŸ’œ


and that's the whole page, bestie!! πŸŽ€ this was CLOJURE(1) from the General Commands Manual β€” you found her, you read her, you slayed. now go run a REPL and have the time of your life. byeee πŸ’–βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from