Skip to content

EasyTask CLI Documentation

Welcome to the EasyTask CLI Documentation! The EasyTask CLI is a powerful command-line tool that lets you manage tasks, groups, events, agents, and the scheduler directly from your terminal. Use it to automate workflows, script bulk operations, and integrate EasyTask into your CI/CD pipelines.

🖥️ EasyTask CLI Overview

easytask -h
 Usage: easytask [OPTIONS] COMMAND [ARGS]...

 EasyTask CLI — manage tasks, groups, events, agents, and scheduler.

╭─ Options ───────────────────────────────────────────────────────────────────╮
│ --help  -h        Show this message and exit.                               │
╰─────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────╮
│ health      Check if easytask is reachable.                                 │
│ auth        Authentication commands.                                        │
│ tasks       Task management.                                                │
│ groups      Group management.                                               │
│ events      Event and action commands.                                      │
│ scheduler   Scheduler operations.                                           │
│ agents      Agent management.                                               │
│ admin       Admin — user and role management.                               │
╰─────────────────────────────────────────────────────────────────────────────╯

🖥️ Command Groups

Health

Authentication

Commands for logging in, logging out, and managing your session.

  • Login — Login to EasyTask and store credentials.
  • Logout — Logout and clear stored credentials.
  • Who Am I — Show current user profile.
  • Refresh Token — Refresh the authentication token.
  • Switch Instance — Switch to a different instance.

Tasks

Manage tasks — list, create, update, delete, export, and import.

Groups

Manage task groups — list, create, update, and delete.

Events

Event and action commands — force run, enable/disable, freeze/unfreeze, refresh, and more.

Scheduler

Scheduler operations — health, task runs, logs, upcoming tasks, and more.

Agents

Agent management — list, get details, restart, and monitor workers and queues.

Admin

Admin — user and role management.


❓ Frequently Asked Questions

How do I install the EasyTask CLI?

The EasyTask CLI is installed as part of the EasyTask agent setup. Follow the installation guide to download and install the CLI on your system. After installation, verify with easytask health.

Do I need to authenticate before using the CLI?

Yes. Run easytask auth login to authenticate and store your credentials locally. Once logged in, all subsequent commands use your stored session. You can check your current session with easytask auth whoami.

Can I use the CLI in CI/CD pipelines?

Absolutely. The CLI supports non-interactive login via --username and --password flags, making it ideal for automated environments. You can also set the EASYTASK_API_URL environment variable to configure the API endpoint without passing --api-url each time.

What output formats does the CLI support?

Most list and get commands support --output table|json|yaml (default: table). Use JSON or YAML output for scripting and automation, for example: easytask tasks list --output json.

How do I manage multiple EasyTask instances?

Use easytask auth switch-instance to switch between registered instances. You can also specify --api-url on any command to target a different instance temporarily.

Can I import and export tasks in bulk?

Yes. Use easytask tasks export to export all tasks and groups as JSON, and easytask tasks import to import them. This is useful for migrating task definitions between environments or backing up your configuration.

What roles and permissions does the CLI enforce?

The CLI enforces the same role-based access control as the EasyTask web interface. Admin commands (under easytask admin) require the admin role or higher. Non-superadmin users cannot assign the superadmin role. Use easytask admin roles-list to view available roles.


⏭️ Next Steps