Clojure CLI command line tool
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the supplied Clojure CLI template and the repository's existing clojure-cli examples or entry points, if any. No target file, test, or acceptance criteria are named, so confirm where the template belongs and what command behavior is expected before making changes.
Written by the indexing model from the issue text.
Description
A basic template for creating a Clojure CLI command tool.
(ns practicalli.tool-name
(:gen-class)
(:require [clojure.tools.cli :as cli]))
(def VERSION "0.0.1")
(def cli-opts
[["-v" "--verbose" "Increase verbosity" :default 0 :update-fn inc]
[nil "--version" "Print version and exit"]
["-h" "--help" "Print this help information"]])
(defn exec-tool [args {:keys [] :as opts}]
;; main functionality goes here, you get a seq of positional arguments, and a
;; map of options.
)
(defn -main [& args]
(let [{:keys [errors options arguments summary]} (cli/parse-opts args cli-opts)]
(cond
(seq errors)
(do
(run! println errors)
(println summary)
(System/exit -1)) ;; non-zero exit code if something goes wrong
(:help options)
(do
(println summary)
(System/exit 0))
(:version options)
(do
(println VERSION)
(System/exit 0))
:else
(main arguments options))))
- Dominant language
- Makefile
- Stars
- 117
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from practicalli/clojure
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
practicalli/clojure#381 ·
-
Clojure on windows Open
Difficulty 1/5 Under an hour Newbie friendliness 75/100
practicalli/clojure#298 ·
-
video
practicalli/clojure#478 · 1 assignee ·
-
practicalli/clojure#477 · 1 assignee ·
-
practicalli/clojure#476 · 1 assignee ·
All issues in practicalli/clojure
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
type/automation type/performance
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
bug cli
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100