Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite the CLI #17

Open
20 of 32 tasks
ryugi opened this issue May 19, 2017 · 2 comments
Open
20 of 32 tasks

Rewrite the CLI #17

ryugi opened this issue May 19, 2017 · 2 comments
Assignees
Labels

Comments

@ryugi
Copy link
Member

ryugi commented May 19, 2017

Use https://github.com/clojure/tools.cli and the docstring extraction functions in https://github.com/clojusc/trifl.

Tasks (each of these should get their own ticket):

  • provide detailed examples of ideal usage from the cli
    • for use by developers
    • for use by scripts/automation tools - will update in the future, as needed
    • for use by build matrices that need scripts to respect ENV variables - will update in the future, as needed
  • find a good taxonomy for the anticipated full command set
  • re-org the cli namespaces accordingly
  • create new functions for tasks
    • config
    • config show
    • config help
    • db
    • db help
    • db init
    • db dump
    • projects list
    • project
    • project help
    • project create
    • tasks list
    • tasks list
    • task
    • task help
    • task create
  • move help into new functions' docstrings
  • update main/entrypoint function to work with clojure.tools.cli
  • add dispatcher(s) for subcommands
  • provide a bash auto-complete script
  • update and/or remove the project.clj file aliases
  • create a cli server that runs in the background and listens for commands
    • rewrite using UDP sockets (inet-address and sockets libs)
    • remove TCP server and dependencies
  • create a lifecycle component for the cli server so it's brought up with the other components when the system starts
  • create a cli client that starts up fast (cljs wrapping node, probably), has access to the file system, and can open tcp connections
    • rewrite the client to communicate with the new UDP server
@ryugi ryugi added the epic label May 19, 2017
@ryugi ryugi self-assigned this May 19, 2017
@ryugi
Copy link
Member Author

ryugi commented May 25, 2017

Draft command list for commands that will run timi code:

timi help  ; also `timi -h` and `timi --help`
timi config [show]
timi db init <filename>
timi project create <name>
timi task create <project name> <task name>

Each of the above commands should also support -h or --help at the end

Commands that will be lein aliases:

timi deps tree ; alias for `lein deps :tree`
timi deps check ; alias for `lein with-profile +test ancient check all`
timi lint ; alias for `lein with-profile +test kibit` 

@ryugi
Copy link
Member Author

ryugi commented May 25, 2017

Namespaces for the commands:

timi.cli.config
timi.cli.db
timi.cli.project
timi.cli.task

Also, a supporting ns:

timi.cli.parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant