Quick Start
Go from zero to automated commits in under 5 minutes.
Quick Start Guide
This guide will walk you through setting up Autopilot CLI in a new project and demonstrating its core functionality.
1. Setup a Project
First, let's create a new directory and initialize a git repository. Autopilot requires an existing git repo to function.
mkdir my-new-project
cd my-new-project
git init
2. Initialize Autopilot
Run the initialization command to generate the default configuration file:
autopilot init
This creates a .autopilotrc.json file in your project root. You can inspect it, but the defaults are fine for now.
3. Recommended Workflow: Use a Dev Branch
By default, Autopilot is configured NOT to push to protected branches like main or master for safety reasons. We strongly recommend working on a feature or development branch.
Create and switch to a new branch:
git checkout -b develop
4. Start the Watcher
Now, start the background daemon. This command will spawn a separate process that watches your files.
autopilot start
You should see a message confirming that the watcher has started.
5. Make Some Changes
Now for the magic. Create a new file or modify an existing one.
echo "Hello Autopilot" > README.md
Wait a few seconds (default debounce is ~30 seconds). Autopilot will detect the change, stage it, create a conventional commit message (e.g., docs: update README.md), and push it to your remote develop branch.
6. Monitor Status
You can check what the daemon is doing at any time:
autopilot status
This will tell you if the service is running, stopped, or if it encountered an error.
7. Stop the Watcher
When you are finished coding for the session, stop the background process:
autopilot stop
Viewing Logs
If something isn't working as expected, you can check the logs. Autopilot writes logs to the .autopilot directory in your project root (this directory is added to .gitignore automatically during init).
To view the latest logs:
cat .autopilot/autopilot.log
Common Log Entries:
[INFO] File changed: README.md- Watcher detected a file event.[INFO] Debounce timer triggered- Waiting for more changes before committing.[SUCCESS] Committed and pushed- Operation completed successfully.[WARN] Protected branch detected- Autopilot skipped the push to avoid messing upmain.