- git
$ pip install alkemy-workflow
PowerShell only - Create a function a put it in your profile in order to have it available whenever you run PowerShell.
PS> function aw { cmd /c python3 -m amlkemy_workflow $args }
Use the "aw configure" command, or set the environment variable CLICKUP_TOKEN with your ClickUp personal token, or create the file ~/.alkemy_workflow/credentials like the following:
[default]
clickup_token = pk_01234567_ABCDEFGHIJKLMNOPQRSTUVWXYZ
github_token = ghp_abCDefgHijkLMNoPQrsTuvwxyz0123456
Finding ClickUp token:
- Navigate to your personal Settings
- Click Apps in the left sidebar
- Click Generate to create your API token
- Click Copy to copy the key to your clipboard
Finding GitHub Personal Access Token:
- Login to GitHub account and click Settings located under Profile
- Click Developer settings
- Click Personal access tokens
- Click Generate new token to generate a new Personal Access Token
- Configure the Personal Access Token
Before the the configuration, you need to create an application registration in your Azure AD tenant that grants the required API permissions.
- Sign in to the Azure portal <https://portal.azure.com/.
- Select Azure Active Directory.
- Under Manage, select App registrations > New registration.
- Enter a display name for the authentication and click the Register button.
- Copy the Directory (tenant) ID and use it as "O365 Directory (tenant) ID" for the configuration.
- Copy the Application (client) ID and use it as "O365 Application (client) ID" for the configuration.
- Under Manage, select Authentication > Add a platform.
- Select Web as platform.
- Set Redirect URI to https://login.microsoftonline.com/common/oauth2/nativeclient
- Click on the Configure button to complete the platform configuration.
- Select Certificates & secrets > Client secrets > New client secret.
- Add a description.
- Select an expiration for the secret (e.g. 24 months).
- Click on the Add button.
- Copy the secret's value for use in configuration as "O365 Application (client) secret". The secret value is never displayed again after you leave this page.
After the application configuration, use the "aw configure" command.
$ aw configure
Task backend (clickup, planner) [clickup]: planner
O365 Directory (tenant) ID: <<-- copy the Directory (tenant) ID
O365 Application (client) ID: <<-- copy the Application (client) ID
O365 Application (client) secret: <<-- copy Client Secret
GitHub token: <<-- copy the GitHub token
https://login.microsoftonline.com/db3fe96d-1b57-4119-a5fd-bd139021158d/v2.0/authorize?response_type=code&client_id=...
(open the link in your Browser, and authorize the app)
Paste the authenticated url here:
(paste the Browser's URL, i.e. https://login.microsoftonline.com/common/oauth2/nativeclient?code=0...)
Authentication Flow Completed. Oauth Access Token Stored. You can now use the API.
Authenticated!
O365 credentials verified
GitHub token verified
Use the "aw init" command to create the project configuration file alkemy_workflow.ini
[default]
# Task backend
tasks = clickup
[git]
# Git base branch
base_branch = main
[clickup]
# Task status after open
status_in_progress = in_progress
# Task status after pull request (done or in_review)
status_pr = in_review
Configure ClickUp and GitHub tokens
$ aw configure
Create the alkemy_workflow.ini configuration file in the current directory
$ aw init
Switch to task branch (create it not exists)
$ aw branch '#12abcd45'
Create a remote branch on GitHub without checking out the project
$ aw branch '#12abcd45' --repo https://github.com/owner/repository
Create a new commit an the current feature branch
$ aw commit
Push local commits to the remote branch and create a pull request on GitHub
$ aw pr
Create a pull request on GitHub without checking out the project
$ aw pr '#12abcd45' --repo https://github.com/owner/repository
List spaces (ClickUp) or teams (Planner)
$ aw spaces
List folders from a space (ClickUp)
$ aw folders --space 'Development'
List lists of a space/folder (ClickUp) or plans (Planner)
$ aw lists --space 'Development' --folder 'SmartDigitalSignage'
List tasks
$ aw tasks --space 'Development' --folder 'SmartDigitalSignage' --list 'Backlog'
Get task status
$ aw get-status '#12abcd45'
Set task status
$ aw set-status '#12abcd45' 'done'