Togo

repository·master·Indexed 41 days ago

https://github.com/prime-run/togo

A fast command-line and TUI utility for task and todo management featuring hierarchical project-based storage, fuzzy-search task selection, and Vim keybinds. It supports both project-local and global storage via JSON files and provides CLI commands for adding, toggling, archiving, and deleting tasks.

Tokens
3.3K
Snippets
18
Records
20
Agent score
50%

What's inside Togo

  1. How Togo storage works: project vs global

    master

    Togo manages tasks using two hierarchical storage levels:

    1. project (default): Uses a todos.json file. Togo searches upward through parent directories to find the nearest todos.json file, enabling hierarchical task structures. If no project file is found, it falls back to global storage.
    2. global: Uses a personal task file located at ~/.config/togo/todos.json (or $XDG_CONFIG_HOME/togo/todos.json).

    You can switch between these using the --source or -s flag.

    # Use project-level storage (default)
    togo list
    
    # Force global storage
    togo list --source global
    
    # Force project-level storage
    togo add "Write docs" -s project
  2. Use Togo in Interactive Mode (TUI)

    master

    The Terminal User Interface (TUI) allows for visual task management and bulk operations. It supports Vim keybinds and is compatible with standard system fonts.

    Run the following commands to enter the TUI with different filters:

    togo             # Default TUI
    togo list         # Active todos only
    togo list --all   # All todos
    togo list --archived # Archived todos only
    togo
  3. Configure shell completion for Togo

    master

    To enable tab-completion for commands and task names, generate and install the completion script for your shell.

    Zsh

    # 1. Create completion directory
    mkdir -p ~/.zsh/completion
    echo "fpath=(~/.zsh/completion \$fpath)" >> ~/.zshrc
    
    # 2. Enable completions
    echo "autoload -Uz compinit && compinit" >> ~/.zshrc
    
    # 3. Apply Togo completion
    togo completion zsh > ~/.zsh/completion/_togo
    source ~/.zshrc

    Bash

    # 1. Ensure completion is sourced
    echo "[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion" >> ~/.bashrc
    source ~/.bashrc
    
    # 2. Install Togo completion
    togo completion bash > ~/.bash_completion

    Fish

    mkdir -p ~/.config/fish/completions
    togo completion fish > ~/.config/fish/completions/togo.fish
  4. Install Togo

    master

    You can install Togo using several methods depending on your environment:

    Arch Linux

    Use the AUR:

    paru -S togo-bin

    Download binaries from the Releases page and ensure your PATH includes the installation directory (e.g., ~/.local/bin):

    export PATH="$HOME/.local/bin:$PATH"

    Go CLI

    Install directly via Go:

    go install github.com/prime-run/togo@latest

    Build from Source

    git clone https://github.com/prime-run/togo.git
    cd togo
    make
  5. Use the Togo CLI

    master
    Togo is a terminal-based todo application for managing tasks. Running the base command togo launches an interactive TUI (Terminal User Interface) powered by Bubble Tea, which displays your todo list in a table format. The application loads your tasks from a JSON file and allows you to manage them within the interface.
    togo
  6. Manage tasks via Command-Line Operations

    master

    Togo provides several CLI commands for single-task operations. All commands accept the --source|-s {project|global} flag.

    Commands

    • add "description": Add a new task. If quotes are omitted, the input is treated as stdin.
    • toggle [task]: Toggle completion status. If the task name is unique, it executes immediately; if multiple tasks match, an interactive selection list opens.
    • archive [task]: Archive a completed task.
    • unarchive [task]: Restore an archived task.
    • delete [task]: Remove a task permanently.
    • list [flags]: View tasks. Use --all for all tasks or --archived for archived ones.
    togo add "Task description"
    togo toggle meeting
    togo archive meeting
    togo delete meeting
    togo list --all
  7. Archive command reference

    master

    The archive command is used to hide todos from the main list by moving them to an archive.

    Usage: archive <title>

    Arguments:

    • <title>: The title or ID of the todo you wish to archive. If omitted, an interactive selection menu is shown.
    Use:   archive <title>
    Short: Archive a todo
    Long:  Archive a todo from your list using its title. Archived todos are hidden from the main list.
  8. Reference: 'list' command flags

    master

    The following flags are available for the list command to control which todos are displayed in the interactive UI:

    --archived, -a    Show only archived todos
    --all            Show all todos (both active and archived)
  9. Reference: Togo CLI flags

    master

    The following persistent flag is available for the togo command:

    FlagShorthandDefaultDescription
    --source-sprojectThe todo source to use: project or global

    Note: The value for --source is case-insensitive and whitespace-trimmed.

    --source, -s string 
        todo source: project or global (default "project")
  10. Reference: delete command usage and arguments

    master

    The delete command follows this usage pattern:

    delete <title>

    • <title>: A string representing the title or the numeric ID of the todo to be removed.
    Usage: delete <title>
    Short: Delete a todo
    Long: Delete a todo from your list using its title.
  11. Reference: unarchive command usage and arguments

    master

    The unarchive command is used to return archived todos to the active list.

    Usage:
      unarchive <title>
    
    Short:
      Unarchive a todo
    
    Long:
      Unarchive a todo from your archive using its title. This returns it to the active list.