A browser automation tool for AtCoder with CLI interface built with Node.js, TypeScript, and Playwright.
- Browser Automation: Launch a browser with UI using Playwright
- Session Management: Persistent browser sessions with automatic restoration
- CLI Commands: Interactive command line interface
- Configuration Management: Persistent settings using the conf module
- URL Opening: Open URLs with the
open URLcommand - Automatic Startup: Opens default URL on application launch
atcoder-gui/
├── src/
│ ├── main.ts # CLI application entry point and command handling
│ ├── browser.ts # Playwright browser management and automation
│ ├── config.ts # Configuration management using conf module
│ ├── session.ts # Session persistence and restoration
│ └── *.test.ts # Test files
├── dist/ # Compiled JavaScript output
├── eslint.config.js # ESLint configuration
└── package.json # Project configuration
- Clone the repository
- Install dependencies:
pnpm install
- Install Playwright browsers:
npx playwright install chromium
- Build the project:
pnpm run build
Start the interactive command prompt:
pnpm run startThis will start an interactive CLI with a command prompt where you can enter commands:
AtCoder GUI Interactive CLI
Type "help" for available commands or "exit" to quit
command> open https://atcoder.jp
command> config
command> help
command> exit
open <URL>- Open a URL in the browserconfig- Show current configurationhelp- Show available commandsexit- Exit the application
Configuration is automatically managed using the conf module (similar to atcoder-cli). Settings are stored in the standard configuration directory for your operating system:
- Windows:
%APPDATA%\atcoder-gui\config.json - macOS:
~/Library/Preferences/atcoder-gui/config.json - Linux:
~/.config/atcoder-gui/config.json
Default configuration values:
{
theme: 'light',
autoStart: false,
defaultUrl: 'https://atcoder.jp',
windowSize: {
width: 1200,
height: 800
},
headless: false,
devtools: true
}You can modify settings programmatically through the configuration API, and they will be automatically persisted.
The application automatically saves and restores browser sessions, including:
- Cookies
- Local storage data
- Login states
Session data is stored separately from configuration and is automatically restored when the browser launches.
pnpm run build- Compile TypeScript to JavaScriptpnpm run dev- Watch mode compilationpnpm run test- Run tests in watch modepnpm run test:run- Run tests oncepnpm run lint- Run ESLintpnpm run lint:fix- Fix ESLint issues automaticallypnpm run start- Run the compiled CLI applicationpnpm run clean- Remove compiled output
Run tests with Vitest:
pnpm run testThe project uses ESLint with TypeScript-specific rules for code quality:
pnpm run lint # Check code quality
pnpm run lint:fix # Auto-fix issues where possible- Node.js - Runtime environment
- TypeScript - Programming language
- Playwright - Browser automation
- Vitest - Testing framework
- ESLint - Code linting
- conf - Configuration management library
MIT