The Wayback Machine - https://web.archive.org/web/20200925161651/https://github.com/liquidz/corne
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Corne

Build Status

Commandline argument parser for Common Lisp

Usage

(in-package :cl-user)
(defpackage foo.bar
  (:use :cl :corne))
(in-package :foo.bar)

(defvar *cli*
  (cmd "hello"
       :help "corne example command"
       :version "1.0"
       :options (list (opt "verbose" :short "v" :long "verbose" :help ""))
       :arguments (list (arg "msg" :help "message"))))

(defun main (&rest argv)
  (let* ((res (parse *cli* argv)))
    (format t "hello ~A~%" (get-arg res "msg"))))

More examples are here.

Features

Auto help generation

$ ./example/hello.ros -h
hello 1.0
corne example command

USAGE: hello [OPTIONS] <MSG>

OPTIONS:
    -v, --verbose
    -h, --help       Prints help information

ARGUMENTS:
    <MSG>    message

Subcommand support

(defvar *cli*
  (cmd "subcommand"
       :help "corne example command"
       :version "1.0"
       :subcommands (list (cmd "foo" :help "foooo")
                          (cmd "bar" :help "baaar"
                                     :subcommands (list (cmd "baz" :help "baaaz"))))))

Installation

  • Corne is not registered Quicklisp yet.
  • clone to your local-projects
# ex
git clone https://github.com/liquidz/corne ~/.roswell/local-projects
  • register local project
(ql:register-local-projects)

About

Commandline argument parser for Common Lisp

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.