@coastal-programs/notion-cli
Version:
Unofficial Notion CLI optimized for automation and AI agents. Non-interactive interface for Notion API v5.2.1 with intelligent caching, retry logic, structured error handling, and comprehensive testing.
58 lines (57 loc) • 1.75 kB
TypeScript
import { Command } from '@oclif/core';
/**
* Interactive first-time setup wizard for Notion CLI
*
* Guides new users through:
* 1. Token configuration
* 2. Connection testing
* 3. Workspace synchronization
*
* Designed to provide a welcoming, educational experience that sets users up for success.
*/
export default class Init extends Command {
static description: string;
static examples: {
description: string;
command: string;
}[];
static flags: {
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
'page-size': import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
retry: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
timeout: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
'no-cache': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
minimal: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
};
private isJsonMode;
run(): Promise<void>;
/**
* Check if user already has a configured token
*/
private checkExistingSetup;
/**
* Prompt user if they want to reconfigure
*/
private promptReconfigure;
/**
* Show welcome message
*/
private showWelcome;
/**
* Step 1: Setup token
*/
private setupToken;
/**
* Step 2: Test connection
*/
private testConnection;
/**
* Step 3: Sync workspace
*/
private syncWorkspace;
/**
* Show success summary
*/
private showSuccess;
}