Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## [2.3.0] - 2026-02-18

### Added
- **Production-Ready Leaderboard**:
- Implemented secure Row-Level Security (RLS) policies for anonymized stat synchronization.
- Enhanced API response to include real-time global ranking.
- **Searchable Documentation**:
- Added full-text search capability to the documentation portal using a pre-built static index.

### Improved
- **Error Diagnostics**:
- CLI now provides detailed feedback for server-side errors during sync (no more generic 500 errors).
- Synchronous environment validation for Supabase credentials on the server.
- **AI Reliability**:
- Improved Grok API error parsing for rate limits and invalid tokens.
- Optimized fetch timeouts for better responsiveness in low-bandwidth environments.

### Fixed
- **CLI Stability**:
- Fixed sync failures caused by rigid database permission checks.
- Resolved potential crashes when parsing malformed `autopilot.log` entries.

## [2.2.0] - 2026-02-14

### Added
Expand Down
101 changes: 101 additions & 0 deletions autopilot-docs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ export default async function Home() {
</Link>
</div>

<div className="flex flex-col items-center gap-4 animate-fade-in mb-12">
<div className="px-4 py-2 rounded-lg bg-link/10 border border-link/20 text-link text-sm font-mono flex items-center gap-2">
<Terminal className="h-4 w-4" />
<span>npx @traisetech/autopilot guide</span>
</div>
<p className="text-xs text-muted-foreground italic">New to Autopilot? Run our interactive guide to learn the ropes.</p>
</div>

<InstallCommand />
</div>
</section>
Expand Down Expand Up @@ -169,6 +177,66 @@ export default async function Home() {
</div>
</section>

{/* Commands Reference */}
<section className="py-24 px-4 bg-background">
<div className="container mx-auto max-w-6xl">
<div className="text-center mb-16">
<h2 className="text-3xl md:text-4xl font-bold mb-4">Command Reference</h2>
<p className="text-lg text-muted-foreground max-w-2xl mx-auto">
Master every aspect of the Autopilot CLI with this comprehensive command list.
</p>
</div>

<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<CommandCard
command="autopilot init"
description="Setup safety rails and configuration for your repository."
group="Setup"
/>
<CommandCard
command="autopilot start"
description="Start the intelligent foreground watcher."
group="Core"
/>
<CommandCard
command="autopilot dashboard"
description="Open the real-time TUI dashboard."
group="Visibility"
/>
<CommandCard
command="autopilot insights"
description="View productivity metrics and quality scores."
group="Analytics"
/>
<CommandCard
command="autopilot leaderboard"
description="Sync and view your global ranking."
group="Social"
/>
<CommandCard
command="autopilot undo"
description="Safely revert the last automated commit."
group="Safety"
/>
<CommandCard
command="autopilot doctor"
description="Diagnose environment and setup issues."
group="Maintenance"
/>
<CommandCard
command="autopilot guide"
description="Interactive walk-through of the tool."
group="Education"
/>
<CommandCard
command="autopilot config"
description="Manage local and global configurations."
group="Advanced"
/>
</div>
</div>
</section>

{/* Features */}
<FeatureShowcase />

Expand Down Expand Up @@ -244,3 +312,36 @@ function PrincipleCard({ icon: Icon, title, description, color, bg }: { icon: an
);
}

function CommandCard({ command, description, group }: { command: string, description: string, group: string }) {
return (
<div className="group relative p-8 bg-card rounded-2xl border border-border hover:border-link/50 transition-all duration-500 flex flex-col justify-between overflow-hidden">
{/* Background Glow */}
<div className="absolute -right-12 -top-12 h-24 w-24 bg-link/10 blur-3xl group-hover:bg-link/20 transition-all duration-500 rounded-full" />

<div className="relative z-10">
<div className="flex justify-between items-center mb-6">
<span className="px-3 py-1 rounded-full bg-link/10 text-[10px] font-black uppercase tracking-widest text-link border border-link/20">
{group}
</span>
<Terminal className="h-4 w-4 text-muted-foreground/30 group-hover:text-link/50 transition-colors" />
</div>

<div className="font-mono text-sm bg-secondary/50 dark:bg-black/40 p-4 rounded-xl mb-6 border border-border group-hover:border-link/30 group-hover:shadow-[0_0_20px_rgba(59,130,246,0.1)] transition-all duration-300">
<div className="flex items-center gap-2">
<span className="text-link font-bold select-none">$</span>
<span className="text-foreground font-medium">{command}</span>
</div>
</div>

<p className="text-sm text-muted-foreground leading-relaxed group-hover:text-foreground/80 transition-colors">
{description}
</p>
</div>

{/* Bottom accent line */}
<div className="absolute bottom-0 left-0 h-1 w-0 bg-gradient-to-r from-blue-600 to-indigo-600 group-hover:w-full transition-all duration-700" />
</div>
);
}


9 changes: 8 additions & 1 deletion bin/autopilot.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const doctor = require('../src/commands/doctor');
const presetCommand = require('../src/commands/preset');
const configCommand = require('../src/commands/config');
const interactiveCommand = require('../src/commands/interactive');
const guideCommand = require('../src/commands/guide');
const pkg = require('../package.json');
const logger = require('../src/utils/logger');
const { checkForUpdate } = require('../src/utils/update-check');
Expand All @@ -32,7 +33,8 @@ const commands = {
doctor: doctor,
preset: presetCommand,
config: configCommand,
interactive: interactiveCommand
interactive: interactiveCommand,
guide: guideCommand
};

// Runtime assertion to prevent wiring errors
Expand Down Expand Up @@ -130,6 +132,11 @@ program
.option('-g, --global', 'Set the preference globally')
.action(interactiveCommand);

program
.command('guide')
.description('Interactive guide to using Autopilot')
.action(guideCommand);

program
.command('doctor')
.description('Diagnose and validate autopilot setup')
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@traisetech/autopilot",
"version": "2.2.0",
"version": "2.3.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -66,4 +66,4 @@
"prop-types": "^15.8.1",
"react": "^19.2.4"
}
}
}
63 changes: 63 additions & 0 deletions src/commands/guide.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
const logger = require('../utils/logger');
const path = require('path');
const fs = require('fs-extra');

async function guide() {
const { default: chalk } = await import('chalk');

console.log('\n');
logger.section('🚀 Autopilot Intelligent Guide');
console.log(chalk.gray('Welcome! Let\'s get you up to speed with Autopilot CLI.\n'));

const steps = [
{
title: '1. Initialization',
desc: 'Set up your project with safety rails.',
cmd: 'autopilot init',
tip: 'This creates .autopilotrc.json and .autopilotignore.'
},
{
title: '2. The Watcher',
desc: 'Start the automation engine.',
cmd: 'autopilot start',
tip: 'Runs in the foreground. Press Ctrl+C to stop.'
},
{
title: '3. Real-time Dashboard',
desc: 'See exactly what Autopilot is doing.',
cmd: 'autopilot dashboard',
tip: 'Run this in a separate terminal split for the best experience.'
},
{
title: '4. Productivity Insights',
desc: 'Analyze your coding habits and quality.',
cmd: 'autopilot insights',
tip: 'Try "autopilot insights --export csv" for a detailed report.'
},
{
title: '5. Global Leaderboard',
desc: 'See where you rank among other developers.',
cmd: 'autopilot leaderboard --sync',
tip: 'Participation is opt-in and anonymized.'
},
{
title: '6. Safety First: Undoing',
desc: 'Made a mistake? Revert it instantly.',
cmd: 'autopilot undo',
tip: 'Keeps your file changes but removes the git commit.'
}
];

for (const step of steps) {
console.log(chalk.bold.blue(`\n ${step.title}`));
console.log(` ${chalk.white(step.desc)}`);
console.log(` ${chalk.bgBlack.green(' $ ' + step.cmd)}`);
console.log(` ${chalk.italic.gray(' Tip: ' + step.tip)}`);
}

console.log('\n');
logger.info('Pro Tip: Run "autopilot doctor" if you encounter any environment issues.');
console.log('\n');
}

module.exports = guide;
Loading