@traisetech/autopilot 0.1.7 โ 0.1.8
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/CHANGELOG.md +92 -67
- package/README.md +233 -227
- package/bin/autopilot.js +72 -72
- package/package.json +59 -58
- package/src/commands/doctor.js +121 -121
- package/src/commands/init.js +183 -129
- package/src/commands/insights.js +90 -0
- package/src/config/defaults.js +42 -36
- package/src/config/ignore.js +153 -136
- package/src/core/commit.js +321 -308
- package/src/core/focus.js +197 -0
- package/src/core/gemini.js +109 -0
- package/src/core/git.js +180 -177
- package/src/core/watcher.js +362 -277
- package/src/index.js +6 -0
- package/src/integrations/base.js +23 -0
- package/src/integrations/calendar.js +23 -0
- package/src/integrations/manager.js +48 -0
- package/src/utils/update-check.js +151 -151
package/CHANGELOG.md
CHANGED
|
@@ -1,67 +1,92 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
This project follows [Semantic Versioning](https://semver.org).
|
|
5
|
-
|
|
6
|
-
## [0.1.
|
|
7
|
-
|
|
8
|
-
###
|
|
9
|
-
- **
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- **
|
|
14
|
-
- Added
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
###
|
|
20
|
-
- **
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
- **
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- **
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- **
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- **
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
### Added
|
|
67
|
-
- **
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
This project follows [Semantic Versioning](https://semver.org).
|
|
5
|
+
|
|
6
|
+
## [0.1.8] - 2026-02-04
|
|
7
|
+
|
|
8
|
+
### Reliability & Core
|
|
9
|
+
- **Watcher Engine Overhaul**:
|
|
10
|
+
- Implemented dual ignore checks (chokidar + internal matcher) to guarantee no ignored files trigger builds.
|
|
11
|
+
- Added "Max Wait" fallback (60s) to prevent debounce starvation on busy repos.
|
|
12
|
+
- Hardcoded critical ignores (`.git`, `node_modules`, `autopilot.log`) to prevent infinite loops.
|
|
13
|
+
- **Git Safety**:
|
|
14
|
+
- Added graceful fallback for push failures (logs warning instead of crashing).
|
|
15
|
+
- Enforced "tracked only" commits using `git status --porcelain`.
|
|
16
|
+
- **Test Mode**:
|
|
17
|
+
- Added `AUTOPILOT_TEST_MODE=1` flag for deterministic CI testing (foreground run + auto-exit).
|
|
18
|
+
|
|
19
|
+
### CI/CD & Standards
|
|
20
|
+
- **GitHub Workflows**:
|
|
21
|
+
- `ci.yml`: Automated testing on Windows, Ubuntu, and macOS for every PR.
|
|
22
|
+
- `release.yml`: Automated GitHub Releases with changelog generation and tarball assets.
|
|
23
|
+
- `publish.yml`: Secure npm publishing via OIDC provenance.
|
|
24
|
+
- **Repository Standards**:
|
|
25
|
+
- Added Issue Templates (Bug/Feature), PR Template, `SECURITY.md`, and `CODEOWNERS`.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- **Windows Paths**: Fixed path normalization issues causing ignore rules to fail on Windows.
|
|
29
|
+
- **Self-Triggering**: Fixed issue where writing `autopilot.log` could trigger a new commit loop.
|
|
30
|
+
|
|
31
|
+
## [0.1.7] - 2026-02-01
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- **CLI Update Notifier**:
|
|
35
|
+
- Automatically checks for new versions on npm registry (once every 24 hours).
|
|
36
|
+
- Zero-dependency implementation using native Node.js `https`.
|
|
37
|
+
- Non-intrusive visual notification box on startup when updates are available.
|
|
38
|
+
- **Documentation**:
|
|
39
|
+
- Added live NPM download statistics to landing page and documentation sidebar.
|
|
40
|
+
- Enhanced install command widget with one-click copy.
|
|
41
|
+
|
|
42
|
+
## [0.1.6] - 2026-02-01
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
- **Smart Commit Generator 2.0**:
|
|
46
|
+
- Offline diff parsing using `git diff` (no external APIs).
|
|
47
|
+
- Conventional Commits compliance (`feat`, `fix`, `docs`, `style`, `test`).
|
|
48
|
+
- Intelligent scope detection for UI, Theme, Search, and Docs.
|
|
49
|
+
- Golden Test Suite with 10 fixtures for guaranteed message quality.
|
|
50
|
+
- **Developer Experience**:
|
|
51
|
+
- Added `npm run verify` script for pre-release checks.
|
|
52
|
+
- Improved Windows path normalization for reliable cross-platform usage.
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
- **Performance**: Switched from file-based status checks to staged diff analysis for commit messages.
|
|
56
|
+
- **Logic**: Reordered commit type priority (Style > Src > Test > Docs) to prevent misclassification of mixed changes.
|
|
57
|
+
- **Fix**: Resolved issue where new files were incorrectly flagged as `fix` instead of `feat`.
|
|
58
|
+
|
|
59
|
+
## [0.1.4] - 2026-02-01
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
- **Windows Compatibility**: Fixed critical issue where absolute paths on Windows caused ignore rules to fail.
|
|
63
|
+
- **Watcher Noise**: Fixed infinite commit loops caused by `.vscode/time-analytics.json` and self-logging.
|
|
64
|
+
- **CLI Crash**: Resolved `autopilot start` failure due to miswired Commander action handlers.
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
- **Release Gates**: Added `npm run verify` and `prepublishOnly` hooks to prevent broken releases.
|
|
68
|
+
- **Integration Tests**: Added full end-to-end test suite using `node:test`.
|
|
69
|
+
- **Smart Init**: `autopilot init` now automatically adds `autopilot.log` to `.gitignore`.
|
|
70
|
+
- **Diagnostics**: Added `autopilot doctor` for environment health checks.
|
|
71
|
+
|
|
72
|
+
## [0.1.3] - 2026-01-31
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
- **Initial Public Release**: First stable release on npm as `@traisetech/autopilot`.
|
|
76
|
+
- **Core Features**:
|
|
77
|
+
- Intelligent auto commit & push.
|
|
78
|
+
- Background watcher with debouncing.
|
|
79
|
+
- Branch protection (blocks commits to `main`/`master` by default).
|
|
80
|
+
- Remote-ahead safety checks.
|
|
81
|
+
- Per-project configuration via `.autopilotrc.json`.
|
|
82
|
+
|
|
83
|
+
## [0.1.1]
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
- **Package Hygiene**: Renamed package scope.
|
|
87
|
+
- **Distribution**: Added `files` whitelist to `package.json` to reduce install size.
|
|
88
|
+
|
|
89
|
+
## [0.1.0]
|
|
90
|
+
|
|
91
|
+
### Added
|
|
92
|
+
- **Prototype**: Initial development release with core architecture.
|
package/README.md
CHANGED
|
@@ -1,227 +1,233 @@
|
|
|
1
|
-
# ๐ Autopilot
|
|
2
|
-
|
|
3
|
-
<div align="center">
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
**Intelligent Git automation that commits and pushes your code, so you can focus on building.**
|
|
8
|
-
|
|
9
|
-
[](https://www.npmjs.com/package/@traisetech/autopilot)
|
|
10
|
-
[](https://opensource.org/licenses/MIT)
|
|
11
|
-
[](https://nodejs.org)
|
|
12
|
-
[](https://www.npmjs.com/package/@traisetech/autopilot)
|
|
13
|
-
[](https://github.com/PraiseTechzw/autopilot/stargazers)
|
|
14
|
-
[](https://github.com/PraiseTechzw/autopilot/actions)
|
|
15
|
-
[](http://makeapullrequest.com)
|
|
16
|
-
|
|
17
|
-
**Built by [Praise Masunga](https://github.com/PraiseTechzw) (PraiseTechzw)**
|
|
18
|
-
|
|
19
|
-
[Features](#-features) โข [Installation](#-installation) โข [Quick Start](#-quick-start) โข [Configuration](#-configuration) โข [Commands](#-commands)
|
|
20
|
-
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## ๐ Table of Contents
|
|
26
|
-
|
|
27
|
-
- [Why Autopilot?](#-why-autopilot)
|
|
28
|
-
- [Features](#-features)
|
|
29
|
-
- [Installation](#-installation)
|
|
30
|
-
- [Quick Start](#-quick-start)
|
|
31
|
-
- [Commands](#-commands)
|
|
32
|
-
- [Configuration](#-configuration)
|
|
33
|
-
- [Safety Features](#-safety-features)
|
|
34
|
-
- [Troubleshooting](#-troubleshooting)
|
|
35
|
-
- [Contributing](#-contributing)
|
|
36
|
-
- [License](#-license)
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## ๐ฏ Why Autopilot?
|
|
41
|
-
|
|
42
|
-
Autopilot is designed for developers who want to stay in the flow. It solves manual Git workflow fatigue by handling the repetitive cycle of staging, committing, and pushing changes, allowing you to focus entirely on writing code.
|
|
43
|
-
|
|
44
|
-
<table>
|
|
45
|
-
<tr>
|
|
46
|
-
<td width="50%">
|
|
47
|
-
|
|
48
|
-
### โ Before Autopilot
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# Every. Single. Time.
|
|
52
|
-
git add .
|
|
53
|
-
git commit -m "update stuff"
|
|
54
|
-
git push
|
|
55
|
-
|
|
56
|
-
# Repeat 50+ times a day...
|
|
57
|
-
# Lose focus on coding
|
|
58
|
-
# Forget to commit
|
|
59
|
-
# Inconsistent messages
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
</td>
|
|
63
|
-
<td width="50%">
|
|
64
|
-
|
|
65
|
-
### โ
With Autopilot
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# One time setup
|
|
69
|
-
autopilot init
|
|
70
|
-
autopilot start
|
|
71
|
-
|
|
72
|
-
# That's it!
|
|
73
|
-
# Focus on coding
|
|
74
|
-
# Auto-commits with smart messages
|
|
75
|
-
# Never lose work again
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
</td>
|
|
79
|
-
</tr>
|
|
80
|
-
</table>
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## โจ Features
|
|
85
|
-
|
|
86
|
-
- **๐ง Smart Commits**: Generates professional conventional commit messages automatically.
|
|
87
|
-
- **โก Watcher Engine**: Real-time file monitoring with smart debouncing using `chokidar`.
|
|
88
|
-
- **๐ก๏ธ Safety First**: Blocks commits on protected branches and checks remote status.
|
|
89
|
-
- **๐ Automated Flow**: Fetches, stages, commits, and pushes (optional) automatically.
|
|
90
|
-
- **โ๏ธ Zero Config**: Works out of the box, but fully configurable via `.autopilotrc.json`.
|
|
91
|
-
- **๐ฉบ Self-Healing**: Includes a `doctor` command to diagnose and fix issues.
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## โฌ๏ธ Installation
|
|
96
|
-
|
|
97
|
-
Install Autopilot globally using npm:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
npm install -g @traisetech/autopilot
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## ๐ Quick Start
|
|
106
|
-
|
|
107
|
-
### 1. Initialize
|
|
108
|
-
Navigate to your Git repository and initialize Autopilot:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
cd my-project
|
|
112
|
-
autopilot init
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### 2. Start Watching
|
|
116
|
-
Start the background daemon to begin monitoring your files:
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
autopilot start
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### 3. Check Status
|
|
123
|
-
Verify that Autopilot is running:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
autopilot status
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### 4. Stop
|
|
130
|
-
When you're done for the day:
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
autopilot stop
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## ๐ป Commands
|
|
139
|
-
|
|
140
|
-
| Command | Description |
|
|
141
|
-
|---------|-------------|
|
|
142
|
-
| `autopilot init` | Initializes configuration and ignore files in the current directory. |
|
|
143
|
-
| `autopilot start` | Starts the background watcher daemon. |
|
|
144
|
-
| `autopilot stop` | Stops the running watcher daemon. |
|
|
145
|
-
| `autopilot status` | Shows the current status of the watcher process. |
|
|
146
|
-
| `autopilot doctor` | Runs diagnostics to verify environment and configuration. |
|
|
147
|
-
| `autopilot --help` | Displays help information. |
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## โ๏ธ Configuration
|
|
152
|
-
|
|
153
|
-
Autopilot uses a `.autopilotrc.json` file for configuration. It is created automatically when you run `autopilot init`.
|
|
154
|
-
|
|
155
|
-
```json
|
|
156
|
-
{
|
|
157
|
-
"minInterval": 30,
|
|
158
|
-
"autoPush": true,
|
|
159
|
-
"blockedBranches": ["main", "production"],
|
|
160
|
-
"requireChecks": false,
|
|
161
|
-
"ignore": [
|
|
162
|
-
"*.log",
|
|
163
|
-
"temp/",
|
|
164
|
-
"dist/",
|
|
165
|
-
"node_modules"
|
|
166
|
-
]
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
| Option | Type | Default | Description |
|
|
171
|
-
|--------|------|---------|-------------|
|
|
172
|
-
| `minInterval` |
|
|
173
|
-
| `autoPush` |
|
|
174
|
-
| `blockedBranches` |
|
|
175
|
-
| `requireChecks` |
|
|
176
|
-
| `ignore` |
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## ๐ก๏ธ Safety Features
|
|
181
|
-
|
|
182
|
-
Autopilot includes several safety mechanisms to prevent accidents:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## ๐ง Troubleshooting
|
|
192
|
-
|
|
193
|
-
If you encounter issues, run the doctor command:
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
autopilot doctor
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
This will check for:
|
|
200
|
-
- Git repository status
|
|
201
|
-
- Configuration validity
|
|
202
|
-
- Node.js version
|
|
203
|
-
- Permissions
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
1
|
+
# ๐ Autopilot
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
**Intelligent Git automation that commits and pushes your code, so you can focus on building.**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@traisetech/autopilot)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://nodejs.org)
|
|
12
|
+
[](https://www.npmjs.com/package/@traisetech/autopilot)
|
|
13
|
+
[](https://github.com/PraiseTechzw/autopilot-cli/stargazers)
|
|
14
|
+
[](https://github.com/PraiseTechzw/autopilot-cli/actions)
|
|
15
|
+
[](http://makeapullrequest.com)
|
|
16
|
+
|
|
17
|
+
**Built by [Praise Masunga](https://github.com/PraiseTechzw) (PraiseTechzw)**
|
|
18
|
+
|
|
19
|
+
[Features](#-features) โข [Installation](#-installation) โข [Quick Start](#-quick-start) โข [Configuration](#-configuration) โข [Commands](#-commands)
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## ๐ Table of Contents
|
|
26
|
+
|
|
27
|
+
- [Why Autopilot?](#-why-autopilot)
|
|
28
|
+
- [Features](#-features)
|
|
29
|
+
- [Installation](#-installation)
|
|
30
|
+
- [Quick Start](#-quick-start)
|
|
31
|
+
- [Commands](#-commands)
|
|
32
|
+
- [Configuration](#-configuration)
|
|
33
|
+
- [Safety Features](#-safety-features)
|
|
34
|
+
- [Troubleshooting](#-troubleshooting)
|
|
35
|
+
- [Contributing](#-contributing)
|
|
36
|
+
- [License](#-license)
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## ๐ฏ Why Autopilot?
|
|
41
|
+
|
|
42
|
+
Autopilot is designed for developers who want to stay in the flow. It solves manual Git workflow fatigue by handling the repetitive cycle of staging, committing, and pushing changes, allowing you to focus entirely on writing code.
|
|
43
|
+
|
|
44
|
+
<table>
|
|
45
|
+
<tr>
|
|
46
|
+
<td width="50%">
|
|
47
|
+
|
|
48
|
+
### โ Before Autopilot
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Every. Single. Time.
|
|
52
|
+
git add .
|
|
53
|
+
git commit -m "update stuff"
|
|
54
|
+
git push
|
|
55
|
+
|
|
56
|
+
# Repeat 50+ times a day...
|
|
57
|
+
# Lose focus on coding
|
|
58
|
+
# Forget to commit
|
|
59
|
+
# Inconsistent messages
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
</td>
|
|
63
|
+
<td width="50%">
|
|
64
|
+
|
|
65
|
+
### โ
With Autopilot
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# One time setup
|
|
69
|
+
autopilot init
|
|
70
|
+
autopilot start
|
|
71
|
+
|
|
72
|
+
# That's it!
|
|
73
|
+
# Focus on coding
|
|
74
|
+
# Auto-commits with smart messages
|
|
75
|
+
# Never lose work again
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</table>
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## โจ Features
|
|
85
|
+
|
|
86
|
+
- **๐ง Smart Commits**: Generates professional conventional commit messages automatically.
|
|
87
|
+
- **โก Watcher Engine**: Real-time file monitoring with smart debouncing using `chokidar`.
|
|
88
|
+
- **๐ก๏ธ Safety First**: Blocks commits on protected branches and checks remote status.
|
|
89
|
+
- **๐ Automated Flow**: Fetches, stages, commits, and pushes (optional) automatically.
|
|
90
|
+
- **โ๏ธ Zero Config**: Works out of the box, but fully configurable via `.autopilotrc.json`.
|
|
91
|
+
- **๐ฉบ Self-Healing**: Includes a `doctor` command to diagnose and fix issues.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## โฌ๏ธ Installation
|
|
96
|
+
|
|
97
|
+
Install Autopilot globally using npm:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npm install -g @traisetech/autopilot
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## ๐ Quick Start
|
|
106
|
+
|
|
107
|
+
### 1. Initialize
|
|
108
|
+
Navigate to your Git repository and initialize Autopilot:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
cd my-project
|
|
112
|
+
autopilot init
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 2. Start Watching
|
|
116
|
+
Start the background daemon to begin monitoring your files:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
autopilot start
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 3. Check Status
|
|
123
|
+
Verify that Autopilot is running:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
autopilot status
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 4. Stop
|
|
130
|
+
When you're done for the day:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
autopilot stop
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## ๐ป Commands
|
|
139
|
+
|
|
140
|
+
| Command | Description |
|
|
141
|
+
|---------|-------------|
|
|
142
|
+
| `autopilot init` | Initializes configuration and ignore files in the current directory. |
|
|
143
|
+
| `autopilot start` | Starts the background watcher daemon. |
|
|
144
|
+
| `autopilot stop` | Stops the running watcher daemon. |
|
|
145
|
+
| `autopilot status` | Shows the current status of the watcher process. |
|
|
146
|
+
| `autopilot doctor` | Runs diagnostics to verify environment and configuration. |
|
|
147
|
+
| `autopilot --help` | Displays help information. |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## โ๏ธ Configuration
|
|
152
|
+
|
|
153
|
+
Autopilot uses a `.autopilotrc.json` file for configuration. It is created automatically when you run `autopilot init`.
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"minInterval": 30,
|
|
158
|
+
"autoPush": true,
|
|
159
|
+
"blockedBranches": ["main", "production"],
|
|
160
|
+
"requireChecks": false,
|
|
161
|
+
"ignore": [
|
|
162
|
+
"*.log",
|
|
163
|
+
"temp/",
|
|
164
|
+
"dist/",
|
|
165
|
+
"node_modules"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
| Option | Type | Default | Description |
|
|
171
|
+
|--------|------|---------|-------------|
|
|
172
|
+
| `minInterval` | number | 30 | Minimum seconds between commits. |
|
|
173
|
+
| `autoPush` | boolean | true | Whether to push changes automatically after commit. |
|
|
174
|
+
| `blockedBranches` | array | `[]` | List of branches to disable auto-commit on. |
|
|
175
|
+
| `requireChecks` | boolean | false | Run custom checks before committing. |
|
|
176
|
+
| `ignore` | array | `[]` | Additional glob patterns to ignore. |
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## ๐ก๏ธ Safety Features
|
|
181
|
+
|
|
182
|
+
Autopilot includes several safety mechanisms to prevent accidents:
|
|
183
|
+
|
|
184
|
+
- **Branch Protection**: Will not run on branches listed in `blockedBranches`.
|
|
185
|
+
- **Remote Sync**: Checks if local branch is behind remote before acting.
|
|
186
|
+
- **Debouncing**: Waits for file changes to settle before committing.
|
|
187
|
+
- **PID Management**: Ensures only one instance runs per repository.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## ๐ง Troubleshooting
|
|
192
|
+
|
|
193
|
+
If you encounter issues, run the `doctor` command:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
autopilot doctor
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
This will check for:
|
|
200
|
+
- Git repository status
|
|
201
|
+
- Configuration validity
|
|
202
|
+
- Node.js version
|
|
203
|
+
- Permissions
|
|
204
|
+
- **Common Issue**: If commits aren't triggering, check if you are editing ignored files (e.g. `.vscode`, `node_modules`).
|
|
205
|
+
- **Autopilot detects changes but never commits**: This can happen if files are constantly changing (resetting the debounce timer) or if you are on a blocked branch. Check `autopilot.log` for details.
|
|
206
|
+
|
|
207
|
+
For more details, visit our [Documentation Site](https://autopilot-cli.vercel.app/docs/troubleshooting).
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## ๐งช Verification (Smoke Test)
|
|
212
|
+
|
|
213
|
+
To verify that Autopilot is working correctly on your machine or in a CI environment, you can run the built-in verification suite. This runs the linter, the doctor diagnostic tool, and the full test suite.
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# Run the full verification suite
|
|
217
|
+
npm run verify
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
If everything is green, you are good to go!
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## ๐ค Contributing
|
|
225
|
+
|
|
226
|
+
Contributions, issues, and feature requests are welcome!
|
|
227
|
+
Feel free to check the [issues page](https://github.com/PraiseTechzw/autopilot-cli/issues).
|
|
228
|
+
|
|
229
|
+
Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.
|
|
230
|
+
|
|
231
|
+
## ๐ License
|
|
232
|
+
|
|
233
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|