@changesmith/cli 1.4.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 ADDED
@@ -0,0 +1,206 @@
1
+ # @changesmith/cli
2
+
3
+ Generate beautiful, AI-powered changelogs from your git history.
4
+
5
+ The Changesmith CLI connects to [changesmith.dev](https://changesmith.dev) to generate professional changelogs from your commits. Prompt logic stays server-side; the CLI handles local git operations and API communication.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install -g @changesmith/cli
11
+ # or
12
+ pnpm add -g @changesmith/cli
13
+ # or
14
+ npx @changesmith/cli
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # Initialize in your repository
21
+ changesmith init
22
+
23
+ # Log in to Changesmith
24
+ changesmith login
25
+
26
+ # Generate a changelog for your latest tag
27
+ changesmith generate
28
+ ```
29
+
30
+ ## Commands
31
+
32
+ ### `changesmith init`
33
+
34
+ Initialize Changesmith in the current repository. Creates a `.changesmith.json` config file.
35
+
36
+ ```bash
37
+ changesmith init
38
+ changesmith init --force # Overwrite existing config
39
+ ```
40
+
41
+ ### `changesmith login`
42
+
43
+ Authenticate with Changesmith. Uses device authorization flow by default.
44
+
45
+ ```bash
46
+ changesmith login
47
+
48
+ # For CI/automation, use a pre-generated token
49
+ changesmith login --token YOUR_TOKEN
50
+ ```
51
+
52
+ ### `changesmith logout`
53
+
54
+ Log out from Changesmith.
55
+
56
+ ```bash
57
+ changesmith logout
58
+ ```
59
+
60
+ ### `changesmith generate`
61
+
62
+ Generate a changelog from git commits.
63
+
64
+ ```bash
65
+ # Generate for latest tag
66
+ changesmith generate
67
+
68
+ # Generate for a specific version
69
+ changesmith generate v1.2.0
70
+
71
+ # Specify a range
72
+ changesmith generate v1.2.0 --from v1.1.0
73
+
74
+ # Output to file
75
+ changesmith generate v1.2.0 -o CHANGELOG.md
76
+ ```
77
+
78
+ **Options:**
79
+
80
+ - `--from <tag>` — Starting tag/commit (defaults to previous tag)
81
+ - `--to <ref>` — Ending ref (defaults to the version tag)
82
+ - `-o, --output <file>` — Output file (defaults to stdout)
83
+
84
+ ### `changesmith status`
85
+
86
+ Show Changesmith status for the current repository.
87
+
88
+ ```bash
89
+ changesmith status
90
+ ```
91
+
92
+ Displays:
93
+
94
+ - Git repository info (tags, current state)
95
+ - Project config status
96
+ - Authentication status
97
+ - Current plan info
98
+
99
+ ### `changesmith config`
100
+
101
+ View or modify configuration.
102
+
103
+ ```bash
104
+ # Show all config
105
+ changesmith config show
106
+
107
+ # Show project config only
108
+ changesmith config show --project
109
+
110
+ # Show user config only
111
+ changesmith config show --user
112
+
113
+ # Get a specific value (project config)
114
+ changesmith config get excludeTypes
115
+
116
+ # Get a specific value (user config)
117
+ changesmith config get apiUrl --global
118
+
119
+ # Set a value (project config)
120
+ changesmith config set excludeTypes "chore,style,ci,docs"
121
+ changesmith config set defaultBranch main
122
+
123
+ # Set a value (user config)
124
+ changesmith config set apiUrl https://api.changesmith.dev --global
125
+
126
+ # Reset project config to defaults
127
+ changesmith config reset --force
128
+ ```
129
+
130
+ ## Configuration
131
+
132
+ ### Project Config (`.changesmith.json`)
133
+
134
+ Repository-specific settings stored in your project root:
135
+
136
+ ```json
137
+ {
138
+ "version": 1,
139
+ "defaultBranch": "main",
140
+ "excludeTypes": ["chore", "style", "ci"],
141
+ "includeScopes": [],
142
+ "excludeScopes": [],
143
+ "styleGuide": "",
144
+ "customPrompt": ""
145
+ }
146
+ ```
147
+
148
+ | Key | Description |
149
+ | --------------- | --------------------------------------------- |
150
+ | `version` | Config version (always `1`) |
151
+ | `defaultBranch` | Default branch for comparisons |
152
+ | `excludeTypes` | Commit types to exclude (e.g., `chore`, `ci`) |
153
+ | `includeScopes` | Only include these scopes (empty = all) |
154
+ | `excludeScopes` | Exclude these scopes |
155
+ | `styleGuide` | Style guide name for generation |
156
+ | `customPrompt` | Custom instructions for AI generation |
157
+
158
+ ### User Config
159
+
160
+ Global settings stored in `~/.changesmith`:
161
+
162
+ | Key | Description |
163
+ | -------- | ----------------------------------------------------- |
164
+ | `apiUrl` | API endpoint (default: `https://api.changesmith.dev`) |
165
+ | `token` | Auth token (set via `changesmith login`) |
166
+
167
+ ### Environment Variables
168
+
169
+ Environment variables take precedence over stored configuration, making CI/CD usage simpler. Empty or whitespace-only values are ignored, falling back to stored config.
170
+
171
+ | Variable | Description |
172
+ | --------------------- | --------------------------------------- |
173
+ | `CHANGESMITH_TOKEN` | Auth token (no `login` needed when set) |
174
+ | `CHANGESMITH_API_URL` | API endpoint override |
175
+
176
+ > **Security:** Never commit tokens to version control. Use your CI platform's secrets management (e.g., GitHub Secrets, GitLab CI/CD variables).
177
+
178
+ ## CI/CD Usage
179
+
180
+ For automated workflows, set `CHANGESMITH_TOKEN` as an environment variable. No `login` step is required:
181
+
182
+ ```yaml
183
+ # GitHub Actions example
184
+ - name: Generate Changelog
185
+ env:
186
+ CHANGESMITH_TOKEN: ${{ secrets.CHANGESMITH_TOKEN }}
187
+ run: npx @changesmith/cli generate ${{ github.ref_name }} -o CHANGELOG.md
188
+ ```
189
+
190
+ Generate an API token from the [Changesmith dashboard](https://changesmith.dev/dashboard/settings).
191
+
192
+ ## Requirements
193
+
194
+ - Node.js 20+
195
+ - Git repository with a GitHub remote
196
+ - Repository connected to Changesmith (via GitHub App)
197
+
198
+ ## Links
199
+
200
+ - [Changesmith Dashboard](https://changesmith.dev/dashboard)
201
+ - [Documentation](https://changesmith.dev/docs)
202
+ - [GitHub](https://github.com/PhilipLudington/Changesmith)
203
+
204
+ ## License
205
+
206
+ MIT
@@ -0,0 +1,2 @@
1
+
2
+ export { }