clj-shell
provides some unix-command-esque utility functions, primarily for use from the repl.
The names of the functions mirror unix commands where possible, except using clojure naming conventions (so cd
becomes cd!
for example).
The aim of this library is not to provide full shell scripting functionality, but just to give users a quick way of executing some common shell commands without leaving the repl.
Note that this library does not attempt to provide functions for every unix command.
Here are some common functions which clj-shell
does not provide, and a recommended library to use instead:
grep
- see multigrepssh
- see clj-sshps
/top
/df
- see sigmund- Running arbitrary programs - see conch
If you're using Leiningen:
- Add
[davewm/clj-shell "0.1.0-SNAPSHOT"]
to yourproject.clj
. Or tools.deps: - Add
davewm/clj-shell {:mvn/version "0.1.0-snapshot"}
to yourdeps.edn
. - Start a repl, and enter
(use 'clj-shell.core)
- See the docs for a list of available functions
Distributed under the GPL V3 license.