Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Command-line interface for [Otper](https://otper.com) — manage boards, lists,
```sh
npm install -g @ssntpl/otper-cli
otper auth:login
otper board:search "taillog"
otper card:list --list 119
otper board:search "engineering"
otper card:list --list 42
```

## Contents
Expand Down Expand Up @@ -60,7 +60,7 @@ Or skip the saved config and use environment variables (handy for CI):
```sh
export OTPER_TOKEN="238|abc..."
export OTPER_BASE_URL="https://otper.com"
otper board:search taillog
otper board:search engineering
```

To sign out:
Expand Down Expand Up @@ -147,9 +147,9 @@ Run `otper <topic> --help` to see commands within a topic, and `otper <topic>:<c
The `--search` flag on `card:list` and `list:show` accepts the same syntax as the Otper UI:

```sh
otper card:list --list 119 --search "labels:bug;assignee:harsh;status:not completed"
otper card:list --list 119 --search "due date:overdue"
otper card:list --list 119 --search "#TL442"
otper card:list --list 42 --search "labels:bug;assignee:alice;status:not completed"
otper card:list --list 42 --search "due date:overdue"
otper card:list --list 42 --search "#ENG123"
```

### Label
Expand Down Expand Up @@ -196,9 +196,9 @@ Every command supports `--format`:
| `silent` | No output, only an exit code (best for scripts). |

```sh
otper card:list --list 119 --format json | jq '.data[].title'
otper card:list --list 42 --format json | jq '.data[].title'
otper board:search team --format csv > boards.csv
otper card:move 1234 --to-list 138 --format silent && echo moved
otper card:move 1234 --to-list 50 --format silent && echo moved
```

## Library usage
Expand All @@ -213,14 +213,14 @@ const client = new OtperClient({
token: process.env.OTPER_TOKEN!,
});

const board = await boards.getBoard(client, '24');
const inProgress = await lists.getListWithCards(client, '119', 1);
const board = await boards.getBoard(client, '7');
const inProgress = await lists.getListWithCards(client, '42', 1);

for (const card of inProgress!.cards.data) {
console.log(card.card_number, card.title);
}

await cards.moveCard(client, '36905', '120'); // → Done
await cards.moveCard(client, '1234', '50'); // → Done
```

You can also load the user's saved config:
Expand All @@ -245,7 +245,7 @@ const data = await client.gql<{ me: { id: string } }>(
**Daily standup digest** — list everything in progress and pipe into a summary:

```sh
otper card:list --list 119 --format csv > standup.csv
otper card:list --list 42 --format csv > inprogress.csv
```

**Move a card to Done in a script:**
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@ssntpl/otper-cli",
"version": "0.1.0",
"version": "0.1.1",
"description": "Command-line interface for Otper boards (https://otper.com).",
"author": "SSNTPL <hello@ssntpl.com>",
"author": "SSNTPL <info@ssntpl.com>",
"license": "MIT",
"homepage": "https://github.com/ssntpl/otper-cli",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/board/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class BoardCreate extends BaseCommand<typeof BoardCreate> {
static description = 'Create a new board in a team.';

static examples = [
'<%= config.bin %> board:create --team-id 16 --name "TAILLOG" --key TL --slug taillog',
'<%= config.bin %> board:create --team-id 16 --name "Engineering" --key ENG --slug engineering',
];

static flags = {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/board/show.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export default class BoardShow extends BaseCommand<typeof BoardShow> {
static description = 'Show a board by ID, or by team-slug + board-slug.';

static examples = [
'<%= config.bin %> board:show 24',
'<%= config.bin %> board:show --team ssntpl --slug taillog',
'<%= config.bin %> board:show 7',
'<%= config.bin %> board:show --team acme --slug engineering',
];

static args = { id: Args.string({ description: 'Board ID', required: false }) };
Expand Down
4 changes: 2 additions & 2 deletions src/commands/list/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default class ListList extends BaseCommand<typeof ListList> {
static description = 'List all lists on a board.';

static examples = [
'<%= config.bin %> list:list --board 24',
'<%= config.bin %> list:list --team ssntpl --slug taillog',
'<%= config.bin %> list:list --board 7',
'<%= config.bin %> list:list --team acme --slug engineering',
];

static flags = {
Expand Down
Loading