Git Product home page Git Product logo

trello-cli's Introduction

Trello CLI

This is a monorepo for everything related to Trello CLI. You're probably looking for the trello CLI README.

For information on contributing, see CONTRIBUTING.md

trello-cli's People

Contributors

dependabot[bot] avatar eugenevd avatar joefatora avatar kevin-secrist avatar magnesiumlinux avatar mathieu-aubin avatar mheap avatar nerdfiles avatar noah1989 avatar pylipp avatar queengooborg avatar sanjosolutions avatar simon-20 avatar skrobul avatar up_the_irons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

trello-cli's Issues

cannot create a new card

I was reading the documentation and did run following

trello add-card "some nice title" "some nice description" -b board_name

But it was that the arguments do not match.
--help gives me

Usage: trello add-card <title> [description] [options]

Doesn't get boards anymore

In version 0.11.0

trello show-boards

returns empty, despite if I run

trello assigned-to-me

It returns
Board: 6169584b5a0b644f35080cd7

  • ....
  • (list of tasks)

trello refresh: API endpoint is not found

When you run:
trello refresh

you get:
(node:17350) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
/home/user/programs/trello-cli/src/translator.js:211
throw err;
Error: The requested resource was not found.
.....
statusCode: 404,
responseBody: 'The requested resource was not found.',
statusMessage: 'Not Found'
}
...

Can anyone reproduce?

My guess is Trello/Atlassian have changed the API urls ?

They've recently done a major Trello upgrade/changes/launches of new features. That might have caused it.

Error thrown on refresh

After calling trello refresh from a global npm installation on a MacBook Pro (Retina, 15-inch, Mid 2015) High Sierra 10.13.4 I received the following error:

Organization, board, list, and user cache refreshed
/usr/local/lib/node_modules/trello-cli/src/translator.js:114
            throw err;
            ^

Error: [object Object]
    at Request._callback (/usr/local/lib/node_modules/trello-cli/node_modules/node-trello/lib/node-trello.js:88:13)
    at Request.self.callback (/usr/local/lib/node_modules/trello-cli/node_modules/request/request.js:187:22)
    at Request.emit (events.js:180:13)
    at Request.<anonymous> (/usr/local/lib/node_modules/trello-cli/node_modules/request/request.js:1044:10)
    at Request.emit (events.js:180:13)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/trello-cli/node_modules/request/request.js:965:12)
    at IncomingMessage.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1106:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)

The refresh still appeared to work correctly despite the error.

License

As i am trying to build packages for trello-cli, i am running into a problem a fasr as the license goes.

"BSD" has multiple licenses.
Please update your package.json with your choosen BSD license.

You can find them at https://spdx.org/licenses/

Note - npm also complains (as a warning) about this
"npm WARN [email protected] license should be a valid SPDX license expression"

List: Create

Current usage:

trello add-list [options]

Options:
   -b BOARD, --boardName BOARD          The name of the board to add the list to
   -l LIST, --listName LIST             The name of the new list
   -p LISTPOS, --listPosition LISTPOS   The position of the new list: acceptable values are 'top' or 'bottom' (default: top)
   -f, --force                          Force - will create the board if it doesn't already exist
   -v, --verbose                        Turn on increased error reporting

Adds a new list to the specified board with the specified name

question: is it intended behavior for "trello refresh" to miss archived lists?

see title.
My use case is sometimes I need to access archived lists, but I can't. Cause trello refresh removes them from the cacheFile.
And I don't want to go and manually un-archive them, just to read their cards once.

Is this by design? If not, should be corrected.

We've recently fixed how refresh works in regard to deleted lists/boards, but what about archived ones?
(closed but not deleted boards and archived lists, but not deleted.)

Thanks!

updating on npmjs

after merging the man license fix, updating the package on npmjs should be a thing to consider...
even if it was only minor changes, it would help in package builds (to have an actual source thats up to date)

The -n option on show-cards doesn't seem to work.

When using the -n flag, no effect seems to be made by including the flag or not. Setting it to true or false directly also seems to have no effect.

Terminal output:

[thedudefromci@encartaempire trello-cli]$ ./bin/trello show-cards -b Bones3 -l Features -n false
Wraithaven Games > Bones3 > Features
* eMXHrouX - Editor Tools
* QSvI8Pf6 - Create terrain generation module.

[thedudefromci@encartaempire trello-cli]$ ./bin/trello show-cards -b Bones3 -l Features -n true
Wraithaven Games > Bones3 > Features
* eMXHrouX - Editor Tools
* QSvI8Pf6 - Create terrain generation module.

[thedudefromci@encartaempire trello-cli]$ ./bin/trello show-cards -b Bones3 -l Features
Wraithaven Games > Bones3 > Features
* eMXHrouX - Editor Tools
* QSvI8Pf6 - Create terrain generation module.

[thedudefromci@encartaempire trello-cli]$ 

Unless I'm misunderstanding its purpose, I would image it would disable the header text, right? For use with other commands, such as grep to write simple automation scripts.

config.json pulling from present working directory on all execution.

Here is a patch to pull from the package folder, however it would be better if your loading from $HOME/.trello.cfg:

*** /Users/dspencer/.nvm/v0.10.28/bin/trello 2013-08-22 15:42:42.000000000 -0500
--- bin/trello 2014-06-12 01:04:40.000000000 -0500


*** 3,13 ****
// npm dependencies
var program = require("commander"),
Trello = require("node-trello"),
! config = require("nconf")
! fs = require("fs");

// Load config
! config.file("./config.json");

// ./lib depedencies
var logger = require("../lib/logger"),
--- 3,16 ----
// npm dependencies
var program = require("commander"),
Trello = require("node-trello"),
! config = require("nconf"),
! fs = require("fs"),
! path = require("path");
!
! var config_path = path.resolve(__dirname, "config.json");

// Load config
! config.file(config_path);

// ./lib depedencies
var logger = require("../lib/logger"),
*************** program.version("0.0.1");
*** 21,27 ****
logger.debug("Starting trello-cli");

// Make sure config.json exists
! if (!fs.existsSync("./config.json")){
logger.emerg("config.json does not exist");
process.exit(1);
}
--- 24,30 ----
logger.debug("Starting trello-cli");

// Make sure config.json exists
! if (!fs.existsSync(config_path)){
logger.emerg("config.json does not exist");
process.exit(1);
}

Unexpected token error

So maybe I've done something wrong, but I am unable to use this tool currently...

I did the following steps:

cloned the tree

ran ./bin/trello to create the config

bladernr@galactica:~/leankit-trello/trello-cli$ ./bin/trello
Blank configuration file saved to: /home/bladernr/.trello-cli/config.json
Go to https://trello.com/1/appKey/generate and generate the API key and replace YOURAPIKEY in /home/bladernr/.trello-cli/config.json

followed the link to generate the API key at trello.com
put the API key (first one under Developer API Keys on that link that is generated) in the config.json

Tried the refresh
bladernr@galactica:~/leankit-trello/trello-cli$ ./bin/trello refresh
We couldn't find an authentication token! Please visit the following URL:
https://trello.com/1/connect?key=REMOVED_KEY&name=trello-cli&response_type=token&scope=account,read,write&expiration=never
Once you have a token, run the following command:
trello set-auth TOKEN

Followed THAT link to get the token

bladernr@galactica:~/leankit-trello/trello-cli$ ./bin/trello set-auth TOKEN_REMOVED
Token set

but now I get the following error:
bladernr@galactica:~/leankit-trello/trello-cli$ ./bin/trello --help
/home/bladernr/leankit-trello/trello-cli/src/commands/card-assign.js:61
trello.post(...args);
^^^

SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at /home/bladernr/leankit-trello/trello-cli/bin/trello:59:32
at Array.forEach (native)
at registerCommands (/home/bladernr/leankit-trello/trello-cli/bin/trello:56:18)

Webhook: Create

Current usage:

Usage: trello add-webhook [options]

Options:
   -d DESCRIPTION, --description DESCRIPTION     The webhook's description  []
   -b BOARD, --boardName BOARD                   The board name to add a webhook to
   -c CALLBACK_URL, --callbackURL CALLBACK_URL   The URL to connect to
   -f FORCE, --force FORCE                       Create the board if it doesn't exist  [false]
   -v, --verbose                                 Turn on increased error reporting

Add a webhook to a board

Card: Show details

Current usage:

trello card-details <cardId>

cardId     The short URL or ID of the card to display information about

Show details about a specified card

Help getting this to work

Hi there. As a terminal user I love cli tools of all services I start using.

I'm trying to get this running, but I reached a point early on and am stuck. Any help will be appreciated.

  • I've cloned the repo
  • ran npm install
  • ran ./bin/trello
  • visited the link and copied the api key, then replaced YOURAPIKEY in $HOME/.trello-cli/config.json
  • ran ./bin/trello
  • visited the generated link and copied the token
  • ran ./bin/trello set-auth "$TOKEN"
  • ran ./bin/trello --help
  • ran ./bin/trello show-boards and got:
(node:29020) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)

I'm running node.js 14.12.0 and am on macOS Mojave 10.14.6.

Any help?

log is not defined

Just install the module globally and set the authentication. Then this happened

trello add-card -b Personal -l Habits "Fix Bed"                                                                                                             ] 8:32 AM
/Users/winter/.nvm/versions/node/v4.2.4/lib/node_modules/trello-cli/src/commands/add-card.js:27
                log.error("Unknown error:");
                ^

ReferenceError: log is not defined
    at Object.trelloApiCommand.makeTrelloApiCall (/Users/winter/.nvm/versions/node/v4.2.4/lib/node_modules/trello-cli/src/commands/add-card.js:27:17)
    at Object.cb (/Users/winter/.nvm/versions/node/v4.2.4/lib/node_modules/trello-cli/src/commands/add-card.js:142:38)
    at Object.ArgParser.parse (/Users/winter/.nvm/versions/node/v4.2.4/lib/node_modules/trello-cli/node_modules/nomnom/nomnom.js:302:15)
    at Object.<anonymous> (/Users/winter/.nvm/versions/node/v4.2.4/lib/node_modules/trello-cli/bin/trello:74:9)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Function.Module.runMain (module.js:467:10)
    at startup (node.js:136:18)

show-list error

Trying out this tool as it seems very useful. Is it possible to print out which list each card belongs to when using the assigned-to-me command? Can I sort them according to, for example, due date?

I also get an error when I'm trying using the show-list option:

bin/trello show-list -b private -l doing

TypeError: object is not a function
at /tmp/tc/trello-cli/src/node-trello-wrapper.js:37:17
at Request._callback (/tmp/tc/trello-cli/node_modules/node-trello/lib/node-trello.coffee:60:16)
at Request.self.callback (/tmp/tc/trello-cli/node_modules/node-trello/node_modules/request/main.js:122:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request. (/tmp/tc/trello-cli/node_modules/node-trello/node_modules/request/main.js:661:16)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage. (/tmp/tc/trello-cli/node_modules/node-trello/node_modules/request/main.js:623:14)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)

Card: Show Assigned

Current usage:

Usage: trello assigned-to-me [user]

user     Specifies user to show assigned cards for. (id/username)

Show cards that are currently assigned to yourself, or any member specified

Listing existing boards/cards?

I picked one of my boards which was all lowercase/no spaces along with a list of the same attributes. No luck.

./bin/trello show-list -b household -l done

Error: Unknown List
at Translator.getListIdByBoardNameAndListName (/Users/jhogenmiller/devel/trello-cli/src/translator.js:72:9)
at Object.cb (/Users/jhogenmiller/devel/trello-cli/src/commands/show-list.js:28:29)
at Object.ArgParser.parse (/Users/jhogenmiller/devel/trello-cli/node_modules/nomnom/nomnom.js:303:15)
at Object. (/Users/jhogenmiller/devel/trello-cli/bin/trello:58:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)

Card: Archive

Current usage:

Usage: trello archive-card [title]... [options]

title     The card's title. If omitted, implies all cards found

Options:
   -b BOARD, --board BOARD   The board name to add a card to
   -l LIST, --list LIST      The list name to add a card to
   -m MATCH, --match MATCH   [exact | contains] : how to match the title given
   -f, --force               Do not prompt user

Archive a card from a board

create new board fails because of permissions

Hi, Using the below command I am unable to create a new board and cannot understand the error message. I am able to add new cards to existing boards though.

> trello add-board -b bash -d "from bash"
/path/to/.conda/envs/trello/lib/node_modules/trello-cli/src/commands/add-board.js:44
        throw err;
        ^

Error: invalid value for prefs_permissionLevel
    at Request._callback (/path/to/.conda/envs/trello/lib/node_modules/trello-cli/node_modules/node-trello/lib/node-trello.js:88:13)
    at Request.self.callback (/path/to/.conda/envs/trello/lib/node_modules/trello-cli/node_modules/request/request.js:187:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (/path/to/.conda/envs/trello/lib/node_modules/trello-cli/node_modules/request/request.js:1044:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (/path/to/.conda/envs/trello/lib/node_modules/trello-cli/node_modules/request/request.js:965:12)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  statusCode: 400,
  responseBody: 'invalid value for prefs_permissionLevel',
  statusMessage: 'Bad Request'
}

Is there any other information I can provide to help fix this? Or pointers of what I should do?

Thanks,

Not showing boards

I added my API key to the config file and did trello set-auth with my token but show-boards comes back blank

minor: after npm install, package-lock.json is always with git status "modified"

This is minor but still:
When I do new install: git clone + npm install
or update: git pull + rm node_modules + "npm install"

I always get several little modifications in package-lock.json, so git status is never clean.

Can this be fixed somehow?
Maybe a better build process/scripts will solve it?
Or am I doing sth wrong?

I think this is easily reproducible, so I won't post the diff.

Cheers!

Card: Assign

Current usage:

Usage: trello card-assign <card> [user] [options]

card     The card's name/id/url
user     The user's name or ID to assign to the card, or current user if unspecified

Options:
   -r, --remove   Unassigns the user from the card

Add or remove a member to a card

Lists are not recognized

I'm trying to do the following testcase but it always replies that the list does not exist when trying to add a card, even though it did create the board / list.

If I use the force option it creates a list with the same name that already exists and then fails again saying the list does not exist so I think there might be going something wrong with the create card API call.

Example flow:

~/test/trello-cli master
❯ ./bin/trello add-board -b testboard -d LOL
Organization, board, list, and user cache refreshed

~/test/trello-cli master
❯ ./bin/trello add-list -b testboard -l testlist

~/test/trello-cli master
❯ ./bin/trello add-card -b testboard -l testlist "test from the cli"
error: List 'testlist' does not exist.  Exiting.

~/test/trello-cli master
❯ ./bin/trello add-card "test from the cli" -b "testboard" -l "testlist" -f
Organization, board, list, and user cache refreshed
error: List 'testlist' does not exist.  Exiting.

Cannot read property 'toLowerCase()' of Null

I get the below error message whenever I try running any commands with the trello-cli.

I'll be happy to provide further details if you can tell me what you need.

λ trello add-card "test" "this is a description" -b "Spells" -l "Spells Known"
error: Unknown error:
C:\users\me\node_modules\trello-cli\src\commands\add-card.js:28
                throw err;
                ^

TypeError: Cannot read property 'toLowerCase' of null
    at Translator.getBoardIdByName (C:\users\me\node_modules\trello-cli\src\translator.js:78:21)
    at Object.trelloApiCommand.makeTrelloApiCall (C:\users\me\node_modules\trello-cli\src\commands\add-card.js:14:34)
    at Object.cb (C:\users\me\node_modules\trello-cli\src\commands\add-card.js:142:38)
    at Object.ArgParser.parse (C:\users\me\node_modules\nomnom\nomnom.js:302:15)
    at Object.<anonymous> (C:\users\me\node_modules\trello-cli\bin\trello:74:9)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Function.Module.runMain (module.js:457:10)

Board: Close

Current usage:

trello close-board [options]

Options:
   -b BOARD, --boardNameMatch BOARD   The text to search for in the board name; all boards with the specified text in their name will be closed.
   -v, --verbose                      Turn on increased error reporting

Closes those board(s) where the specified text occurs in their name

Card: Create

Current usage:

Usage: trello add-card <title> [description] [options]

title           The card's title
description     The card's description

Options:
   -b BOARD, --boardName BOARD   The board name to add a card to
   -l LIST, --listName LIST      The list name to add a card to
   -q POS, --cardPosition POS    The position of the new card: acceptable values are 'top' or 'bottom' (default: bottom)
   -g LABELS, --labels LABELS    Comma-separated list of labels to assign to the card (requires IDs, see show-labels command)
   -f, --force                   Force - will create the board and/or list if they don't already exist
   -v, --verbose                 Turn on increased error reporting

Add a card to a board

Card: Delete

Current usage:

trello delete-card [title]... [options]

title     The card's title

Options:
   -b BOARD, --board BOARD   The board name to remove a card from
   -l LIST, --list LIST      The list name to remove a card from

Remove a card from a board

The road to 1.0

@ksk100 @vinyldarkscratch As the two largest contributors so far, how would you like to weigh in on trello-cli 1.0? At the moment there aren't any established coding guidelines, there aren't any tests (though there is a start on https://github.com/mheap/trello-cli/tree/testing-infra) and the output format could change between releases, breaking existing user's scripts. On top of all of that, the only way to use trello-cli at the moment is to build from Github as the one on NPM is so outdated.

So, the plan is to:

  • Publish version 0.5 on NPM
  • Set up ESLint rules for the project
  • Add automated TravisCI builds
  • Add tests for existing output so that we can maintain backwards compatibility where possible

I'll also be looking for some example use cases, so if you have anything that you'd like to share, please let me know

Board: Create

Current implementation:

Usage: trello add-board [options]

Options:
   -b BOARD, --boardName BOARD   The name of the new board
   -d DESC, --description DESC   The description of the board
   -a, --cardAging               Turns card aging on for the new board (default is off)
   -c, --cardCoverImages         Turns off the showing of images on the front of cards (default is on)
   -l, --defaultLists            Turns off default lists for the new board (default is on)
   -i, --idOrganization          Sets the organization for the new board
   -p, --permissionLevel         Sets the permission level for the new board
   -s, --selfJoin                Determines whether users can join the boards themselves or whether they have to be invited.
   -v, --verbose                 Turn on increased error reporting

Adds a new board with the specified name

Packaged for AUR

Thanks for making this! I packaged trello-cli for the Arch User Repository. Would that be something you would like added to the Readme?

contributions?

Thanks. Your tool is just what im looking for, however theres some missing functionality i'd like, such as mutating checklists within a card. Do you allow PR's for new features?

Also would you consider https://www.npmjs.com/package/pkg ? I managed to compile your code to a native binary, which works well. Allowed me to use this cli tool on a linux box with no node installed.

Cannot Close a Board

I tried to close the Welcome Board by using the command

$ trello close-board -b "Welcome Board"

However, I could not respond when prompted to confirm the action:

Boards which will be closed:
    Welcome Board
Do you want to continue with closing the boards? Type 'yes' to continue
$ 

[FEATURE] Interactive mode

It would be nice to have a feature where you could run adding a new card as interactive mode. Like if you would execute trello add-card without any parameters, it would prompt you and ask for the needed information in a interactive matter.

Move-Card new feature add comment during move (code included)

I needed the ability to add comments to cards when they are moved so I thought this might be useful to other users

move-card.js

trello move-card id list --comment 'hello'

`"use strict";

var __ = function (program, output, logger, config, trello, translator) {
var trelloApiCommand = {};

trelloApiCommand.makeTrelloApiCall = function (options, onComplete) {
const card_re = /(?:(?:https?://)?(?:www.)?trello.com/c/)?([a-z0-9]+)/?./i;
const board_re = /(?:(?:https?://)?(?:www.)?trello.com/b/)?([a-z0-9]+)/?.
/i;

var comment = options.comment

var cardId = card_re.test(options.card)
  ? card_re.exec(options.card)[1]
  : null;
var boardId =
  options.board && board_re.test(options.board)
    ? board_re.exec(options.board)[1]
    : null;

var pos =
  options.pos ||
  (/^\d+$/.test(options.board)
    ? (function () {
        boardId = null;
        return options.board;
      })()
    : null);

var posFunc = pos
  ? (position) => {
      trello.put(
        "/1/cards/" + cardId + "/pos",
        { value: position },
        function (err, data) {
          if (err) {
            console.error(err, data);
          } else {
            console.log("Card moved to position", position);
          }
        }
      );
    }
  : null;

if (!cardId) {
  console.error(
    "Could not parse card ID, example: https://trello.com/c/<ID> or <ID>"
  );
  return;
}

trello.put(
  "/1/cards/" + cardId + "/" + (boardId == null ? "idList" : "idBoard"),
  boardId == null
    ? { value: options.list }
    : { value: boardId, idList: options.list },
  function (err, data) {
    if (err) {
      console.log(cardId, boardId, options.list, pos)
      console.error(err, data);
    } else {
      console.log("Card moved");
      if (posFunc) {
        console.log("Positioning card...");
        posFunc(pos);
      }
    }
  }
);

if (comment) {
  trello.post(
    "/1/cards/" + cardId + "/actions/comments",
    { text: comment },
    function (err, data) {
      if (err) {
        console.error(err, data);
      } else {
        console.log(`Comment: ${comment}`);
        if (posFunc) {
          console.log("Positioning card...");
          posFunc(pos);
        }
      }
    }
  )
}

};

trelloApiCommand.nomnomProgramCall = function () {
program
.command("move-card")
.help("Move a card on a board")
.options({
card: {
position: 1,
abbr: "c",
metavar: "",
help: "The card's name/id/url to move",
required: true,
},
list: {
position: 2,
abbr: "l",
metavar: "",
help: "The list name/id to move the card to",
required: true,
},
board: {
position: 3,
abbr: "b",
metavar: "",
help:
"The board name/id/url to move the card to (if the list is in another board)",
required: false,
},
pos: {
position: 4,
abbr: "p",
metavar: "",
help: "Position of the new card",
required: false,
},
})
.callback(function (options) {
trelloApiCommand.makeTrelloApiCall(options);
});
};

return trelloApiCommand;
};
module.exports = __;
`

First run fails

After npm install the first run of trello fails with this message:

/usr/lib/node_modules/trello-cli/src/authenticate.js:53
            throw e;
            ^

TypeError: path must be a string or Buffer
    at Object.fs.mkdirSync (fs.js:855:18)
    at Auth.writeAuthFile (/usr/lib/node_modules/trello-cli/src/authenticate.js:49:17)
    at Auth.loadAuthCache (/usr/lib/node_modules/trello-cli/src/authenticate.js:22:14)
    at Auth.getToken (/usr/lib/node_modules/trello-cli/src/authenticate.js:40:33)
    at __ (/usr/lib/node_modules/trello-cli/src/node-trello-wrapper.js:7:69)
    at Object.<anonymous> (/usr/lib/node_modules/trello-cli/bin/trello:38:51)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)

This happens with both a global or local npm install. Running on a GalliumOS, a version of Ubuntu 16.04 modified for Chromebooks. No configuration file is produced.

trello: no such command 'set-auth'

Hello there, just tried setting this up - but hit a roadblock in setting up this tool

❯ trello
emerg: config.json does not exist. trying to create new one.
Blank configuration file saved to: /Users/orta/.trello-cli/config.json
Go to https://trello.com/1/appKey/generate and generate the API key and replace YOURAPIKEY in /Users/orta/.trello-cli/config.json

~
❯ code /Users/orta/.trello-cli/config.json

~
❯ trello
We couldn't find an authentication token! Please visit the following URL:
https://trello.com/1/connect?key=XXX&name=trello-cli&response_type=token&scope=account,read,write&expiration=never
Once you have a token, run the following command:
trello set-auth <token>

~
❯ trello set-auth YYY
warning: Cache file is not compatible with this version, trying to create new one.
warning: trello: no such command 'set-auth'

It doesn't look like there's anything inside the commands folder. I read the source and so I added token to myconfig.json with the token which worked. 👍

Error listing boards

I tried to list the boards as so and got the following error
trello show-list -b "To Do" -l "Homework"

    if (boards[i][1].toLowerCase() == name){
                    ^
TypeError: Cannot read property 'toLowerCase' of null
    at Translator.getBoardIdByName (/usr/lib/node_modules/trello-cli/src/translator.js:78:21)
    at Object.cb (/usr/lib/node_modules/trello-cli/src/commands/show-list.js:27:30)
    at Object.ArgParser.parse (/usr/lib/node_modules/trello-cli/node_modules/nomnom/nomnom.js:302:15)
    at Object.<anonymous> (/usr/lib/node_modules/trello-cli/bin/trello:74:9)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)

I also tried list the boards without quotes as seen in #3
trello show-list -b To\ Do -l Homework
but got the same error
I did run trello refresh all before these commands

Feature: configure config path with environment variable

Would it be reasonable to allow overriding the default config path with an environment variable? (say TRELLO_CLI_CONFIG_FILE)

This would allow having different config files for different trello accounts, although without having spent enough time tinkering with the tool yet, would this lead to conflicts? (Would we need to implement the ability to configure where local state gets stored?)

Document dependencies

Had to install the following dependencies to get this to work. I'm not familiar with node/npm (just installed it to run this script), so maybe there's a nicer way to do this. Python/pip has a "requirements.txt". If npm has similiar functionality, that would be good. As it is, npm doesn't seem to follow dependencies.

npm install nomnom
npm install node-trello
npm install nconf
npm install winston
npm install colors

At this point, I was able to run ./bin/trello --help and ./bin/trello set-auth <token>

Running ./bin/trello list gave me some new errors.

At this point, I found "npm list" which gave me a list of unmet dependencies.

npm ERR! missing: async@~0.2.9, required by [email protected]
npm ERR! missing: underscore@~1.5.1, required by [email protected]
npm ERR! missing: term-list@~0.2.0, required by [email protected]

Fixing those:

npm install async
npm install term-list
npm install underscore

Now it seems to run without errors.

Adding labels/edits to cards

I see an endpoint for creating a new card, but is there a way to edit an existing card? In particular, I'm interested in putting together a quick bash script for adding labels as I transition the card through stages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.