adograb 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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +108 -0
  3. package/dist/index.js +3976 -0
  4. package/package.json +53 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jitesh Sonkusare
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,108 @@
1
+ # adograb
2
+
3
+ Browse and clone Azure DevOps repositories from the terminal.
4
+
5
+ ## Features
6
+
7
+ - **Interactive repo browser** — fuzzy-searchable list of all repositories in your project
8
+ - **Direct clone by name** — clone any repo without the menu
9
+ - **PAT or Git Credential Manager auth** — use a Personal Access Token or your existing machine credentials
10
+ - **Project switcher** — switch between projects in the same organization without re-running init
11
+ - **Auth mode switcher** — toggle between auth modes at any time
12
+ - **Config management** — view and reset saved settings
13
+
14
+ ## Requirements
15
+
16
+ - Node.js 20 or later
17
+ - Git installed and on `PATH`
18
+ - An Azure DevOps organization URL (e.g. `https://dev.azure.com/my-org`)
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ npm install -g adograb
24
+ ```
25
+
26
+ ## Quick Start
27
+
28
+ ```bash
29
+ # 1. Run first-time setup
30
+ adograb init
31
+
32
+ # 2. Browse and clone
33
+ adograb
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ ### `adograb` or `adograb list`
39
+
40
+ Opens an interactive repository browser. Use arrow keys to navigate, type to filter. Selecting a repository prompts for confirmation, then clones it to your configured clone root.
41
+
42
+ ### `adograb init`
43
+
44
+ First-time setup wizard:
45
+
46
+ 1. Prompts for your Azure DevOps organization URL
47
+ 2. Asks you to choose an authentication mode (Git Credential Manager or PAT)
48
+ 3. Connects to ADO and lets you select a project
49
+ 4. Asks where to clone repositories
50
+
51
+ ### `adograb clone <name>`
52
+
53
+ Clone a specific repository by name without the interactive menu.
54
+
55
+ ```bash
56
+ adograb clone my-repo-name
57
+ ```
58
+
59
+ ### `adograb config show`
60
+
61
+ Display the currently saved configuration.
62
+
63
+ ```
64
+ Organization URL https://dev.azure.com/my-org
65
+ Project My Project (abc123...)
66
+ Auth mode pat
67
+ Clone root /home/user/code
68
+ ```
69
+
70
+ ### `adograb config reset`
71
+
72
+ Clear all saved configuration and remove stored credentials. You will be asked to confirm.
73
+
74
+ ### `adograb project switch`
75
+
76
+ Fetch all projects from your organization and switch to a different one. Your organization URL and authentication settings are preserved.
77
+
78
+ ### `adograb auth switch`
79
+
80
+ Change authentication mode. Prompts for a new PAT if switching to PAT mode, or removes the stored PAT when switching to default mode.
81
+
82
+ ## Authentication
83
+
84
+ ### Default — Git Credential Manager (recommended)
85
+
86
+ Uses the credentials managed by [Git Credential Manager](https://github.com/git-ecosystem/git-credential-manager). No token required — if you can already run `git clone` against your ADO organization, this mode will work.
87
+
88
+ ### PAT Token
89
+
90
+ Enter a Personal Access Token with at minimum **Code (Read)** scope. The PAT is stored in the operating system credential store (macOS Keychain, Windows Credential Manager, or Linux Secret Service) and never written to disk in plain text.
91
+
92
+ To generate a PAT: **Azure DevOps → User Settings → Personal access tokens → New Token**.
93
+
94
+ ## Configuration Storage
95
+
96
+ Settings are stored using [`conf`](https://github.com/sindresorhus/conf) in the platform's standard config directory:
97
+
98
+ | Platform | Location |
99
+ |----------|----------|
100
+ | macOS | `~/Library/Preferences/adograb-nodejs/` |
101
+ | Windows | `%APPDATA%\adograb-nodejs\Config\` |
102
+ | Linux | `~/.config/adograb-nodejs/` |
103
+
104
+ PATs are stored in the OS credential store — they are **not** in the config file.
105
+
106
+ ## License
107
+
108
+ MIT