- (:positional "<name>:<src>" :description "<name> is the name of the project, which must be alphanumeric (hyphens are allowed), while <src> is the location of the repository for cloning. This location must be accessible by the machine running candle.")))
- (usage (opera:usage "candle project add" options)))
- (multiple-value-bind (options remaining-args error) (opera:process-arguments options args)
- (cond
- ((eql error :unknown-option) (format *error-output* "Unknown option: ~A. See 'candle project add --help'.~%" (car remaining-args)))
- ((eql error :required-argument-missing) (format *error-output* "Missing argument for ~A. See 'candle project add --help'.~%" (car remaining-args)))
- ((opera:option-present :help options) (format t "~A" usage))
- ((not remaining-args) (format *error-output* "Required <name>:<src>. See 'candle project add --help'.~%"))
- (t
- (let*
- ((project-definition (car remaining-args))
- (pos (position #\: project-definition)))
- (cond
- ((not pos) (format *error-output* "Project definition ~A is not valid. See 'candle project --help'.~%" project-definition))
- (t
- (let*
- ((name (subseq project-definition 0 pos))
- (src (subseq project-definition (1+ pos))))
- (communication:query `(candle:add-project ,name ,src))
- (format t "Added project ~A at src definition ~A~%" name src))))))))))
+ (:positional "<name>:<src>" :description "<name> is the name of the project, which must be alphanumeric (hyphens are allowed), while <src> is the location of the repository for cloning. This location must be accessible by the machine running candle."))))
+ (standard-cli "candle project add" options args :default "<name>:<src>"
+ (let*
+ ((project-definition (car remaining-args))
+ (pos (position #\: project-definition)))
+ (cond
+ ((not pos) (format *error-output* "Project definition ~A is not valid. See 'candle project --help'.~%" project-definition))
+ (t
+ (let*
+ ((name (subseq project-definition 0 pos))
+ (src (subseq project-definition (1+ pos))))
+ (communication:query `(candle:add-project ,name ,src))
+ (format t "Added project ~A at src definition ~A~%" name src))))))))