tcli

command module
v0.0.0-...-5b94c7c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 5 Imported by: 0

README

tcli

Go

An interactive Trello client with auto-completion feature

tcli

Available features:

  • ls command to show boards, lists, cards and comments
  • cat command to show more info on boards, lists, cards and comments
  • cd command to navigate through the Trello hierarchy (boards > lists > cards > comments)
  • cp command to copy cards and comments
  • touch command to create new cards and comments
  • mv command to move cards
  • edit command to create or edit cards and comments
  • rm command to archive cards and delete comments
    • rm /board/list/* command to archive all cards in list
  • clear command to clear the terminal and clear cache

You can also integrate OS commands with a pipe (|) after the TCli command:

# to read long descriptions or comments for example
/> cat /board/list/card | less
# everything after the pipe are used as your OS execution
# e.g. using grep to filter out some keywords
/> cat /board/list/card | grep some-keywords
# or using multiple pipes
/> cat /board/list/card | sed "s/word-to-replace/replaced-word/g" | less
# you can also redirect the output
/> cat /board/list/card | sed "s/word-to-replace/replaced-word/g" > /tmp/output

Installation

Downloading standalone binary

Binaries are available from Github releases.

Using cURL
curl -sf https://gobinaries.com/l-lin/tcli | sh
Using docker
docker run -it --rm -v /path/to/.tcli.yml:/.tcli.yml ghcr.io/l-lin/tcli
Building from source
# Build
make compile

Usage

# explore the CLI with the help command
tcli -h

# start interactive mode
tcli

# you can also use it as a CLI
tcli ls /

Configuration

A .tcli.yml will be generated at first execution. Its content is as follows:

trello:
  # access token generated from first usage
  access_token: xxx
  # the Trello developer API key 
  api_key: yyy
  # Trello base API URL
  base_url: https://trello.com/1
  # default configuration when starting TCLI in interactive mode
  default_config:
    # default board to start TCLI with
    board:
      id: 123abc
      name: "Board name"
    # default list to start TCLI with
    list:
      id: 456def
      name: "List name"
    # labels to set when creating new cards
    labels:
      - black
      - red
# OS command used to edit the Trello resources
editor: editor
# Format to use when editing a card (yaml or toml)
format: yaml
# set to 'true' to not prompt at each edition / removal
never_prompt: false

Inspiration

I'm mostly using the command line, and I like using VIM to edit contents. The Trello web UI is great, but I prefer staying in the terminal. I could not find some good CLI / prompt, hence this project was born.

tcli was inspired by trelew and unix commands, for their APIs are quite neat and really powerful. Although the meaning of the commands do not really reflect the actions on the Trello resources, it's still quite similar if we consider boards and lists as directories, and cards as files, thus avoiding the burden of learning new commands.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package executor is a generated GoMock package.
Package executor is a generated GoMock package.
Package renderer is a generated GoMock package.
Package renderer is a generated GoMock package.
Package trello is a generated GoMock package.
Package trello is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL