Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

WIP cli+api: consistent and intuitive CLI usage #812

Closed
wants to merge 5 commits into from

Conversation

balupton
Copy link
Contributor

@balupton balupton commented Jun 7, 2019

updates the prettier and editorconfig with the latest from https://github.com/textileio/base

Signed-off-by: Benjamin Lupton <b@lupton.cc>
- Fixes textileio/community#89
- Fixes #794

User facing changes:

- fix `textile contact rm` not working due to typo
- readd stdin input for `textile files add`
- add `textile files list block`
- add `textile files list thread`
- `textile files list` aliases to `textile files list thread`
- `textile thread files` aliases to `textile files list thread`
- `textile block files` aliases to `textile files list block`

Internal changes:

- next page functionality moved to helper, and wording changed to be more clear

Signed-off-by: Benjamin Lupton <b@lupton.cc>
The concept of "default" thread introduces a Side Effect into the way textile operates. This removes such behaviour. Default threads can be handled by the user, to ensure that textile's operation remains consistent.

Signed-off-by: Benjamin Lupton <b@lupton.cc>
User facing changes:

- commands will now default to their list subcommand
  - e.g. `textile threads` will alias `textile threads list`
- `textile thread files` as alias for `textile files thread`
- `textile block files` as alias for `textile files block`
- Some flags have been converted to arguments for consistency, new signatures are
  - `textile block list <thread>`
  - `textile chat <thread>`
  - `textile feed [<thread>]`
  - `textile file add <thread> [<path>]
  - `textile init <account-seed>`
  - `textile invite create <thread>`
  - `textile message add <thread> <body>`
  - `textile message list [<thread>]`
  - `textile subscribe [<thread>]`
  - `textile thread peer <thread>`
  - `textile thread rename <thread> <name>`
  - `textile thread unsubscribe <thread>`
  - `textile wallet create <seed>`
  - `textile wallet accounts <seed>`
- Some flags have been renamed for terseness:
  - `--repo-path` changed to `--repo`
  - `--pin-code` changed to `--pin`

Internal changes:

- Command method calls now go alongside command definitions

Signed-off-by: Benjamin Lupton <b@lupton.cc>
@carsonfarmer
Copy link
Member

When this is out of WIP, it would be awesome for downstream clients if the changelog included all the new REST API endpoints 🙏. Especially because all the nice aliases are slightly harder to groc in the source :)

@balupton
Copy link
Contributor Author

balupton commented Jun 7, 2019

When this is out of WIP, it would be awesome for downstream clients if the changelog included all the new REST API endpoints 🙏

No changes to the REST API in this besides removal of default thread, which shouldn't require any client updates, as no one is probably using it.

- Closes #798
- Closes #799
- Closes #797

Internal changes:

- Removes thread init config that was only used for configuring the textile default thread ID, which this branch has already removed

User facing changes:

- `textile --help` is now more compact
- `textile thread ubsubscribe` is now `textle thread abandon`, b/c compat provided
- `textile subscribe` is now `textile observe`, and `/subscribe` is now `/observe`, b/c compat provided
- fixed wallet accounts being generated with the passphrase as the mnemonic, regression since v0.2
- `textile thread files` and `textile bl.ock files` now work was expected
- `textile block list` now correctly requires the thread id
- Improved the documentation for `textile init`, `textile account seed`, `textile wallet`, `textile wallet accounts`, `textile observe`, `textile thread abandon`
- `textile token create` is now `textile token add`, with b/c
- Next page output is now clearer on how to exit

Signed-off-by: Benjamin Lupton <b@lupton.cc>
@balupton balupton closed this Jun 11, 2019
balupton added a commit that referenced this pull request Jun 13, 2019
- Closes textileio/community#89
- Closes #783
- Closes #793
- Closes #794
- Closes #795
- Closes #797
- Closes #798
- Closes #799
- Closes #809
- Closes #812

## Internal changes:

- next page functionality moved to helper, and wording changed to be more clear

## User facing changes:

- Removed the concept of default threads from textile
  - Removes thread init config that was only used for configuring the textile default thread ID, which this branch has already removed
- Setup better aliases for files, and set list commands as defaults for their parent, e.g.
  - `textile threads` -> `textile threads list`
  - `textile files` -> `textile files list` -> `textile files list thread`
  - `textile thread files` -> `textile files thread` -> `textile files list thread`
  - `textile block files` -> `textile files block` -> `textile files list block` -> `textile files list block list`
- Fixes fetching file content when only one file was in a block:
  - `textile files block <blockid> --index=0 --path=. --content` is now `textile files block get <blockid> --index=0 --path=. --content`
- Commands that add files now output more meaningful information
- `textile subscribe` is now `textile observe`, same behaviour, clearer name, b/c compat provided
  - and for the HTTP API `/subscribe` is now `/observe`, b/c compat provided
- `textile thread unsubscribe` is now `textile thread abandon`, same behaviour, clearer name, b/c compat provided
- `textile token create` is now `textile token add`, with b/c
- Some flags have been converted to arguments for consistency, new signatures are
  - `textile block list <thread>`
  - `textile chat <thread>`
  - `textile feed [<thread>]`
  - `textile file add <thread> [<path>]`
  - `textile init <account-seed>`
  - `textile invite create <thread>`
  - `textile message add <thread> <body>`
  - `textile message list [<thread>]`
  - `textile observe [<thread>]`
  - `textile thread peer <thread>`
  - `textile thread rename <thread> <name>`
  - `textile thread abandon <thread>`
  - `textile wallet create [<passphrase>]`
  - `textile wallet accounts <mnemonic> [<passphrase>]`
- Some flags have been renamed for terseness:
  - `--repo-path` changed to `--repo`
  - `--pin-code` changed to `--pin`
- `textile --help` is now more compact
- Next page output is now clearer on how to exit
- Improved the documentation for `textile init`, `textile account seed`, `textile wallet`, `textile wallet accounts`, `textile observe`, `textile thread abandon`
- Fix `textile contact rm` not working due to typo (regression from v0.2)
- Fix `textile files add` not accepting stdin (regression from v0.2)
- Fix wallet accounts being generated with the passphrase as the mnemonic (regression from v0.2)

## Merges

- ff6741b
- 941388e
- d1b37d3
- a20f4b4
- 18d61ce
- 37db65a
- 554cac3
- 60bd455
- d927b3b
- 3a946de
- f58fd8a
- 745a622
- 408e881
- 2f1a9a6
- b536108
- ecfd667
- 5db56c2
- f27fe44
- 7eeade4
@balupton balupton deleted the benjamin/fix-89 branch June 13, 2019 02:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update tour with new command-line usage
2 participants