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

Is there a way to automate the prompts? #115

Closed
DanielTate opened this issue Aug 10, 2021 · 8 comments
Closed

Is there a way to automate the prompts? #115

DanielTate opened this issue Aug 10, 2021 · 8 comments

Comments

@DanielTate
Copy link

For example if I use

clockify-cli manal

I have to follow prompts to put in a record is there a way to instead:
If not are there any plans to implement this kind of API?

clockify-cli manual -idPROJECT_ID -dDESCRIPTION -tTAG,TAG -s09:00 -e17:00

@lucassabreu
Copy link
Owner

its a inconsistency that i wanna fix across the commands soon(ish)... it would probably looks like the flags on clockify-cli edit

Flags:
      --description string     change the description
  -n, --not-billable           this time entry is not billable
  -p, --project string         change the project
      --tag strings            add tags to the entry
      --task string            add a task to the entry
      --when string            when the entry should be started
      --when-to-close string   when the entry should be closed

@lucassabreu
Copy link
Owner

@DanielTate in the new release i add the flags to manual and in commands, could you take a look and tell me if it helps you?

@DanielTate
Copy link
Author

DanielTate commented Aug 10, 2021

@lucassabreu Thanks for looking at this. I tried the commands you listed and without option flags found here:
https://clockify-cli.netlify.app/en/commands/clockify-cli_manual/

And still couldn't get it to work.

I tried

clockify-cli PROJECT_ID 09:00 17:00
and
clockify-cli --project PROJECT_ID --when 09:00 --when-to-close 17:00

Both just gave me the next prompt to select a project. I tried the --allow-incomplete flag on both with no luck.

Up updated my package using snap refresh clockify-cli using version 20 something now.

@lucassabreu
Copy link
Owner

it will ask you to confirm da arguments id you have "interactive mode" turned on.

you can turn it off using clockify-cli manual --interactive=false

I think I didn't understand the issue now hehe, of what you wanted is the not to ask for confirmation, than use that flag.

you can disable it using the environment variable $CLOCKIFY_INTERACTIVE or setting it to false on the config file.

@DanielTate
Copy link
Author

Thanks that works!

Since I'm using the snap I don't think I can use the config file? It says in your Read me.

It would be very helpful to provide this --interactive=false reminder in the manual docs

@lucassabreu
Copy link
Owner

@DanielTate i changed the help of--interactive flag to this:

  -i, --interactive          will prompt you to confirm/complement commands input before executing the action (defaults to env $CLOCKIFY_INTERACTIVE).
                             	You can be disable it temporally by setting it to 0 (-i=0 or CLOCKIFY_INTERACTIVE=0)

what do you think?

releated to #117

@DanielTate
Copy link
Author

That seems helpful. If you have an example of a non interactive input in your Readme I think that would be very helpful also. I am the kind of person that looks at examples before reading the manual. I think many people are like this.

@lucassabreu
Copy link
Owner

i added a example using only flags to README.md ;)

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

No branches or pull requests

2 participants