asana_lite.py script manages your Asana tasks, including listing today’s tasks, moving tasks from yesterday to today, and exporting completed tasks to client log files (bitácoras).
Command Syntax
Options
Move all pending tasks with a due date of yesterday to today. Only moves incomplete tasks assigned to you.
Export tasks completed yesterday to client log files (bitácoras). Reads task descriptions and adds entries to
context/clients/<client>/bitacoras/<YYYY>/<MM>.mdIf no options are provided, the script lists all tasks due today.
Usage Examples
List today’s tasks
Move yesterday’s tasks to today
Export completed tasks to log files
This command reads the task name and description, matches it to a client/project based on
config/clients.yaml, and appends an entry to the corresponding monthly log file.Task Ordering
Tasks are automatically sorted by day of the week usingconfig/asana_order.yaml. This allows you to prioritize certain projects on specific days.
Example config/asana_order.yaml:
Environment Variables
The Asana command uses these environment variables from.env:
Your Asana Personal Access Token. Get this from Asana App Settings.
Your Asana workspace ID. If not set, uses the first workspace from your account.
The GID of your “My tasks” or inbox project. If set, ensures all tasks due today are added to this project.
The GID of the “Today” section in your inbox project. If not set, searches for a section named “Today”.
How It Works
Listing Tasks
When you run the script without options:- Fetches all tasks assigned to you with
due_on= today - If
ASANA_INBOX_PROJECT_GIDis set, ensures tasks are in that project - Moves tasks to the “Today” section if
ASANA_TODAY_SECTION_GIDis configured - Sorts tasks by project priority using
config/asana_order.yaml - Displays the sorted task list
Moving Tasks
When using--move-yesterday-to-today:
- Queries Asana API for tasks with
due_on= yesterday - Filters for incomplete tasks assigned to you
- Updates each task’s
due_onfield to today - Reports the number of tasks moved
Exporting to Log Files
When using--completed-yesterday-to-bitacora:
- Queries tasks completed yesterday (using
completed_attimestamp) - Extracts task name, project, and notes (description)
- Matches task to client using
config/clients.yamlkeywords - Appends entry to
context/clients/<client>/bitacoras/<YYYY>/<MM>.md - Reports the number of entries added
API Requirements
Exit Codes
- 0: Success - operation completed
- Non-zero: Error or no token configured
Error Conditions
Advanced Usage
Finding Your Workspace GID
If you have multiple workspaces and want to specify which one to use:- Go to Asana
- Check the URL:
https://app.asana.com/0/<workspace_gid>/home - Add to
.env:ASANA_WORKSPACE_GID=<workspace_gid>
Finding Project and Section GIDs
To find your “My tasks” project GID and “Today” section GID:- Open your “My tasks” in Asana
- Check the URL:
https://app.asana.com/0/<project_gid>/list - Add to
.env:ASANA_INBOX_PROJECT_GID=<project_gid>
"name": "Today" and use its GID.
Automatic Task Organization
WhenASANA_INBOX_PROJECT_GID and ASANA_TODAY_SECTION_GID are both configured:
- Tasks due today are automatically added to your inbox project
- Tasks are moved to the “Today” section
- Tasks appear in your “Today” view in Asana
Client Matching
For--completed-yesterday-to-bitacora, tasks are matched to clients using:
- Project name: Matched against client names in
config/clients.yaml - Task name: Searched for client keywords
- Task description: Searched for client keywords
Configuration Files
config/asana_order.yaml- Project ordering by day of weekconfig/clients.yaml- Client keywords for matching taskscontext/clients/<client>/projects/*/matches.yaml- Project-specific matching rules
Related Commands
- run-morning - Full morning routine (includes Asana steps 2, 3, 6)
- calendar - Calendar integration for matching events to tasks