CLI getting started
The Retask CLI (retask) drives the same API as the web app from your terminal or scripts.
Install
Section titled “Install”curl -fsSL https://retask.work/install.sh | shirm https://retask.work/install.ps1 | iexThe installer adds retask to your user PATH, but that change only reaches
programs started afterwards — this session still has the PATH it was created
with. Add it to the current session so you can carry on without reopening
anything:
$env:Path += ";$env:LOCALAPPDATA\retask\bin"Check the installed version at any time with:
retask -vTo update to the latest release, run retask upgrade, then retask -v again to
confirm the new version.
Authenticate
Section titled “Authenticate”There are two ways to authenticate. Pick whichever fits.
With a Personal Access Token
Section titled “With a Personal Access Token”Set your Personal Access Token, then run retask auth login to exchange it for a token:
export NWEB_API_KEY="nweb_pat_..."retask auth login$env:NWEB_API_KEY = "nweb_pat_..."retask auth loginThese last for the current session. To avoid leaving your PAT in PowerShell’s saved command history, prompt for it instead:
$env:NWEB_API_KEY = Read-Host 'Paste your PAT'To set one permanently for your user account, use
[Environment]::SetEnvironmentVariable('NWEB_API_KEY', 'nweb_pat_...', 'User')
— like the PATH change above, it applies to new sessions only.
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.
With an existing token
Section titled “With an existing token”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:
export NWEB_API_TOKEN="..."$env:NWEB_API_TOKEN = "..."Other optional environment variables: NWEB_API_ENDPOINT, RETASK_PROFILE,
RETASK_NO_PERSIST.
Multiple workspaces
Section titled “Multiple workspaces”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:
export NWEB_API_KEY="nweb_pat_..."retask auth login --profile acme
export NWEB_API_KEY="nweb_pat_..."retask auth login --profile beta$env:NWEB_API_KEY = "nweb_pat_..."retask auth login --profile acme
$env:NWEB_API_KEY = "nweb_pat_..."retask auth login --profile betaEach 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:
retask project list --profile acmeretask task list --profile betaTo fix a profile for a whole shell instead of repeating the flag, set
RETASK_PROFILE:
export RETASK_PROFILE=acme$env:RETASK_PROFILE = "acme"If you’re ever unsure which workspace a profile points at, ask:
retask auth whoami --profile acmeFirst commands
Section titled “First commands”retask project listretask task create --project-id <id> --title "Fix login bug" --priority HIGHSee the command reference for every command.