Compare commits

...

9 commits

Author SHA1 Message Date
Val 1ac834dd94
Merge pull request #5 from jschauma/master
tyop: colections -> collections
2023-05-16 15:51:43 -04:00
Jan Schaumann a10a698861 tyop: colections -> collections 2023-05-16 14:25:25 -04:00
Val 6526cd51a7 1.0.2 2022-01-23 09:56:25 -05:00
Val 76e81eb562 CLI error handling 2022-01-23 09:56:19 -05:00
Valérian Galliat 42371486da 1.0.1 2021-10-17 15:52:20 -04:00
Valérian Galliat 8a9f34bca1 Upgrade Firefox Sync client 2021-10-17 15:52:12 -04:00
Valérian Galliat 56c0f4b4d9 Add version badge 2021-10-16 16:43:58 -04:00
Valérian Galliat 9898e4e853 Update readme 2021-10-16 09:55:28 -04:00
Valérian Galliat 483481441e Add installation instructions 2021-10-16 09:51:21 -04:00
3 changed files with 29 additions and 3 deletions

View file

@ -1,4 +1,4 @@
# Firefox Sync CLI
# Firefox Sync CLI [![npm version](http://img.shields.io/npm/v/firefox-sync-cli.svg?style=flat-square)](https://www.npmjs.org/package/firefox-sync-cli)
> Manage Firefox Sync from the CLI! ✨
@ -16,6 +16,14 @@ It features two ways to authenticate, one using a Firefox Accounts email
and password to open a session, and one using OAuth. See more about them
[below](#authentication).
## Installation
```sh
npm install -g firefox-sync-cli
```
The command will be available as `ffs`. 😏
## Usage
```
@ -47,6 +55,20 @@ Commands:
help [command] Display help for command.
```
A typical flow will look like this:
```sh
ffs -c ~/.ffs-creds.json oauth
ffs -c ~/.ffs-creds.json collections
ffs -c ~/.ffs-creds.json get bookmarks --full
```
During authentication, this will create `~/.ffs-creds.json` to store the
credentials necessary to access Firefox Sync.
Further commands read credentials from this file to use that session to
query the API.
## Authentication
### Email and password

4
ffs
View file

@ -3,3 +3,7 @@
const cli = require('./cli')
cli(process.argv)
.catch(err => {
console.error(err.stack || err)
process.exit(1)
})

View file

@ -1,6 +1,6 @@
{
"name": "firefox-sync-cli",
"version": "1.0.0",
"version": "1.0.2",
"description": "Manage Firefox Sync from the CLI! ✨",
"license": "Unlicense",
"author": "Val (https://val.codejam.info)",
@ -20,7 +20,7 @@
},
"dependencies": {
"commander": "^8.2.0",
"firefox-sync": "^1.0.0",
"firefox-sync": "^1.1.0",
"ini": "^2.0.0",
"prompts": "^2.4.2",
"sqlite": "^4.0.23",