gsheet-lvt 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Lucas Vieira
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 ADDED
@@ -0,0 +1,163 @@
1
+ <a name="TOC"></a>
2
+
3
+ <div align="center">
4
+ <!-- <DYNFIELD:HEADER_LOGO> -->
5
+ <a href="https://www.google.com/sheets/about/" target="_blank" rel="noopener noreferrer">
6
+ <img width="64" src=".github/image/sheet.png" alt="Google Sheets logo">
7
+ </a>
8
+ <div>gsheet</div>
9
+ <!-- </DYNFIELD:HEADER_LOGO> -->
10
+ <br />
11
+ <a href="#-overview">Overview</a> • <a href="#-motivation">Motivation</a> • <a href="#-features">Features</a> • <a href="#-packages">Packages</a> • <a href="#-quick-start">Quick Start</a> • <a href="#-commands">Commands</a> • <a href="#-configuration">Configuration</a> • <a href="#-license">License</a>
12
+ </div>
13
+
14
+ <!-- <DYNFIELD:TOP_DIVIDER> -->
15
+ <div width="100%" align="center">
16
+ <img src="https://cdn.jsdelivr.net/gh/lucasvtiradentes/pretty-session@main/.github/image/divider.png" />
17
+ </div>
18
+ <!-- </DYNFIELD:TOP_DIVIDER> -->
19
+
20
+ ## 🎺 Overview
21
+
22
+ gsheet is a CLI and Node.js library for managing Google Sheets from the terminal or from scripts.
23
+
24
+ ## ❓ Motivation
25
+
26
+ Google Sheets is often the easiest place to store operational data, but the browser workflow is slow for repeated reads, writes, imports, exports, and AI-agent automation. gsheet keeps account, spreadsheet, and sheet context locally so commands and scripts can work with short, repeatable calls.
27
+
28
+ ## ⭐ Features
29
+
30
+ - Multi-account support for personal, work, and other Google accounts
31
+ - OAuth 2.0 login without service accounts
32
+ - Interactive Google Drive spreadsheet selection
33
+ - Active account, spreadsheet, and sheet context
34
+ - Read, write, append, import, and export workflows
35
+ - Markdown, CSV, and JSON output for CLI and AI-agent usage
36
+
37
+ ## 🚀 Quick Start
38
+
39
+ 1. Install the CLI globally:
40
+ ```sh
41
+ npm i -g gsheet-lvt
42
+ # now you can use "gs" or "gsheet"
43
+ ```
44
+
45
+ <div align="center">
46
+ <a href="https://www.npmjs.com/package/gsheet-lvt"><img src="https://img.shields.io/npm/v/gsheet-lvt?label=npm&color=cb3837&logo=npm" alt="npm"></a>
47
+ </div>
48
+
49
+ 2. Add a Google account:
50
+
51
+ ```sh
52
+ gs account add
53
+ ```
54
+
55
+ 3. Add and select a spreadsheet:
56
+
57
+ ```sh
58
+ gs spreadsheet add
59
+ gs sheet select
60
+ ```
61
+
62
+ 4. Read the active sheet:
63
+
64
+ ```sh
65
+ gs sheet read
66
+ ```
67
+
68
+ ## 🧰 Commands
69
+
70
+ <!-- <DYNFIELD:COMMANDS> -->
71
+ ```sh
72
+ # account commands
73
+ gs account add
74
+ gs account list
75
+ gs account select [email]
76
+ gs account remove [email]
77
+ gs account reauth
78
+
79
+ # spreadsheet commands
80
+ gs spreadsheet add [--id <value>] [--name <value>]
81
+ gs spreadsheet list [--output <value>]
82
+ gs spreadsheet remove [--id <value>]
83
+ gs spreadsheet select [--id <value>] [--add] [--name <value>]
84
+ gs spreadsheet active [--output <value>]
85
+
86
+ # sheet commands
87
+ gs sheet list [--output <value>]
88
+ gs sheet active [--output <value>]
89
+ gs sheet select [--name <value>]
90
+ gs sheet read [--name <value>] [--output <value>] [--formulas] [--export <value>] [--range <value>]
91
+ gs sheet add --name <value>
92
+ gs sheet remove [--name <value>]
93
+ gs sheet rename [--name <value>] --new-name <value>
94
+ gs sheet copy [--name <value>] --to <value>
95
+ gs sheet write [--name <value>] [--cell <value>] [--range <value>] --value <value> [--no-preserve]
96
+ gs sheet append [--name <value>] --value <value>
97
+ gs sheet import [--name <value>] --file <value> [--skip-header]
98
+ gs sheet export [--name <value>] [--range <value>] --format <value> [--output <value>]
99
+ gs sheet row-add --row <value> [--name <value>] [--above] [--below] [--formulas] [--count <value>]
100
+ gs sheet row-remove --row <value> [--name <value>] [--above] [--below] [--count <value>]
101
+
102
+ gs update
103
+
104
+ # completion commands
105
+ gs completion zsh
106
+ gs completion bash
107
+ gs completion fish
108
+ ```
109
+ <!-- </DYNFIELD:COMMANDS> -->
110
+
111
+ ## 🛠️ Development
112
+
113
+ Install the dev CLI once to use `gsheetd` and `gsd` anywhere on your machine while testing local source changes:
114
+
115
+ ```sh
116
+ pnpm dev:install
117
+ gsheetd --help
118
+ gsd --help
119
+ pnpm dev:uninstall
120
+ ```
121
+
122
+ ## ⚙️ Configuration
123
+
124
+ Configuration is stored locally under the app config directory for your OS:
125
+
126
+ - Linux/WSL: `~/.config/gsheet/`
127
+ - macOS: `~/Library/Preferences/gsheet/`
128
+ - Windows: `%APPDATA%/gsheet/`
129
+
130
+ OAuth tokens are stored locally and refreshed automatically before expiry.
131
+
132
+ <!-- <DYNFIELD:CONFIG_JSON> -->
133
+ ```json
134
+ {
135
+ "config_path": "~/.config/gsheet/config.json",
136
+ "user_metadata_path": "~/.config/gsheet/user_metadata.json",
137
+ "activeAccount": "user@gmail.com",
138
+ "activeSpreadsheet": "my-budget",
139
+ "activeSheet": "monthly"
140
+ }
141
+ ```
142
+ <!-- </DYNFIELD:CONFIG_JSON> -->
143
+
144
+ ## 📜 License
145
+
146
+ [MIT](https://github.com/lucasvtiradentes/sheet-cmd/blob/main/LICENSE)
147
+
148
+ <!-- <DYNFIELD:FOOTER> -->
149
+ <div width="100%" align="center">
150
+ <img src="https://cdn.jsdelivr.net/gh/lucasvtiradentes/pretty-session@main/.github/image/divider.png" />
151
+ </div>
152
+
153
+ <br />
154
+
155
+ <div align="center">
156
+ <div>
157
+ <a target="_blank" href="https://www.linkedin.com/in/lucasvtiradentes/"><img src="https://img.shields.io/badge/-linkedin-blue?logo=Linkedin&logoColor=white" alt="LinkedIn"></a>
158
+ <a target="_blank" href="mailto:lucasvtiradentes@gmail.com"><img src="https://img.shields.io/badge/gmail-red?logo=gmail&logoColor=white" alt="Gmail"></a>
159
+ <a target="_blank" href="https://x.com/lucasvtiradente"><img src="https://img.shields.io/badge/-X-black?logo=X&logoColor=white" alt="X"></a>
160
+ <a target="_blank" href="https://github.com/lucasvtiradentes"><img src="https://img.shields.io/badge/-github-gray?logo=Github&logoColor=white" alt="Github"></a>
161
+ </div>
162
+ </div>
163
+ <!-- </DYNFIELD:FOOTER> -->
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node