simplenote-cli 0.1.1__py3-none-macosx_11_0_arm64.whl
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.
- simplenote_cli-0.1.1.data/scripts/simplenote-cli +0 -0
- simplenote_cli-0.1.1.dist-info/METADATA +220 -0
- simplenote_cli-0.1.1.dist-info/RECORD +6 -0
- simplenote_cli-0.1.1.dist-info/WHEEL +4 -0
- simplenote_cli-0.1.1.dist-info/licenses/LICENSE +21 -0
- simplenote_cli-0.1.1.dist-info/sboms/simplenote-cli.cyclonedx.json +5588 -0
|
Binary file
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: simplenote-cli
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Classifier: Environment :: Console
|
|
5
|
+
Classifier: Programming Language :: Rust
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Summary: A scriptable Simplenote CLI for humans and agents
|
|
9
|
+
Home-Page: https://github.com/rvben/simplenote-cli
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
|
+
Project-URL: Changelog, https://github.com/rvben/simplenote-cli/blob/main/CHANGELOG.md
|
|
14
|
+
Project-URL: Homepage, https://github.com/rvben/simplenote-cli
|
|
15
|
+
Project-URL: Issues, https://github.com/rvben/simplenote-cli/issues
|
|
16
|
+
Project-URL: Repository, https://github.com/rvben/simplenote-cli
|
|
17
|
+
|
|
18
|
+
# simplenote-cli
|
|
19
|
+
|
|
20
|
+
A Rust command-line client for existing Simplenote accounts. Text on a terminal,
|
|
21
|
+
JSON when piped, a discoverable [clispec](https://clispec.dev) v0.3 candidate
|
|
22
|
+
contract, and no background daemon. This is an independent, unofficial client.
|
|
23
|
+
|
|
24
|
+
Live smoke tests cover browser login, listing, pagination, field selection,
|
|
25
|
+
fetching, exact text output, history, search, creation, dry-run, updates, stale
|
|
26
|
+
edit refusal, trash/restore, and export. Automated tests use isolated fixtures.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
Cargo and PyPI packages install the same native Rust executable. Maturin builds
|
|
31
|
+
the PyPI package, which has no Python runtime dependencies.
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
uv tool install simplenote-cli
|
|
35
|
+
# Or: pipx install simplenote-cli
|
|
36
|
+
cargo install simplenote-cli --locked
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
PyPI support starts with 0.1.1. For 0.1.0, use Cargo or the
|
|
40
|
+
[GitHub binaries](https://github.com/rvben/simplenote-cli/releases).
|
|
41
|
+
Wheels cover Linux x64 and ARM64 (glibc 2.28+), macOS x64 and ARM64, and Windows
|
|
42
|
+
x64. Installing a source distribution requires Rust 1.90 or newer.
|
|
43
|
+
|
|
44
|
+
## Build
|
|
45
|
+
|
|
46
|
+
Requires Rust 1.90 or newer:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
cargo build --release --locked
|
|
50
|
+
cargo install --path . --locked
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Login
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
simplenote-cli auth login
|
|
57
|
+
simplenote-cli auth status
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
On a terminal, login prints the browser URL and prompts for the `email:CODE`
|
|
61
|
+
credential with input hidden. The browser supports the sign-in methods offered
|
|
62
|
+
by Simplenote. Codes expire after five minutes and are single-use. The CLI does
|
|
63
|
+
not request or store your password and does not automatically retry redemption.
|
|
64
|
+
|
|
65
|
+
Without a terminal, `auth login` returns a login URL and instructions. Redeem a
|
|
66
|
+
code through stdin using `auth login --code-stdin`; avoid putting credentials in
|
|
67
|
+
arguments or shell history. Headless use can instead supply `SIMPLENOTE_TOKEN`.
|
|
68
|
+
Tokens and codes are never included in output.
|
|
69
|
+
|
|
70
|
+
Credentials are stored in `auth.json` under the platform configuration directory
|
|
71
|
+
(`~/Library/Application Support/simplenote-cli` on macOS,
|
|
72
|
+
`$XDG_CONFIG_HOME/simplenote-cli` or `~/.config/simplenote-cli` on Linux).
|
|
73
|
+
`SIMPLENOTE_CONFIG_DIR` overrides that directory. On Unix, files are written with
|
|
74
|
+
mode 0600, and symlinks, special files, and group/world-readable credential files
|
|
75
|
+
are rejected. Windows uses platform filesystem permissions; Unix mode guarantees
|
|
76
|
+
do not apply there. No credentials are borrowed from another application.
|
|
77
|
+
|
|
78
|
+
`auth status` checks local availability only; it does not verify a token with the
|
|
79
|
+
service. `auth logout` removes this CLI's file; it does not revoke the server's
|
|
80
|
+
token, sign out other devices, or clear `SIMPLENOTE_TOKEN`.
|
|
81
|
+
|
|
82
|
+
## Read and search
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
simplenote-cli notes list --limit 20
|
|
86
|
+
simplenote-cli notes list --tag work --fields id,title,version
|
|
87
|
+
simplenote-cli notes search 'release checklist'
|
|
88
|
+
simplenote-cli notes get NOTE_ID
|
|
89
|
+
simplenote-cli notes get NOTE_ID --version 42
|
|
90
|
+
simplenote-cli notes cat NOTE_ID > note.md
|
|
91
|
+
simplenote-cli notes history NOTE_ID --limit 10
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
List and search use server index order, exclude trash by default, and omit note
|
|
95
|
+
content from their results. `--include-deleted` includes trash. Search is a
|
|
96
|
+
case-insensitive substring match over note content; filtering may scan multiple
|
|
97
|
+
server pages. Each invocation scans at most 20 server pages; a selective query
|
|
98
|
+
may return fewer than `--limit` matches, including an empty page, with a
|
|
99
|
+
`next_cursor`. Continue until that cursor is null. Results are fresh network reads; this version has no offline cache.
|
|
100
|
+
|
|
101
|
+
Tag matching is case-insensitive. Collections return `items`, `has_more`,
|
|
102
|
+
`next_cursor`, and `skipped_irregular` (the count of malformed records omitted
|
|
103
|
+
during this request; export preserves those records). Continue with
|
|
104
|
+
`--cursor TOKEN` and the same filters. `--limit` is 1–100, default 20. The server's
|
|
105
|
+
index is not a transactional snapshot: concurrent edits can affect traversal.
|
|
106
|
+
History cursors are version numbers; unavailable versions are marked explicitly.
|
|
107
|
+
Timestamps are the service's Unix seconds (numbers or numeric strings).
|
|
108
|
+
|
|
109
|
+
`notes get` includes the full content and version. When piped, `notes cat`
|
|
110
|
+
emits exact UTF-8 content with no added newline, even with `-o json`. On a
|
|
111
|
+
terminal, control and direction characters are escaped unless `--raw` is passed.
|
|
112
|
+
It is declared as an opaque text command in the schema.
|
|
113
|
+
|
|
114
|
+
## Write
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
simplenote-cli notes create --file note.md --tag work --dry-run
|
|
118
|
+
simplenote-cli notes create --file note.md --tag work
|
|
119
|
+
printf 'A new note\n' | simplenote-cli notes create --file -
|
|
120
|
+
|
|
121
|
+
simplenote-cli notes get NOTE_ID
|
|
122
|
+
simplenote-cli notes update NOTE_ID --base-version 42 --file edited.md --dry-run
|
|
123
|
+
simplenote-cli notes update NOTE_ID --base-version 42 --file edited.md
|
|
124
|
+
simplenote-cli notes trash NOTE_ID --base-version 43 --yes
|
|
125
|
+
simplenote-cli notes restore NOTE_ID --base-version 44
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Content must be nonblank UTF-8 and at most 1 MiB. New notes enable Markdown.
|
|
129
|
+
Tags must contain no whitespace, commas, or `@`; case-insensitive duplicates
|
|
130
|
+
are removed. Email tags can share notes in Simplenote, so this CLI rejects them.
|
|
131
|
+
Updates change content only; other fields are preserved by sending a partial
|
|
132
|
+
patch. Trash is recoverable; permanent deletion is not exposed.
|
|
133
|
+
|
|
134
|
+
`--base-version` is required for edits, trash, and restore. The CLI first reads
|
|
135
|
+
the current version and rejects an edit that is already stale. It then sends a
|
|
136
|
+
versioned patch to Simperium. **This is not an atomic compare-and-swap:** Simperium
|
|
137
|
+
can merge edits made concurrently after that read. The CLI returns the server's
|
|
138
|
+
actual resulting content and version. Review the result when concurrent editing
|
|
139
|
+
is possible. It never claims the server enforces a strict version precondition.
|
|
140
|
+
|
|
141
|
+
`--dry-run` performs validation (including a fresh read for edits) without sending
|
|
142
|
+
a write. Creates and writes are never automatically retried. Repeating a create
|
|
143
|
+
can create a duplicate; its chosen ID is printed to stderr before the request so
|
|
144
|
+
you can inspect that ID after an ambiguous failure. Failed writes also include
|
|
145
|
+
`error.details.note_id`, `operation`, and `outcome_unknown` in the JSON error.
|
|
146
|
+
Check the note after a network error, server error, or invalid write response
|
|
147
|
+
before deciding to retry.
|
|
148
|
+
A repeated edit with its original base version normally refuses as stale.
|
|
149
|
+
|
|
150
|
+
## Export
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
simplenote-cli export --directory ./simplenote-export
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Creates a **new** directory and one private JSON file per note, named
|
|
157
|
+
`note-<SHA256 of exact note ID>.json`. Hashing avoids case-insensitive filename
|
|
158
|
+
collisions and platform-reserved names; the exact ID stays in the JSON.
|
|
159
|
+
Includes trash, full content, tags, flags, versions, and timestamps. Every file
|
|
160
|
+
also contains `raw`, preserving all service fields, including publication and
|
|
161
|
+
sharing metadata and unknown system tags. Irregular legacy records that cannot
|
|
162
|
+
be normalized are still exported with `id`, `version`, `normalized: false`, and
|
|
163
|
+
`raw`. Historical revisions are not included. There is no bulk import command
|
|
164
|
+
in this version.
|
|
165
|
+
|
|
166
|
+
Existing directories and files are never overwritten. Failed exports retain
|
|
167
|
+
partial files for inspection; retry into a different new directory. Export is
|
|
168
|
+
paginated internally and is not an atomic account snapshot.
|
|
169
|
+
|
|
170
|
+
## Output and errors
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
simplenote-cli -o json notes list | jq '.items[].id'
|
|
174
|
+
simplenote-cli -o text notes list
|
|
175
|
+
simplenote-cli schema
|
|
176
|
+
simplenote-cli completions zsh
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`--output auto|json|text` / `-o` is global. Auto uses readable text on a terminal
|
|
180
|
+
and JSON otherwise. Data goes to stdout; diagnostics go to stderr. In JSON mode,
|
|
181
|
+
the last stderr line on failure is an `error` object with `kind`, `message`,
|
|
182
|
+
`exit_code`, and `hint`. No telemetry is sent by this client.
|
|
183
|
+
|
|
184
|
+
| Exit | Kind |
|
|
185
|
+
|---|---|
|
|
186
|
+
| 1 | internal |
|
|
187
|
+
| 2 | usage |
|
|
188
|
+
| 3 | auth |
|
|
189
|
+
| 4 | not_found |
|
|
190
|
+
| 5 | network |
|
|
191
|
+
| 6 | rate_limited |
|
|
192
|
+
| 7 | conflict |
|
|
193
|
+
| 8 | io |
|
|
194
|
+
| 9 | invalid_response |
|
|
195
|
+
| 10 | remote |
|
|
196
|
+
| 11 | confirmation_required |
|
|
197
|
+
|
|
198
|
+
## Development
|
|
199
|
+
|
|
200
|
+
```sh
|
|
201
|
+
make check
|
|
202
|
+
cargo test --locked
|
|
203
|
+
cargo build --locked
|
|
204
|
+
clispec score ./target/debug/simplenote-cli auth status
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Tests use isolated HTTP fixtures and temporary credential directories; they do
|
|
208
|
+
not contact your account or create remote notes. The contract derives arguments
|
|
209
|
+
from clap and validates against the vendored v0.3 candidate schema. The candidate
|
|
210
|
+
spec can still change.
|
|
211
|
+
|
|
212
|
+
API behavior follows [Simperium's HTTP reference](https://simperium.com/docs/reference/http/).
|
|
213
|
+
The browser code flow and service app ID were verified against
|
|
214
|
+
[Automattic's Simplenote MCP implementation](https://github.com/Automattic/simplenote-mcp).
|
|
215
|
+
Simplenote's [developer page](https://simplenote.com/developers/) does not offer a
|
|
216
|
+
supported third-party integration contract; service compatibility may change.
|
|
217
|
+
Publishing and releases require a separate explicit approval and use `vership`.
|
|
218
|
+
|
|
219
|
+
Release preparation and publishing prerequisites are documented in [docs/releases.md](docs/releases.md).
|
|
220
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
simplenote_cli-0.1.1.data/scripts/simplenote-cli,sha256=dWxAcmzrataRJEbUX_IQFmu_KZwPTOH7oo9yPXPQ5XI,3153280
|
|
2
|
+
simplenote_cli-0.1.1.dist-info/METADATA,sha256=0P7kRTdYcngFB4TQF6TzF2f6RcHfeBNmz1Y6ThOCTRs,9555
|
|
3
|
+
simplenote_cli-0.1.1.dist-info/WHEEL,sha256=Fvrs5zUKO4nQbE5Fttn9y8loVOWxn3I3-bRdoW2U0nw,102
|
|
4
|
+
simplenote_cli-0.1.1.dist-info/licenses/LICENSE,sha256=C-fnAxNl5_rkYD0NgIn5gEeZxx-ew8mOfqo_HJk3t4k,1101
|
|
5
|
+
simplenote_cli-0.1.1.dist-info/sboms/simplenote-cli.cyclonedx.json,sha256=V_oFYm_aaSkfEGHoByzzw1uOaazrOQTqlZmX_ZmXHSs,179080
|
|
6
|
+
simplenote_cli-0.1.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ruben J. Jongejan <ruben.jongejan@gmail.com>
|
|
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.
|