Skip to content

CLI getting started

The Retask CLI (retask) drives the same API as the web app from your terminal or scripts.

Terminal window
curl -fsSL https://retask.work/install.sh | sh

Check the installed version at any time with:

Terminal window
retask -v

To update to the latest release, run retask upgrade, then retask -v again to confirm the new version.

There are two ways to authenticate. Pick whichever fits.

Set your Personal Access Token, then run retask auth login to exchange it for a token:

Terminal window
export NWEB_API_KEY="nweb_pat_..."
retask auth login

If NWEB_API_KEY isn’t set, retask auth login prompts for it interactively (input is masked), with a link to create one at app.retask.work/access-tokens.

If you already have a token, set NWEB_API_TOKEN and you’re ready to go — the token already identifies your workspace, so you do not need NWEB_API_KEY or NWEB_WORKSPACE_ID, and you can skip retask auth login:

Terminal window
export NWEB_API_TOKEN="..."

Other optional environment variables: NWEB_API_ENDPOINT, RETASK_PROFILE, RETASK_NO_PERSIST.

Each login is saved into a profile — one profile holds one workspace’s endpoint, workspace ID, and cached token. To work with several workspaces, log in once per workspace and give each login a name:

Terminal window
export NWEB_API_KEY="nweb_pat_..."
retask auth login --profile acme
export NWEB_API_KEY="nweb_pat_..."
retask auth login --profile beta

Each run picks a workspace as usual and stores it under that name. From then on, --profile chooses which one a command talks to — it works on every command:

Terminal window
retask project list --profile acme
retask task list --profile beta

To fix a profile for a whole shell instead of repeating the flag, set RETASK_PROFILE:

Terminal window
export RETASK_PROFILE=acme

If you’re ever unsure which workspace a profile points at, ask:

Terminal window
retask auth whoami --profile acme
Terminal window
retask project list
retask task create --project-id <id> --title "Fix login bug" --priority HIGH

See the command reference for every command.