pnote 0.1.0
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.
- package/README.md +124 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1548 -0
- package/dist/index.js.map +1 -0
- package/package.json +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# pnote
|
|
2
|
+
|
|
3
|
+
PromptNote CLI - Manage your prompts from the terminal.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g pnote
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Login with your PAT token
|
|
15
|
+
pnote auth token pn_your_token_here
|
|
16
|
+
|
|
17
|
+
# List your notes
|
|
18
|
+
pnote notes
|
|
19
|
+
|
|
20
|
+
# Get a specific note
|
|
21
|
+
pnote notes get abc123
|
|
22
|
+
|
|
23
|
+
# Copy snippet to clipboard
|
|
24
|
+
pnote snippet copy abc123
|
|
25
|
+
|
|
26
|
+
# Search
|
|
27
|
+
pnote search "portrait"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
### Authentication
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnote auth login # Instructions to get a token
|
|
36
|
+
pnote auth token <pat> # Set token directly
|
|
37
|
+
pnote auth whoami # Show current user
|
|
38
|
+
pnote auth logout # Remove credentials
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Notes
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pnote notes # List all notes
|
|
45
|
+
pnote notes --tag "AI/art" # Filter by tag
|
|
46
|
+
pnote notes --archived # Show archived
|
|
47
|
+
pnote notes --pinned # Show pinned only
|
|
48
|
+
pnote notes get <id> # Get note details
|
|
49
|
+
pnote notes create "Title" # Create new note
|
|
50
|
+
pnote notes archive <id> # Archive note
|
|
51
|
+
pnote notes pin <id> # Toggle pin
|
|
52
|
+
pnote notes delete <id> # Delete note
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Snippets
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pnote snippet <note-id> # Show latest snippet
|
|
59
|
+
pnote snippet <note-id> --all # Show all versions
|
|
60
|
+
pnote snippet copy <note-id> # Copy to clipboard
|
|
61
|
+
echo "content" | pnote snippet add <note-id> # Add new version
|
|
62
|
+
pnote snippet favorite <id> # Toggle favorite
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Tags
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pnote tags # List all tags
|
|
69
|
+
pnote tags rename "old" "new" # Rename tag
|
|
70
|
+
pnote tags merge "a" "b" --into "c" # Merge tags
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Search
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pnote search "query" # Search all
|
|
77
|
+
pnote search "query" --notes-only # Notes only
|
|
78
|
+
pnote search "query" --limit 50 # Limit results
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Global Options
|
|
82
|
+
|
|
83
|
+
| Option | Description |
|
|
84
|
+
|--------|-------------|
|
|
85
|
+
| `--json` | Output as JSON |
|
|
86
|
+
| `--no-color` | Disable colors |
|
|
87
|
+
| `--plain` | Plain text output |
|
|
88
|
+
| `-h, --help` | Show help |
|
|
89
|
+
| `-V, --version` | Show version |
|
|
90
|
+
|
|
91
|
+
## Environment Variables
|
|
92
|
+
|
|
93
|
+
| Variable | Description |
|
|
94
|
+
|----------|-------------|
|
|
95
|
+
| `PROMTIE_TOKEN` | PAT token (overrides stored credentials) |
|
|
96
|
+
| `NO_COLOR` | Disable colors |
|
|
97
|
+
| `PROMTIE_API_ENDPOINT` | Custom API endpoint |
|
|
98
|
+
|
|
99
|
+
## Unix Philosophy
|
|
100
|
+
|
|
101
|
+
pnote follows Unix conventions:
|
|
102
|
+
|
|
103
|
+
- **stdout** for data, **stderr** for status
|
|
104
|
+
- Exit code 0 for success, non-zero for errors
|
|
105
|
+
- Supports piping: `pnote search "x" --json | jq`
|
|
106
|
+
- `--json` for machine-readable output
|
|
107
|
+
|
|
108
|
+
## Exit Codes
|
|
109
|
+
|
|
110
|
+
| Code | Meaning |
|
|
111
|
+
|------|---------|
|
|
112
|
+
| 0 | Success |
|
|
113
|
+
| 1 | General error |
|
|
114
|
+
| 2 | Authentication error |
|
|
115
|
+
| 3 | Resource not found |
|
|
116
|
+
| 4 | Network error |
|
|
117
|
+
|
|
118
|
+
## Configuration
|
|
119
|
+
|
|
120
|
+
Credentials are stored in `~/.config/pnote/credentials.json` (XDG compliant).
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
MIT
|
package/dist/index.d.ts
ADDED