---
title: Some na updates and new commands
date: 2023-08-22 08:00
slug: some-na-updates-and-new-commands
categories:
- Code
tags:
- prompt
- na
- regex
- tagging
- taskpaper
- productivity
---

I've updated [na](https://brettterpstra.com/projects/na/ "na - BrettTerpstra.com") with some new stuff I thought I'd share.

First off, I wanted an easy way to archive all @done actions in one swoop without having to use a lot of flags and switches to locate them and move them. So I added an `archive` command, which takes a search string as an argument, but also has a `--done` switch that will archive all @done tasks. So you can just run `na archive --done`, select the file to affect if there are multiple available, and presto, "archive all finished" is done, just like in TaskPaper.

```
NAME
    archive - Mark an action as @done and archive

SYNOPSIS

    na [global options] archive [command options] ACTION

COMMAND OPTIONS
    --all             - Act on all matches immediately (no menu)
    -d, --depth=DEPTH - Search for files X directories deep (default: 1)
    --done            - Archive all done tasks
    -e, --regex       - Interpret search pattern as regular expression
    --file=PATH       - Specify the file to search for the task (default: none)
    -n, --note        - Prompt for additional notes. Input will be appended to any existing note. If STDIN input (piped) is detected, it
                        will be used as a note.
    -o, --overwrite   - Overwrite note instead of appending
    --tagged=TAG      - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
    -x, --exact       - Match pattern exactly

EXAMPLE

    # Find "An existing task", mark @done if needed, and move to archive
    na archive "An existing task"
```

I also added a `complete` command that will add a @done tag to whatever action matches your search (menu provided for multiple results), or all matches using the `--all` switch. It's basically a shortcut for `na update --finish SEARCH_STRING`. It's aliased as `finish` as well. Both the `archive` and `complete` commands have a `--note` switch that allows you to add a note (prompted if there's nothing piped to it). All of the matching options from the `update` command are available, including `--tagged` for searching by tag and `--regex` for doing a regular expression search. `complete` has a `--archive` switch that will simultaneously add a @done tag and move the action to the Archive.

```
NAME
    complete - Find and mark an action as @done

SYNOPSIS

    na [global options] complete [command options] ACTION

COMMAND OPTIONS
    -a, --archive     - Add a @done tag to action and move to Archive
    --all             - Act on all matches immediately (no menu)
    -d, --depth=DEPTH - Search for files X directories deep (default: 1)
    -e, --regex       - Interpret search pattern as regular expression
    --file=PATH       - Specify the file to search for the task (default: none)
    -n, --note        - Prompt for additional notes. Input will be appended to any existing note. If STDIN input (piped) is detected, it
                        will be used as a note.
    -o, --overwrite   - Overwrite note instead of appending
    --tagged=TAG      - Match actions containing tag. Allows value comparisons (may be used more than once, default: none)
    -x, --exact       - Match pattern exactly

EXAMPLES

    # Find "An existing task" and mark @done
    na complete "An existing task"

    # Alias for complete
    na finish "An existing task"
```

I know of a few people making extensive use of `na`. If you're among them and have a feature request, don't be shy about [posting an issue](https://github.com/ttscoff/na_gem/issues) or [contacting me directly](https://brettterpstra.com/contact/).

Check out [the project page](https://brettterpstra.com/projects/na/) for more info.

## na

Project: [na](https://brettterpstra.com/projects/na.md)

- [Web Excursions for October 19th, 2026](https://brettterpstra.com/2026/10/19/web-excursions-for-october-19th-2026.md): 2026-10-19
- [New, faster NA](https://brettterpstra.com/2026/07/04/new-faster-na.md): 2026-07-04
- [TaskPaper search syntax for NA](https://brettterpstra.com/2025/12/03/taskpaper-search-syntax-for-na.md): 2025-12-03
- [One more na update](https://brettterpstra.com/2025/10/29/one-more-na-update.md): 2025-10-29
- [Optimizing na and doing](https://brettterpstra.com/2025/10/23/optimizing-na-and-doing.md): 2025-10-23
- [Brett's Favorites 2023](https://brettterpstra.com/2023/12/08/bretts-favorites-2023.md): 2023-12-08
- [More na updates](https://brettterpstra.com/2023/09/09/more-na-updates.md): 2023-09-09
- [A bit more na work](https://brettterpstra.com/2023/08/30/a-bit-more-na-work.md): 2023-08-30
- [Some na updates and new commands](https://brettterpstra.com/2023/08/22/some-na-updates-and-new-commands.md): 2023-08-22
- [Brett's Favorites 2022 - Personal Projects](https://brettterpstra.com/2022/11/30/bretts-favorites-2022-personal-projects.md): 2022-11-30
- [na with a global file](https://brettterpstra.com/2022/10/25/na-with-a-global-file.md): 2022-10-25
- [na can now edit your actions](https://brettterpstra.com/2022/10/22/na-can-now-edit-your-actions.md): 2022-10-22
- [na with saved search](https://brettterpstra.com/2022/10/07/na-with-saved-search.md): 2022-10-07
- [na as a TaskPaper query tool](https://brettterpstra.com/2022/10/06/na-as-a-taskpaper-query-tool.md): 2022-10-06
- [Revamping na (Next Action CLI)](https://brettterpstra.com/2022/09/28/revamping-na-next-action-cli.md): 2022-09-28
- [Branching out from Bash: Fishing expedition](https://brettterpstra.com/2019/10/11/branching-out-from-bash-fishing-expedition.md): 2019-10-11
- [Task management for coders](https://brettterpstra.com/2017/12/01/task-management-for-coders.md): 2017-12-01

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
