{"id":34082418,"url":"https://github.com/fniessink/next-action","last_synced_at":"2025-12-30T08:04:34.711Z","repository":{"id":32353106,"uuid":"131583406","full_name":"fniessink/next-action","owner":"fniessink","description":"Next-action: determine the next action to work on from a list of actions in a todo.txt file","archived":true,"fork":false,"pushed_at":"2024-12-08T21:56:10.000Z","size":9673,"stargazers_count":17,"open_issues_count":33,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-16T14:31:48.218Z","etag":null,"topics":["command-line-tool","getting-things-done","gtd","task-list","tasklist","todo","todo-list","todoapp","todolist","todotxt"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fniessink.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-30T10:35:50.000Z","updated_at":"2025-06-06T20:54:03.000Z","dependencies_parsed_at":"2023-02-18T02:30:34.896Z","dependency_job_id":"9524942a-79b3-4f43-a9a0-243a4f4586d1","html_url":"https://github.com/fniessink/next-action","commit_stats":{"total_commits":888,"total_committers":4,"mean_commits":222.0,"dds":"0.34346846846846846","last_synced_commit":"dd0ce0f7afe525eec1194b7ba4c4c78a22d4e27b"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/fniessink/next-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fniessink%2Fnext-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fniessink%2Fnext-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fniessink%2Fnext-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fniessink%2Fnext-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fniessink","download_url":"https://codeload.github.com/fniessink/next-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fniessink%2Fnext-action/sbom","scorecard":{"id":405659,"data":{"date":"2025-08-11","repo":{"name":"github.com/fniessink/next-action","commit":"0bf239d2b7ffe760c622e027a75d48bd1777ef37"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 30 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: containerImage not pinned by hash: Dockerfile:3: pin your Docker image by updating python:3.11-alpine to python:3.11-alpine@sha256:8d8c6d3808243160605925c2a7ab2dc5c72d0e75651699b0639143613e0855b8","Warn: npmCommand not pinned by hash: Dockerfile:21","Warn: pipCommand not pinned by hash: Dockerfile:24","Warn: pipCommand not pinned by hash: Dockerfile:24","Warn: pipCommand not pinned by hash: ci/behave.sh:3","Warn: pipCommand not pinned by hash: ci/docs.sh:7","Info:   0 out of   1 npmCommand dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T21:12:03.374Z","repository_id":32353106,"created_at":"2025-08-18T21:12:03.375Z","updated_at":"2025-08-18T21:12:03.375Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28124756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-30T02:00:05.476Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","getting-things-done","gtd","task-list","tasklist","todo","todo-list","todoapp","todolist","todotxt"],"created_at":"2025-12-14T12:15:34.142Z","updated_at":"2025-12-30T08:04:34.699Z","avatar_url":"https://github.com/fniessink.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next-action\n\n[![PyPI](https://img.shields.io/pypi/v/next-action.svg)](https://pypi.org/project/next-action/)\n[![Updates](https://pyup.io/repos/github/fniessink/next-action/shield.svg)](https://pyup.io/repos/github/fniessink/next-action/)\n[![Build Status](https://travis-ci.com/fniessink/next-action.svg?branch=master)](https://travis-ci.com/fniessink/next-action)\n[![SonarQube Badge](https://sonarcloud.io/api/project_badges/measure?project=fniessink%3Anext-action\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=fniessink%3Anext-action)\n\nDetermine the next action to work on from a list of actions in a todo.txt file.\n\nDon't know what *Todo.txt* is? See \u003chttps://github.com/todotxt/todo.txt\u003e for the *Todo.txt* specification.\n\n*Next-action* is not a tool for editing todo.txt files, see \u003chttp://todotxt.org\u003e for available options.\n\n## Table of contents\n\n- [Demo](#demo)\n- [Installation](#installation)\n  - [*Next-action*](#next-action)\n  - [Tab completion for *Next-action*](#tab-completion-for-next-action)\n- [Usage](#usage)\n  - [Limiting the tasks from which next actions are selected](#limiting-the-tasks-from-which-next-actions-are-selected)\n  - [Showing more than one next action](#showing-more-than-one-next-action)\n  - [Task dependencies](#task-dependencies)\n  - [Output options](#output-options)\n  - [Configuring *Next-action*](#configuring-next-action)\n  - [Option details](#option-details)\n- [Recent changes](#recent-changes)\n- [Developing *Next-action*](#developing-next-action)\n  - [Installing the development environment and dependencies](#installing-the-development-environment-and-dependencies)\n  - [Running unit tests](#running-unit-tests)\n  - [Running feature tests](#running-feature-tests)\n  - [Running quality checks](#running-quality-checks)\n  - [Generating documentation](#generating-documentation)\n  - [Source code structure and dependencies](#source-code-structure-and-dependencies)\n\n## Demo\n\n![gif](https://raw.githubusercontent.com/fniessink/next-action/master/docs/demo.gif)\n\n## Installation\n\n### *Next-action*\n\n*Next-action* requires Python 3.6 or newer.\n\n`pip install --upgrade next-action`\n\n### Tab completion for *Next-action*\n\nTo install tab completion for *Next-action* in the Bash shell, follow these steps:\n\n- Download [extra/.next-action-completion.bash](https://raw.githubusercontent.com/fniessink/next-action/master/extra/.next-action-completion.bash)\n  and save it in your home folder.\n- Next, add this line to your `~/.bash_profile` file:\n\n  ```bash\n  source ~/.next-action-completion.bash\n  ```\n\n- Then, open a new terminal.\n\nTyping `next-action [TAB]` should give you the possible command line options. Hitting tab after an option that takes\narguments, shows the possible arguments.\n\n## Usage\n\n```console\n$ next-action --help\nUsage: next-action [-h] [-V] [-c [\u003cconfig.cfg\u003e] | -w] [-f \u003ctodo.txt\u003e ...] [-b] [-g [\u003cgroup\u003e]] [-l] [-r \u003cref\u003e]\n[-s [\u003cstyle\u003e]] [-a | -n \u003cnumber\u003e] [-d [\u003cdue date\u003e] | -o] [-p [\u003cpriority\u003e]] [-u] [--] [\u003ccontext|project\u003e\n...]\n\nShow the next action in your todo.txt. The next action is selected from the tasks in the todo.txt file based\non task properties such as priority, due date, and creation date. Limit the tasks from which the next action\nis selected by specifying contexts the tasks must have and/or projects the tasks must belong to.\n\nOptions:\n  -h, --help            show this help message and exit\n  -V, --version         show program's version number and exit\n\nConfiguration options:\n  -c [\u003cconfig.cfg\u003e], --config-file [\u003cconfig.cfg\u003e]\n                        filename of configuration file to read (default: ~/.next-action.cfg); omit filename\n                        to not read any configuration file\n  -w, --write-config-file\n                        generate a sample configuration file and exit\n\nInput options:\n  -f \u003ctodo.txt\u003e, --file \u003ctodo.txt\u003e\n                        filename of todo.txt file to read; can be '-' to read from standard input; argument\n                        can be repeated to read tasks from multiple todo.txt files (default: ~/todo.txt)\n\nOutput options:\n  -b, --blocked         show the tasks blocked by the next action, if any (default: False)\n  -g [\u003cgroup\u003e], --groupby [\u003cgroup\u003e]\n                        group the next actions; available groups: context, duedate, priority, project,\n                        source (default: None)\n  -l, --line-number     reference next actions with the line number in their todo.txt file (default: False)\n  -r {always,never,multiple}, --reference {always,never,multiple}\n                        reference next actions with the name of their todo.txt file (default: when reading\n                        multiple todo.txt files)\n  -s [\u003cstyle\u003e], --style [\u003cstyle\u003e]\n                        colorize the output; available styles: abap, algol, algol_nu, arduino, autumn,\n                        borland, bw, colorful, default, dracula, emacs, friendly, friendly_grayscale,\n                        fruity, github-dark, gruvbox-dark, gruvbox-light, igor, inkpot, lilypond, lovelace,\n                        manni, material, monokai, murphy, native, nord, nord-darker, one-dark, paraiso-dark,\n                        paraiso-light, pastie, perldoc, rainbow_dash, rrt, sas, solarized-dark, solarized-\n                        light, staroffice, stata, stata-dark, stata-light, tango, trac, vim, vs, xcode,\n                        zenburn (default: None)\n  -u, --open-urls       open the urls in the next actions, if any (default: False)\n\nShow multiple next actions:\n  -a, --all             show all next actions\n  -n \u003cnumber\u003e, --number \u003cnumber\u003e\n                        number of next actions to show (default: 1)\n\nLimit the tasks from which the next actions are selected:\n  -d [\u003cdue date\u003e], --due [\u003cdue date\u003e]\n                        show only next actions with a due date; if a date is given, show only next actions\n                        due on or before that date\n  -o, --overdue         show only overdue next actions\n  -p [\u003cpriority\u003e], --priority [\u003cpriority\u003e]\n                        minimum priority (A-Z) of next actions to show (default: None)\n  @\u003ccontext\u003e ...        contexts the next action must have\n  +\u003cproject\u003e ...        projects the next action must be part of; if repeated the next action must be part\n                        of at least one of the projects\n  -@\u003ccontext\u003e ...       contexts the next action must not have\n  -+\u003cproject\u003e ...       projects the next action must not be part of\n\nUse -- to separate options with optional arguments from contexts and projects, in order to handle cases\nwhere a context or project is mistaken for an argument to an option.\n```\n\nAssuming your todo.txt file is in your home folder, running *Next-action* without arguments will show the next action\nyou should do. For example, given this\n[todo.txt](https://raw.githubusercontent.com/fniessink/next-action/master/docs/todo.txt), calling mom would be the next\naction:\n\n```console\n$ next-action\n(A) Call mom @phone\n```\n\nThe next action is determined using priority. Due date is considered after priority, with tasks due earlier getting\nprecedence over tasks due later. Creation date is considered after due date, with older tasks getting precedence over\nnewer tasks. Finally, tasks that belong to more projects get precedence over tasks that belong to fewer projects.\n\nSeveral types of tasks can not be a next action:\n\n- completed tasks (~~`x This is a completed task`~~),\n- tasks with a creation date in the future (`9999-01-01 Start preparing for five-digit years`),\n- tasks with a future threshold date (`Start preparing for emigration to Mars t:3000-01-01`),\n- blocked tasks (see [task dependencies](#task-dependencies) below), and\n- hidden tasks (`This is a hidden task h:1`).\n\n### Limiting the tasks from which next actions are selected\n\n#### By contexts and/or projects\n\nYou can limit the tasks from which *Next-action* picks the next action by passing contexts and/or projects:\n\n```console\n$ next-action @work\n(C) Finish proposal for important client @work\n$ next-action +DogHouse\n(G) Buy wood for new +DogHouse @store\n$ next-action +DogHouse @home\nGet rid of old +DogHouse @home\n```\n\nWhen you supply multiple contexts and/or projects, the next action belongs to all of the contexts and at least one of\nthe projects:\n\n```console\n$ next-action +DogHouse +PaintHouse @store @weekend\n(B) Buy paint to +PaintHouse @store @weekend\n```\n\nIt is also possible to exclude contexts, which means the next action will not have the specified contexts:\n\n```console\n$ next-action +PaintHouse -@store\nBorrow ladder from the neighbors +PaintHouse @home\n```\n\nAnd of course, in a similar vein, projects can be excluded:\n\n```console\n$ next-action -+PaintHouse @store\n(G) Buy wood for new +DogHouse @store\n```\n\nIf no tasks match the combination of tasks and projects, it's time to get some coffee:\n\n```console\n$ next-action +DogHouse @weekend\nNothing to do! 😴\n```\n\nIf there's nothing to do because you use contexts or projects that aren't present in the todo.txt file, *Next-action*\nwill warn you:\n\n```console\n$ next-action +PaintGarage @freetime\nNothing to do! (warning: unknown context: freetime; unknown project: PaintGarage)\n```\n\n#### By due date\n\nTo limit the the tasks from which the next action is selected to actions with a due date, use the `--due` option:\n\n```console\n$ next-action @home --due\n(K) Pay October invoice @home due:2023-10-28\n```\n\nAdd a due date to select a next action from tasks due on or before that date:\n\n```console\n$ next-action @home --due \"2023-10-01\"\n(L) Pay September invoice @home due:2023-09-28\n```\n\nTo make sure you have no overdue actions, or work on overdue actions first, limit the tasks from which the next action\nis selected to overdue actions:\n\n```console\n$ next-action --overdue\nBuy flowers due:2018-02-14\n```\n\n#### By priority\n\nTo make sure you work on important tasks rather than urgent tasks, you can make sure the tasks from which the\nnext action is selected have at least a minimum priority:\n\n```console\n$ next-action @work --priority C\n(C) Finish proposal for important client @work\n```\n\n### Showing more than one next action\n\nTo show more than one next action, supply the number you think you can handle:\n\n```console\n$ next-action --number 3\n(A) Call mom @phone\n(B) Buy paint to +PaintHouse @store @weekend\n(C) Finish proposal for important client @work\n```\n\nOr show all next actions, e.g. for a specific context:\n\n```console\n$ next-action --all @store\n(B) Buy paint to +PaintHouse @store @weekend\n(G) Buy wood for new +DogHouse @store\nBuy groceries @store +DinnerParty before:meal\n```\n\nNote again that completed tasks, tasks with a future creation or threshold date, and blocked tasks are never the next\naction.\n\n### Task dependencies\n\n*Next-action* takes task dependencies into account when determining the next actions. For example, that cooking a meal\ndepends on buying groceries and that doing the dishes comes after cooking the meal can be specified as follows:\n\n```console\n$ grep +DinnerParty docs/todo.txt\nBuy groceries @store +DinnerParty before:meal\nCook meal @home +DinnerParty id:meal due:2018-07-01\nTake out the garbage @home +DinnerParty due:2018-07-02\nDo the dishes @home +DinnerParty after:meal\n```\n\nThis means that buying groceries blocks cooking the meal; cooking, and thus doing the dishes as well, can't be done\nuntil buying the groceries has been completed:\n\n```console\n$ next-action --all +DinnerParty\nBuy groceries @store +DinnerParty before:meal\nTake out the garbage @home +DinnerParty due:2018-07-02\n```\n\nNote how buying the groceries comes before taking out the garbage even though buying the groceries has no due date and\ntaking out the garbage does. As buying groceries has to be done before cooking the meal and cooking the meal does have\na due date, buying groceries takes on the same due date as cooking the meal. Priority is taken into account in a\nsimilar way.\n\nTo show which tasks are blocked by the next action, use the `--blocked` option:\n\n```console\n$ next-action --blocked --all +DinnerParty\nBuy groceries @store +DinnerParty before:meal\nblocks:\n- Cook meal @home +DinnerParty id:meal due:2018-07-01\n  blocks:\n  - Do the dishes @home +DinnerParty after:meal\nTake out the garbage @home +DinnerParty due:2018-07-02\n```\n\nIf you always want to see the tasks that are blocked by the next action, you can configure this in the configuration\nfile. See the section below on how to configure *Next-action*.\n\nAdditional notes:\n\n- The ids can be any string without whitespace.\n- Instead of `before` you can also use `p` (for \"parent\") because some other tools that work with *Todo.txt* files\n  use that.\n- A task can block multiple other tasks by repeating the before key,\n  e.g. `Buy groceries before:cooking and before:sending_invites`.\n- A task can be blocked by multiple other tasks by repeating the after key,\n  e.g. `Eat meal after:cooking and after:setting_the_table`.\n- If a task blocks one or more tasks, the blocking task takes on the priority and due date of the tasks it is blocking:\n  - the blocking task is considered to have a priority that is the maximum of its own priority and the priorities of\n    the tasks it is blocking, and\n  - the blocking task is considered to have a due date that is the minimum of its own due date and the due dates of\n    the tasks it is blocking.\n\n### Output options\n\nBy default, *Next-action* references the todo.txt file from which actions were read if you read tasks from multiple\ntodo.txt files. The `--reference` option controls this:\n\n```console\n$ next-action --reference always\n(A) Call mom @phone [docs/todo.txt]\n```\n\nUse `--reference never` to not show the source files, even when tasks are read from multiple todo.txt files. To\npermanently change this, configure the `reference` option in the configuration file. See the section below on how to\nconfigure *Next-action*.\n\nTo make *Next-action* reference the line number that tasks have in their source todo.txt files, use the `--line-number`\noption:\n\n```console\n$ next-action --line-number\n(A) Call mom @phone [1]\n```\n\nIt's also possible to have *Next-action* show both the source file and the line number:\n\n```console\n$ next-action --line-number --reference always\n(A) Call mom @phone [docs/todo.txt:1]\n```\n\nSee the section below on how to configure *Next-action* to always show the source file and/or line number.\n\nThe next actions can be colorized using the `--style` argument. Run `next-action --help` to see the list of possible\nstyles.\n\nWhen you've decided on a style you prefer, it makes sense to configure the style in the configuration file. See the\nsection below on how to configure *Next-action*.\n\nNot passing an argument to `--style` cancels the style that is configured in the configuration file, if any.\n\nWhen showing multiple next actions, these can be grouped by passing the `--groupby` option:\n\n```console\n$ next-action --number 5 --groupby context\nphone:\n- (A) Call mom @phone\nstore:\n- (B) Buy paint to +PaintHouse @store @weekend\n- (G) Buy wood for new +DogHouse @store\nweekend:\n- (B) Buy paint to +PaintHouse @store @weekend\nwork:\n- (C) Finish proposal for important client @work\nhome:\n- (K) Pay October invoice @home due:2023-10-28\n```\n\n*Next-action* sorts the groups according to the most important next action in the group. Actions may be repeated\nif they belong to multiple groups, as is the case with the `Buy paint` task above.\n\nIf you always want to group next actions, you can configure this in the configuration file. See the section\nbelow on how to configure *Next-action*.\n\nTo open URLs in the description of the next actions, use the `--open-urls` command line option.\n\n### Configuring *Next-action*\n\nIn addition to specifying options on the command-line, you can also configure options in a configuration file. The\nconfiguration file format is [YAML](http://yaml.org). The options currently supported are which todo.txt files must be\nread, how many next actions should be shown, output styling, and context and/or project filters.\n\n#### Writing the configuration file\n\nTo get started, you can tell *Next-action* to generate a configuration file with the default options:\n\n```console\n$ next-action --write-config-file\n# Configuration file for Next-action. Edit the settings below as you like.\nfile: ~/todo.txt\nnumber: 1\nreference: multiple\nstyle: default\n```\n\nTo make this the configuration that *Next-action* reads by default, redirect the output to `~/.next-action.cfg` like\nthis: `next-action --write-config-file \u003e ~/.next-action.cfg`.\n\nAny additional options specified on the command line are used to generate the configuration file:\n\n```console\n$ next-action --write-config-file --blocked --groupby context --number 3 --file ~/tasks.txt --style fruity --priority Z -@waiting\n# Configuration file for Next-action. Edit the settings below as you like.\nblocked: true\nfile: ~/tasks.txt\nfilters:\n- -@waiting\ngroupby: context\nnumber: 3\npriority: Z\nreference: multiple\nstyle: fruity\n```\n\n#### Reading the configuration file\n\nBy default, *Next-action* tries to read a file called\n[.next-action.cfg](https://raw.githubusercontent.com/fniessink/next-action/master/docs/.next-action.cfg) in your home\nfolder.\n\nIf you want to use a configuration file that is not in the default location (`~/.next-action.cfg`), you'll need to\nexplicitly specify its location:\n\n```console\n$ next-action --config-file docs/.next-action.cfg\n(A) Call mom @phone\n```\n\nTo skip reading the default configuration file, and also not read an alternative configuration file, use the\n`--config-file` option without arguments.\n\n#### Configuring a default todo.txt\n\nA default todo.txt file to use can be specified like this in the configuration file:\n\n```yaml\nfile: ~/Dropbox/todo.txt\n```\n\nMultiple todo.txt files can be listed, if needed:\n\n```yaml\nfile:\n  - personal-todo.txt\n  - work-todo.txt\n  - big-project/tasks.txt\n```\n\n#### Configuring the number of next actions to show\n\nThe number of next actions to show can be specified like this:\n\n```yaml\nnumber: 3\n```\n\nOr you can have *Next-action* show all next actions:\n\n```yaml\nall: True\n```\n\n#### Configuring the tasks from which next actions are selected\n\n##### Limiting by contexts and/or projects\n\nYou can limit the tasks from which the next action is selected by specifying contexts and/or projects to filter on,\njust like you would do on the command line:\n\n```yaml\nfilters: -+FutureProject @work -@waiting\n```\n\nThis would make *Next-action* by default select next actions from tasks with a `@work` context and without the\n`@waiting` context and not belonging to the `+FutureProject`.\n\nAn alternative syntax is:\n\n```yaml\nfilters:\n  - -+FutureProject\n  - '@work'\n  - -@waiting\n```\n\nNote that filters starting with `@` need to be in quotes. This is a\n[YAML restriction](http://yaml.org/spec/1.1/current.html#c-directive).\n\n##### Limiting by priority\n\nThe minimum priority of next actions to show can be specified as well:\n\n```yaml\npriority: Z\n```\n\nThis could be useful if you, for example, keep a backlog of ideas without priority in your todo.txt file and\nprioritize only the tasks that are actionable.\n\nSpecifying a value on the command line overrides the priority in the configuration file, e.g.\n`next-action --priority C`. To override the priority set in the configuration but not set another minimum priority,\nuse the priority option without argument: `next-action --priority`.\n\n#### Configuring the output\n\nWhether the next actions should have a reference to the todo.txt file from which they were read can be configured using\nthe `reference` keyword:\n\n```yaml\nreference: always\n```\n\nPossible values are `always`, `never`, or `multiple`. The latter means that the filename is only added when you read\ntasks from multiple todo.txt files. The default value is `multiple`.\n\nWhether the next actions should have a reference to their line number in the todo.txt file from which they were read\ncan be configured using the `line_number` keyword:\n\n```yaml\nline_number: true\n```\n\nThe output style can be configured using the `style` keyword:\n\n```yaml\nstyle: colorful\n```\n\nRun `next-action --help` to see the list of possible styles.\n\nTo always see the tasks blocked by the next action, put this in your configuration file:\n\n```yaml\nblocked: true\n```\n\nNext actions can be configured to be grouped as follows:\n\n```yaml\ngroupby: priority\n```\n\nPossible grouping options are by `context`, `duedate`, `priority`, `project`, and `source`. Specifying a value on\nthe command line overrides the grouping in the configuration file, e.g. `next-action --groupby project`.\nTo cancel the grouping set in the configuration file all together, use the groupby option without argument:\n`next-action --groupby`.\n\nTo always open URLs, use the `open_urls` option:\n\n```yaml\nopen_urls: true\n```\n\n### Option details\n\n#### Precedence\n\nOptions in the configuration file override the default options. Command-line options in turn override options in the\nconfiguration file.\n\nIf you have a configuration file with default options that you occasionally want to ignore, you can skip reading the\nconfiguration file entirely with the `--no-config-file` option.\n\n#### Optional arguments followed by positional arguments\n\nWhen you use an option that takes an optional argument, but have it followed by a positional argument, *Next-action*\nwill interpret the positional argument as the argument to the option and complain, e.g.:\n\n```console\n$ next-action --due @home\nUsage: next-action [-h] [-V] [-c [\u003cconfig.cfg\u003e] | -w] [-f \u003ctodo.txt\u003e ...] [-b] [-g [\u003cgroup\u003e]] [-l] [-r \u003cref\u003e]\n[-s [\u003cstyle\u003e]] [-a | -n \u003cnumber\u003e] [-d [\u003cdue date\u003e] | -o] [-p [\u003cpriority\u003e]] [-u] [--] [\u003ccontext|project\u003e\n...]\nnext-action: error: argument -d/--due: invalid date: @home\n```\n\nThere's two ways to help *Next-action* figure out what you mean. Either reverse the order of the arguments:\n\n```console\n$ next-action @home --due\n(K) Pay October invoice @home due:2023-10-28\n```\n\nOr use `--` to separate the option from the positional argument(s):\n\n```console\n$ next-action --due -- @home\n(K) Pay October invoice @home due:2023-10-28\n```\n\n## Recent changes\n\nSee the [change log](https://github.com/fniessink/next-action/blob/master/CHANGELOG.md).\n\n## Developing *Next-action*\n\n### Installing the development environment and dependencies\n\nWe use Docker as development environment. To build the Docker image with all the development dependencies make sure\nyou have Git and Docker installed. Then, follow these steps:\n\n- Clone the repository: `git clone https://github.com/fniessink/next-action.git`.\n- Enter the folder: `cd next-action`.\n- Build the Docker image: `docker build . -t next-action-dev`.\n\nThe `docker-compose.yml` contains services for each of the development tools. These are described below.\n\n### Running unit tests\n\nTo run the unit tests and check their code coverage:\n\n```console\n$ docker-compose --ansi never up unittest\nStarting next-action_unittest_1 ...\nStarting next-action_unittest_1 ... done\nAttaching to next-action_unittest_1\nunittest_1                | ----------------------------------------------------------------------\nunittest_1                | Ran 271 tests in 0.904s\nunittest_1                |\nunittest_1                | OK\nunittest_1                | Wrote XML report to build/unittest-coverage.xml\nunittest_1                | Wrote HTML report to build/unittest-coverage/index.html\nunittest_1                | Name    Stmts   Miss Branch BrPart  Cover\nunittest_1                | -----------------------------------------\nunittest_1                | TOTAL    1773      0   1028      0   100%\nunittest_1                |\nunittest_1                | 31 files skipped due to complete coverage.\nnext-action_unittest_1 exited with code 0\n```\n\nThe HTML coverage report is written to `build/unittest-coverage/`.\n\n### Running feature tests\n\nTo run the feature tests and measure their code coverage:\n\n```console\n$ docker-compose --ansi never up behave\nRecreating next-action-behave-1 ...\nRecreating next-action-behave-1 ... done\nAttaching to next-action_behave_1\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.100.996597\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.101.468471\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.102.854521\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.103.361367\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.104.722380\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.105.691922\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.106.997495\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.107.853243\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.108.502747\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.109.685711\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.110.474711\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.111.106389\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.112.344641\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.113.436204\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.114.897070\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.115.679258\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.116.142323\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.117.252794\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.118.393226\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.119.830421\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.120.078151\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.121.212746\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.122.454488\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.123.606910\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.124.112553\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.125.180563\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.126.047724\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.127.622212\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.128.082620\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.129.132072\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.130.825663\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.131.310472\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.132.481878\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.133.188328\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.134.082220\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.136.993070\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.138.675878\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.139.839670\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.14.760860\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.140.879862\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.141.698673\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.142.706060\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.143.569652\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.144.010638\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.145.494133\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.146.546100\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.15.453513\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.16.871577\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.17.473306\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.18.987600\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.19.552598\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.20.307829\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.21.004194\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.22.396873\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.23.503332\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.24.937995\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.25.903019\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.26.566137\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.27.113632\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.28.069561\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.29.421169\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.30.731897\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.31.422909\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.32.651102\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.33.984725\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.34.169024\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.35.885876\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.36.142778\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.37.741503\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.38.339222\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.39.675483\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.40.956591\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.41.506336\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.42.368008\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.43.179873\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.44.797321\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.45.800435\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.46.146398\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.47.653462\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.48.240043\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.49.378486\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.50.708162\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.51.933167\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.52.043555\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.53.416687\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.54.113898\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.55.178675\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.56.648765\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.57.741583\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.58.681165\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.59.176869\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.60.333890\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.61.440367\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.62.243922\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.63.806391\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.64.694169\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.65.780015\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.66.933522\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.67.828830\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.68.476091\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.69.532228\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.70.877471\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.71.321021\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.72.838844\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.73.684358\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.74.479984\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.75.000009\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.76.397658\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.77.370677\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.78.157607\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.79.278957\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.80.670824\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.81.626418\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.82.347252\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.83.513331\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.84.330391\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.85.510453\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.86.173373\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.87.741144\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.88.205487\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.89.069661\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.90.032718\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.91.861635\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.92.160322\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.93.019135\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.94.061856\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.95.659068\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.96.165910\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.97.534646\nbehave_1                  | Combined data file .coverage.f9e48bea7d95.98.430516\nbehave_1                  | Skipping duplicate data .coverage.f9e48bea7d95.99.295454\nbehave_1                  | Wrote HTML report to build/feature-coverage/index.html\nbehave_1                  | 17 features passed, 0 failed, 0 skipped\nbehave_1                  | 123 scenarios passed, 0 failed, 0 skipped\nbehave_1                  | 411 steps passed, 0 failed, 0 skipped, 0 undefined\nbehave_1                  | Took 0m38.196s\nbehave_1                  | Name    Stmts   Miss Branch BrPart  Cover\nbehave_1                  | -----------------------------------------\nbehave_1                  | TOTAL     510      0    256      0   100%\nbehave_1                  |\nbehave_1                  | 13 files skipped due to complete coverage.\nnext-action_behave_1 exited with code 0\n```\n\nThe HTML coverage report is written to `build/feature-coverage/`.\n\n### Running quality checks\n\nThe tools Mypy, Pylint, Pycodestyle, Pydocstyle, Bandit, Pyroma, and Vulture are used to check for quality issues in\nthe Python code. Shellcheck is used evaluate the Bash code. Gherkin feature files are checked with Gherkin-lint.\nThe Markdown files are evaluated with Markdownlint. The Dockerfile is checked with Hadolint. The docker-compose.yml is\nchecked with docker compose.\n\nTo run the quality checks:\n\n```console\n$ docker-compose --ansi never up quality\nStarting next-action_quality_1 ...\nStarting next-action_quality_1 ... done\nAttaching to next-action_quality_1\nquality_1                 | Generated HTML report (via XSLT): /Users/fniessink/Developer/next-action/build/mypy/index.html\nquality_1                 | Success: no issues found in 13 source files\nquality_1                 |\nquality_1                 | --------------------------------------------------------------------\nquality_1                 | Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)\nquality_1                 |\nquality_1                 | ------------------------------\nquality_1                 | Checking .\nquality_1                 | Getting metadata for wheel...\nquality_1                 | Found next-action\nquality_1                 | ------------------------------\nquality_1                 | Final rating: 10/10\nquality_1                 | Your cheese is so fresh most people think it's a cream: Mascarpone\nquality_1                 | ------------------------------\nnext-action_quality_1 exited with code 0\n```\n\n### Generating documentation\n\nThis `README.md` file is generated with `docker compose up docs`.\n\nThe dependency graph below is created with Pydeps and the package and class diagrams below are created with\nPyreverse (part of Pylint).\n\n### Source code structure and dependencies\n\nThe dependency graph shows the relationships between the packages and modules in the code base and the third-party\npackages used. When the user imvokes *Next-action* from the command-line, the `next_action()` method in the\n`next_action` package is run. The `next_action()` method uses the `next_action.arguments` package to parse the\ncommand-line arguments and the configuration file. The *Todo.txt* file is read into a domain model using the\n`next_action.todotxt` package. The `next_action.pick_action` module contains the logic to select the next action.\nFinally, the output is formatted using the `next_action.output` package.\n\n![png](https://raw.githubusercontent.com/fniessink/next-action/master/docs/dependencies.png)\n\nThe package diagram created by Pyreverse looks quite similar.\n\n![png](https://raw.githubusercontent.com/fniessink/next-action/master/docs/packages.png)\n\nThe class diagram created by Pyreverse shows the classes used. The biggest one is the `NextActionArgumentParser` class,\nresponsible for parsing the command-line arguments. The other two relevant classes are the `Task` class for holding\ninformation about an individual task and the `Tasks` class that contains a collection of tasks.\n\n![png](https://raw.githubusercontent.com/fniessink/next-action/master/docs/classes.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffniessink%2Fnext-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffniessink%2Fnext-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffniessink%2Fnext-action/lists"}