CLI-matic has one main entry-point: run-cmd
.
As an end-user, you need nothing else, but the documentation that explains how parameters are to be run.
See examples/
to get started quickly.
Developers
Most of the logic will be run in run-cmd*
to make testing easier,
as run-cmd
calls System/exit
.
### ATTENTION CLI-matic has one main entry-point: [[run-cmd]]. As an end-user, you need nothing else, but the documentation that explains how parameters are to be run. See `examples/` to get started quickly. *Developers* Most of the logic will be run in [[run-cmd*]] to make testing easier, as [[run-cmd]] calls `System/exit`.
## Generate help texts.
CLI-matic is supposed to work whether they are present or not.
Detection is taken from core.clj
in https://github.com/dakrone/clj-http
### This namespace contains optional dependencies for CLJ. CLI-matic is supposed to work whether they are present or not. * JSON (Cheshire) * YAML (io.forward/yaml) * Orchestra Detection is taken from `core.clj` in https://github.com/dakrone/clj-http
JSON is always available in CLJS.
### This namespace contains optional dependencies for CLJS. JSON is always available in CLJS.
If running on ClojureScript, we can have a different file for JS.
BTW, in this NS, we avoid using Spec / Orchestra.
DO NOT define macros in this namespace - see cli-matic.platform-macros
## Platform-specific functions for the JVM. If running on ClojureScript, we can have a different file for JS. BTW, in this NS, we avoid using Spec / Orchestra. **DO NOT** define macros in this namespace - see [[cli-matic.platform-macros]]
At the moment, we only support Planck.
BTW, in this NS, we avoid using Spec / Orchestra.
## Platform-specific functions for ClojureScript. At the moment, we only support Planck. BTW, in this NS, we avoid using Spec / Orchestra.
Unfortunately:
So we have to use a separate namespace and hide everything behind reader conditionals.
Usage is:
#?(:clj [cli-matic.platform-macros :refer [try-catch-all]]
:cljs [cli-matic.platform-macros :refer-macros [try-catch-all]] )
This was a real PITA, man.
## Macros shared between CLJ and CLJS. Unfortunately: - Macros must be in a separate file (for CLJS) - Macros have a different import syntax (CLJS) - Macros defined in .clj will STILL be loaded by CLJS and will fail big time. So we have to use a separate namespace and hide everything behind reader conditionals. Usage is: #?(:clj [cli-matic.platform-macros :refer [try-catch-all]] :cljs [cli-matic.platform-macros :refer-macros [try-catch-all]] ) This was a real PITA, man.
### Known presets
### Utilities used in the project * the *general* section contains low-level stuff that could be anywhere * the *cli-matic* section contain low-level functions used by the parser and the help generators.
This namespace contains utilities to compute string candidates.
### String candidates tools. This namespace contains utilities to compute string candidates.
This comes in handy when evolving existing scripts.
ATM it only works for Clojure, and not so well, as symbol de-munging is not 100% deterministic (minuses and underscores are mixed).
This namespace is not referenced from anywhere else in CLI-matic.
# Convert old configuration (v1) to the new format (v2), in a printable way. This comes in handy when evolving existing scripts. ATM it only works for Clojure, and not so well, as symbol de-munging is not 100% deterministic (minuses and underscores are mixed). This namespace is not referenced from anywhere else in CLI-matic.
# Utils to work with nested configuration trees (cfg v2) - Convert commands v1 to v2 (fully nested). - Accessors for data in a nested structure
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close