Take notes on the command line is part of Short Circuit's Console Program Basics selection.
Invoking NOTES without commandline arguments displays the current contents of the local NOTES.TXT if it exists.
If NOTES has arguments, the current date and time are appended to the local NOTES.TXT followed by a newline.
Then all the arguments, joined with spaces, prepended with a tab, and appended with a trailing newline, are written to NOTES.TXT.
If NOTES.TXT doesn't already exist in the current directory then a new NOTES.TXT file should be created.

(defparameter *notes* "NOTES.TXT")
 
(defun format-date-time (stream)
  (multiple-value-bind (second minute hour date month year) (get-decoded-time)
    (format stream "~D-~2,'0D-~2,'0D ~2,'0D:~2,'0D:~2,'0D"
            year month date hour minute second)))
 
(defun notes (args)
  (if args
      (with-open-file (s *notes* :direction :output
                                 :if-exists :append
                                 :if-does-not-exist :create)
        (format-date-time s)
        (format s "~&~A~{~A~^ ~}~%" #\Tab args))
      (with-open-file (s *notes* :if-does-not-exist nil)
        (when s
          (loop for line = (read-line s nil)
                while line
                do (write-line line))))))
 
(defun main ()
  (notes (uiop:command-line-arguments)))