I would like to make a simple CLI to quickly add tasks and subtasks without using the browser, so I have a few questions:
Is there a good way to authenticate via OIDC when calling a script (e.g. Google has a workflow where you can quickly authenticate an external application from the browser)?
I looked in the API docs, but these seem to require already having made a call to the provider. Basically I want to prompt the user to login and then get the token out somehow, without having to copy it from the network log.
Is the handling of quick add magic available in the api, and if not could that be made available there?
But maybe, somebody has built something like this already, or even a generalized task cli (thinking about something like a taskwarrior integration, which already has lots of magic handling I think…) one could build upon.
I would be astonished if all the power-users here work solely from the browser with this great application
I think most other cli clients (like the stripe cli, for example) solve this by starting a web server and authenticating in the browser, then save the obtained api token to some place where the cli can access it.
Right now it’s not implemented in the api. It will be at some point though.
I am pretty happy with using it on a daily schedule. Right now, my personal backlog of features left to add gets smaller (and/or more boring…) Definitely, I should provide more options for filtering/grouping/sorting the ls output. But I am still not sure how to that properly in a CLI.
So maybe this is a good time to get some feedback. It would be an honor if you would link to it in your docs
I came to Vikunja from topydo, which is quite a capable todo CLI client… if you are interested, I’d like to port some of the features from topydo to vja…
todo.txt would be a big thing for a cli but that also sounds like a lot of work with little benefit. And we may add parsing for that into the api at which point it won’t make sense to have it built manually into the cli.
I mean, you put in all the work to build the CLI, the least I can do is add it to the docs
Do you have an idea about where to add it? Maybe even on a dedicated page?
Dear kolaente, I agree vja is intended to be a Vikunja client, not a wrapper.
Concerning the link, it’s really up to you. Maybe put it on the download page in a block “Contributions” or “3rd party”? Maybe a separate page for that?
As of now, it seems better to consider it external. vja suits more or less my own needs. If it was improved and become more configurable, one could even think of making it an official part of Vikunja. But this again is up to you.
Thanks, I had not checked in here in a while!
Please, though, don’t make me create a dir in my HOME, and incorporate XDG instead xdg-base-dirs · PyPI
Oh, and if a nonexistent api_url would automatically be derived from the frontend-url that would be awesome as well!
I’m not sure about how vja handles token renewal, but the api is also able to “trade” a token close to expiry to a new one which would be valid 3 more days from the time of the renewal (that’s what the web frontend does). It’s alspo possible to return a long token when logging in which is valid a lot longer than the default - that’s something vja would need to do.
When vja has no token or the token has become invalid it will prompt for credentials and fetch a new token. Future versions will fetch the long token with a default lifetime of 30 days. At the moment the token is valid for 3 days by default.
Additionally, you may use --username and --password like vja -u demo -p demo ls if this suits your needs better
Note: You can call vja logout which just deletes the stored token,