sofia-post 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -2
  3. package/main.js +1336 -0
  4. package/package.json +20 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sofia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,38 @@
1
- # Temporary Holding Version
1
+ # sofia-post
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Command line for the [Sofia API](https://www.sofia-post.com/developers): publish, schedule and read
4
+ your social posts from a terminal or a script. Zero dependencies, Node.js 20 or later.
5
+
6
+ ```bash
7
+ npm install -g sofia-post
8
+ sofia --help
9
+ ```
10
+
11
+ ## Authenticate
12
+
13
+ ```bash
14
+ sofia auth:login # opens your browser (OAuth, PKCE)
15
+ export SOFIA_API_KEY=... # or a personal key from Settings > API
16
+ ```
17
+
18
+ Credentials from `auth:login` are kept in `~/.sofia/credentials.json` and take precedence over
19
+ `SOFIA_API_KEY`. `SOFIA_API_URL` points the CLI at another instance of the API.
20
+
21
+ ## Use
22
+
23
+ Every command prints JSON on stdout (pipe it to `jq`); an error is JSON on stderr with exit code 1.
24
+
25
+ ```bash
26
+ sofia establishments:list
27
+ sofia media:upload ./tarte.jpg -e <establishmentId>
28
+ sofia posts:create -e <establishmentId> -p instagram,facebook -c "Tarte tatin du jour" -m <mediaId> -s 2026-11-10T10:00:00Z
29
+ sofia posts:list -e <establishmentId> --status scheduled
30
+ sofia insights:get <establishmentId> --period last7Days
31
+ ```
32
+
33
+ Commands: `auth:login`, `auth:status`, `auth:logout`, `me`, `platforms:list`, `establishments:list`,
34
+ `accounts:list`, `accounts:connect`, `posts:create`, `posts:list`, `posts:get`, `posts:update`,
35
+ `posts:delete`, `media:upload`, `media:list`, `media:get`, `media:delete`, `insights:get`,
36
+ `webhooks:create`, `webhooks:list`, `webhooks:delete`, `webhooks:test`.
37
+
38
+ Documentation: https://www.sofia-post.com/developers/cli