🔧 Where my dotfiles lives in harmony and peace, most of the time

✨ Add pi profile sync support

+366
+4
agents/pi/profiles/.gitignore
··· 1 + */auth.json 2 + */bin/ 3 + */sessions/ 4 + */settings.json
+5
agents/pi/profiles/sam/SYSTEM.md
··· 1 + You are SAM, a pragmatic asistant. Concise and useful. 2 + 3 + ## Skills 4 + 5 + - [Todoist](/home/david/.pi/agent/profiles/sam/skills/todoist-cli/SKILL.md) to Manage Todoist tasks, projects, labels, comments, and more via the td CLI.
+320
agents/pi/profiles/sam/skills/todoist-cli/SKILL.md
··· 1 + --- 2 + name: todoist-cli 3 + description: Manage Todoist tasks, projects, labels, comments, and more via the td CLI 4 + --- 5 + 6 + # Todoist CLI (td) 7 + 8 + Use this skill when the user wants to interact with their Todoist tasks. 9 + 10 + ## Quick Reference 11 + 12 + - `td today` - Tasks due today and overdue 13 + - `td inbox` - Inbox tasks 14 + - `td upcoming` - Tasks due in next N days 15 + - `td completed` - Recently completed tasks 16 + - `td task add "content"` - Add a task 17 + - `td task list` - List tasks with filters 18 + - `td task complete <ref>` - Complete a task 19 + - `td project list` - List projects 20 + - `td label list` - List labels 21 + - `td filter list/view` - Manage and use saved filters 22 + - `td workspace list` - List workspaces 23 + - `td activity` - Activity logs 24 + - `td notification list` - Notifications 25 + - `td reminder add` - Task reminders 26 + - `td stats` - Productivity stats 27 + - `td settings view` - User settings 28 + - `td completion install` - Install shell completions 29 + - `td view <url>` - View supported Todoist entities/pages by URL 30 + - `td update` - Self-update the CLI to the latest version 31 + 32 + ## Output Formats 33 + 34 + All list commands support: 35 + - `--json` - JSON output (essential fields) 36 + - `--ndjson` - Newline-delimited JSON (streaming) 37 + - `--full` - Include all fields in JSON 38 + - `--raw` - Disable markdown rendering 39 + 40 + ## Shared List Options 41 + 42 + Most list commands also support: 43 + - `--limit <n>` - Limit number of results 44 + - `--all` - Fetch all results (no limit) 45 + - `--cursor <cursor>` - Continue from pagination cursor 46 + - `--show-urls` - Show web app URLs for each item 47 + 48 + ## Global Options 49 + 50 + - `--no-spinner` - Disable loading animations 51 + - `--progress-jsonl` - Machine-readable progress events (JSONL to stderr) 52 + - `-v, --verbose` - Verbose output to stderr (repeat: -v info, -vv detail, -vvv debug, -vvvv trace) 53 + - `--accessible` - Add text labels to color-coded output (due:/deadline:/~ prefixes, ★ for favorites). Also: `TD_ACCESSIBLE=1` 54 + 55 + ## References 56 + 57 + Tasks, projects, labels, and filters can be referenced by: 58 + - Name (fuzzy matched within context) 59 + - `id:xxx` - Explicit ID 60 + - Todoist URL - Paste directly from the web app (e.g., `https://app.todoist.com/app/task/buy-milk-8Jx4mVr72kPn3QwB` or `https://app.todoist.com/app/project/work-2pN7vKx49mRq6YhT`) 61 + 62 + ## Priority Mapping 63 + 64 + - p1 = Highest priority (API value 4) 65 + - p2 = High priority (API value 3) 66 + - p3 = Medium priority (API value 2) 67 + - p4 = Lowest priority (API value 1, default) 68 + 69 + ## Commands 70 + 71 + ### Today 72 + ```bash 73 + td today # Due today + overdue 74 + td today --json # JSON output 75 + td today --workspace "Work" # Filter to workspace 76 + td today --personal # Personal projects only 77 + td today --any-assignee # Include tasks assigned to others 78 + ``` 79 + 80 + ### Inbox 81 + ```bash 82 + td inbox # Inbox tasks 83 + td inbox --priority p1 # Filter by priority 84 + td inbox --due today # Filter by due date 85 + ``` 86 + 87 + ### Upcoming 88 + ```bash 89 + td upcoming # Next 7 days 90 + td upcoming 14 # Next 14 days 91 + td upcoming --workspace "Work" # Filter to workspace 92 + td upcoming --personal # Personal projects only 93 + td upcoming --any-assignee # Include tasks assigned to others 94 + ``` 95 + 96 + ### Completed 97 + ```bash 98 + td completed # Completed today 99 + td completed --since 2024-01-01 --until 2024-01-31 100 + td completed --project "Work" # Filter by project 101 + ``` 102 + 103 + ### Task Management 104 + ```bash 105 + # List with filters 106 + td task list --project "Work" 107 + td task list --label "urgent" --priority p1 108 + td task list --due today 109 + td task list --filter "today | overdue" 110 + td task list --assignee me 111 + td task list --assignee "john@example.com" 112 + td task list --unassigned 113 + td task list --workspace "Work" 114 + td task list --personal 115 + td task list --parent "Parent task" 116 + 117 + # View, complete, uncomplete 118 + td task view "task name" 119 + td task complete "task name" 120 + td task complete id:123456 121 + td task complete "task name" --forever # Stop recurrence 122 + td task uncomplete id:123456 # Reopen completed task 123 + 124 + # Add tasks 125 + td task add "New task" --due "tomorrow" --priority p2 126 + td task add "Task" --deadline "2024-03-01" --project "Work" 127 + td task add "Task" --duration 1h --section "Planning" --project "Work" 128 + td task add "Task" --labels "urgent,review" --parent "Parent task" 129 + td task add "Task" --description "Details here" --assignee me 130 + 131 + # Update 132 + td task update "task name" --due "next week" 133 + td task update "task name" --deadline "2024-06-01" 134 + td task update "task name" --no-deadline 135 + td task update "task name" --duration 2h 136 + td task update "task name" --assignee "john@example.com" 137 + td task update "task name" --unassign 138 + 139 + # Move 140 + td task move "task name" --project "Personal" 141 + td task move "task name" --section "In Progress" 142 + td task move "task name" --parent "Parent task" 143 + td task move "task name" --no-parent # Move to project root 144 + td task move "task name" --no-section # Remove from section 145 + 146 + # Delete and browse 147 + td task delete "task name" --yes 148 + td task browse "task name" # Open in browser 149 + ``` 150 + 151 + ### Projects 152 + ```bash 153 + td project list 154 + td project list --personal # Personal projects only 155 + td project view "Project Name" 156 + td project collaborators "Project Name" 157 + td project create --name "New Project" --color "blue" 158 + td project update "Project Name" --favorite 159 + td project archive "Project Name" 160 + td project unarchive "Project Name" 161 + td project delete "Project Name" --yes 162 + td project browse "Project Name" # Open in browser 163 + td project move "Project Name" --to-workspace "Acme" 164 + td project move "Project Name" --to-workspace "Acme" --folder "Engineering" 165 + td project move "Project Name" --to-workspace "Acme" --visibility team 166 + td project move "Project Name" --to-personal 167 + # move requires --yes to confirm (without it, shows a dry-run preview) 168 + ``` 169 + 170 + ### Labels 171 + ```bash 172 + td label list # Lists personal + shared labels 173 + td label view "urgent" # View label details and tasks 174 + td label view "team-review" # Works for shared labels too 175 + td label create --name "urgent" --color "red" 176 + td label update "urgent" --color "orange" 177 + td label delete "urgent" --yes 178 + td label browse "urgent" # Open in browser 179 + ``` 180 + 181 + Note: Shared labels (from collaborative projects) appear in `list` and can be viewed, but cannot be deleted/updated via the standard label commands since they have no ID. 182 + 183 + ### Comments 184 + ```bash 185 + td comment list --task "task name" 186 + td comment list --project "Project Name" -P # Project comments 187 + td comment add --task "task name" --content "Comment text" 188 + td comment add --task "task name" --content "See attached" --file ./report.pdf 189 + td comment view id:123 # View full comment 190 + td comment update id:123 --content "Updated text" 191 + td comment delete id:123 --yes 192 + td comment browse id:123 # Open in browser 193 + ``` 194 + 195 + ### Sections 196 + ```bash 197 + td section list "Work" # List sections in project (or --project "Work") 198 + td section list --project "Work" # Same, using named flag 199 + td section create --project "Work" --name "In Progress" 200 + td section update id:123 --name "Done" 201 + td section delete id:123 --yes 202 + td section browse id:123 # Open in browser 203 + ``` 204 + 205 + ### Filters 206 + ```bash 207 + td filter list 208 + td filter create --name "Urgent work" --query "p1 & #Work" 209 + td filter view "Urgent work" # Show tasks matching filter (alias: show) 210 + td filter update "Urgent work" --query "p1 & #Work & today" 211 + td filter delete "Urgent work" --yes 212 + td filter browse "Urgent work" # Open in browser 213 + ``` 214 + 215 + ### Workspaces 216 + ```bash 217 + td workspace list 218 + td workspace view "Workspace Name" 219 + td workspace projects "Workspace Name" # or --workspace "Workspace Name" 220 + td workspace users "Workspace Name" --role ADMIN,MEMBER # or --workspace "..." 221 + ``` 222 + 223 + ### Activity 224 + ```bash 225 + td activity # Recent activity 226 + td activity --since 2024-01-01 --until 2024-01-31 227 + td activity --type task --event completed 228 + td activity --project "Work" 229 + td activity --by me 230 + ``` 231 + 232 + ### Notifications 233 + ```bash 234 + td notification list 235 + td notification list --unread 236 + td notification list --type "item_assign" 237 + td notification view id:123 238 + td notification read --all --yes # Mark all as read 239 + td notification accept id:123 # Accept share invitation 240 + td notification reject id:123 # Reject share invitation 241 + ``` 242 + 243 + ### Reminders 244 + ```bash 245 + td reminder list "task name" # or --task "task name" 246 + td reminder add "task name" --before 30m # or --task "task name" --before 30m 247 + td reminder add "task name" --at "2024-01-15 10:00" 248 + td reminder update id:123 --before 1h 249 + td reminder delete id:123 --yes 250 + ``` 251 + 252 + ### Stats 253 + ```bash 254 + td stats # View karma and productivity 255 + td stats --json 256 + td stats goals --daily 10 --weekly 50 257 + td stats vacation --on # Enable vacation mode 258 + td stats vacation --off # Disable vacation mode 259 + ``` 260 + 261 + ### Settings 262 + ```bash 263 + td settings view 264 + td settings view --json 265 + td settings update --timezone "America/New_York" 266 + td settings update --time-format 24 --date-format intl 267 + td settings themes # List available themes 268 + ``` 269 + 270 + ### Shell Completions 271 + ```bash 272 + td completion install # Install tab completions (prompts for shell) 273 + td completion install bash # Install for specific shell 274 + td completion install zsh 275 + td completion install fish 276 + td completion uninstall # Remove completions 277 + ``` 278 + 279 + ### View (URL Router) 280 + ```bash 281 + td view <todoist-url> # Auto-route to appropriate view by URL type 282 + td view https://app.todoist.com/app/task/buy-milk-abc123 283 + td view https://app.todoist.com/app/project/work-def456 284 + td view https://app.todoist.com/app/label/urgent-ghi789 285 + td view https://app.todoist.com/app/filter/work-tasks-jkl012 286 + td view https://app.todoist.com/app/today 287 + td view https://app.todoist.com/app/upcoming 288 + td view <url> --json # JSON output for entity views 289 + td view <url> --limit 25 --ndjson # Passthrough list options where supported 290 + ``` 291 + 292 + ### Update 293 + ```bash 294 + td update # Update CLI to latest version 295 + td update --check # Check for updates without installing 296 + ``` 297 + 298 + ## Examples 299 + 300 + ### Daily workflow 301 + ```bash 302 + td today --json | jq '.results | length' # Count today's tasks 303 + td inbox --limit 5 # Quick inbox check 304 + td upcoming # What's coming this week 305 + td completed # What I finished today 306 + ``` 307 + 308 + ### Filter by multiple criteria 309 + ```bash 310 + td task list --project "Work" --label "urgent" --priority p1 311 + td task list --filter "today & #Work" 312 + td task list --workspace "Work" --due today 313 + ``` 314 + 315 + ### Complete tasks efficiently 316 + ```bash 317 + td task complete "Review PR" 318 + td task complete id:123456789 319 + td task uncomplete id:123456789 # Reopen if needed 320 + ```
+37
agents/setup.sh
··· 9 9 PI_AGENT_DIR="${HOME}/.pi/agent" 10 10 AMP_DIR="${HOME}/.config/amp" 11 11 12 + link_pi_profiles() { 13 + local source_profiles_dir="${AGENTS_DIR}/pi/profiles" 14 + local target_profiles_dir="${PI_AGENT_DIR}/profiles" 15 + local profile_entries 16 + local source_has_profiles=false 17 + local target_has_profiles=false 18 + 19 + mkdir -p "${source_profiles_dir}" 20 + 21 + if [[ -d "${target_profiles_dir}" && ! -L "${target_profiles_dir}" ]]; then 22 + if find "${source_profiles_dir}" -mindepth 1 -maxdepth 1 ! -name '.gitignore' -print -quit | grep -q .; then 23 + source_has_profiles=true 24 + fi 25 + 26 + if find "${target_profiles_dir}" -mindepth 1 -maxdepth 1 -print -quit | grep -q .; then 27 + target_has_profiles=true 28 + fi 29 + 30 + if [[ "${source_has_profiles}" == true && "${target_has_profiles}" == true ]]; then 31 + echo "Refusing to migrate ${target_profiles_dir}: both profile dirs contain data" >&2 32 + exit 1 33 + fi 34 + 35 + shopt -s dotglob nullglob 36 + profile_entries=("${target_profiles_dir}"/*) 37 + if (( ${#profile_entries[@]} > 0 )); then 38 + mv "${profile_entries[@]}" "${source_profiles_dir}/" 39 + fi 40 + shopt -u dotglob nullglob 41 + 42 + rmdir "${target_profiles_dir}" 2>/dev/null || true 43 + fi 44 + 45 + ln -sfT "${source_profiles_dir}" "${target_profiles_dir}" 46 + } 47 + 12 48 packages=( 13 49 pi-coding-agent 14 50 agent-browser ··· 26 62 ln -sf "${AGENTS_DIR}/AGENTS.md" "${CODEX_DIR}/AGENTS.md" 27 63 28 64 mkdir -p "${PI_AGENT_DIR}" 65 + link_pi_profiles 29 66 ln -sf "${AGENTS_DIR}/AGENTS.md" "${PI_AGENT_DIR}/AGENTS.md" 30 67 ln -sf "${AGENTS_DIR}/pi/settings.json" "${PI_AGENT_DIR}/settings.json" 31 68 ln -sfT "${AGENTS_DIR}/pi/extensions" "${PI_AGENT_DIR}/extensions"