OneKey Development Commands
For branch naming, commit format, rebasing, and PR conventions, read git-workflow.md.
Application Development Commands
PLATFORM-SPECIFIC DEVELOPMENT:
yarn app:desktop - Start desktop Electron app development with Rspack
- Runtime: 30-60 seconds to start
- Common issues: Node version conflicts, missing native dependencies
- Troubleshooting: Run
yarn clean && yarn reinstall if startup fails
yarn app:web:rspack - Start web development server (port 3000)
- Runtime: 15-30 seconds to start
- Common issues: Port 3000 already in use, rspack compilation errors
- Troubleshooting: Kill existing processes on port 3000, check console for specific errors
yarn app:ext - Start browser extension development with Rspack
- Runtime: 20-40 seconds to start
- Common issues: Manifest v3 validation errors, permission issues
- Troubleshooting: Check extension manifest validity, verify content security policy
Mobile DevSession launcher - Default path
for normal iOS/Android React Native development. Read this guide before
starting the app, restoring shell/vendor resources, or attaching UI tooling.
Mobile dependency setup - CocoaPods,
Pods installation, and missing injected assets.
yarn app:ios - Start iOS development through the Mobile DevSession launcher
- Runtime: 1-2 minutes (includes Metro bundler)
- Common issues: Xcode setup, simulator issues, pod install failures
- Prerequisites: Xcode installed, iOS simulator available
yarn app:android - Start Android development through the Mobile DevSession launcher
- Runtime: 1-2 minutes (includes Metro bundler)
- Common issues: Android SDK path, emulator setup, gradle build failures
- Prerequisites: Android Studio, SDK tools, emulator configured
Direct local native builds: yarn workspace @onekeyhq/mobile ios and
yarn workspace @onekeyhq/mobile android. Use them only when explicitly
requested or when diagnosing the launcher.
yarn app:web-embed - Start embeddable components development
- Runtime: 15-30 seconds
- Usage: For developing standalone wallet components
yarn app:native-bundle - Prepare iOS/Android development vendor bundles,
then start Metro. Wait for Dev server ready; this does not install the app.
Build Commands
PRODUCTION BUILDS (Use for final validation):
yarn app:desktop:build - Build desktop app for all platforms
- Runtime: 5-10 minutes (multi-platform build)
- Output: Platform-specific installers in
apps/desktop/dist/
- Common issues: Code signing, platform-specific dependencies
- Verification: Test installers on target platforms
yarn app:ext:build - Build browser extension
- Runtime: 2-3 minutes
- Output: Unpacked extension in
apps/ext/build/chrome_v3/
- Common issues: Manifest validation, content security policy violations
- Verification: Load extension in browser for testing
yarn app:web:build - Build web application
- Runtime: 3-5 minutes
- Output: Static files in
apps/web/dist/
- Common issues: Bundle size limits, missing environment variables
- Verification: Serve built files and test functionality
Development Tools & Quality Assurance
Pre-commit Commands (Local Development)
Use this for fast agent pre-commit validation:
yarn agent:check --profile commit - Runs staged lint and type checks with compact output
Pre-commit workflow:
yarn agent:check --profile commit && git commit -m "your message"
CI Commands (Full Project Check)
These run in CI pipeline or for comprehensive validation:
yarn lint - Comprehensive linting (TypeScript, oxlint, folder structure, i18n)
- Expected runtime: ~1 minute
- Zero tolerance: ALL warnings and errors MUST be fixed
- Use case: CI pipeline and comprehensive pre-PR checks
- Do not run
yarn eslint, npx eslint, or node_modules/.bin/eslint.
ESLint entries are legacy compatibility remnants; active lint validation uses
oxlint through agent:check or yarn lint.
yarn test - Jest test execution
- Use case: CI pipeline and test validation
Other Tools
yarn clean - Clean all build artifacts and node_modules
yarn reinstall - Full clean install (use when dependency issues occur)
Testing
- Jest configuration in
jest.config.js
- Test setup in
jest-setup.js
- Tests located in
@tests/ directories within packages
- Mobile tests use
jest-expo preset
1---2name: 1k-dev-commands3description: OneKey development commands plus branch, commit, validation, and PR conventions.4---56# OneKey Development Commands78For branch naming, commit format, rebasing, and PR conventions, read [git-workflow.md](references/git-workflow.md).910## Application Development Commands1112**PLATFORM-SPECIFIC DEVELOPMENT**:1314- `yarn app:desktop` - Start desktop Electron app development with Rspack15 - **Runtime**: 30-60 seconds to start16 - **Common issues**: Node version conflicts, missing native dependencies17 - **Troubleshooting**: Run `yarn clean && yarn reinstall` if startup fails1819- `yarn app:web:rspack` - Start web development server (port 3000)20 - **Runtime**: 15-30 seconds to start21 - **Common issues**: Port 3000 already in use, rspack compilation errors22 - **Troubleshooting**: Kill existing processes on port 3000, check console for specific errors2324- `yarn app:ext` - Start browser extension development with Rspack25 - **Runtime**: 20-40 seconds to start26 - **Common issues**: Manifest v3 validation errors, permission issues27 - **Troubleshooting**: Check extension manifest validity, verify content security policy2829- [Mobile DevSession launcher](references/mobile-dev-shell.md) - Default path30 for normal iOS/Android React Native development. Read this guide before31 starting the app, restoring shell/vendor resources, or attaching UI tooling.3233- [Mobile dependency setup](references/mobile-dependencies.md) - CocoaPods,34 Pods installation, and missing injected assets.3536- `yarn app:ios` - Start iOS development through the Mobile DevSession launcher37 - **Runtime**: 1-2 minutes (includes Metro bundler)38 - **Common issues**: Xcode setup, simulator issues, pod install failures39 - **Prerequisites**: Xcode installed, iOS simulator available4041- `yarn app:android` - Start Android development through the Mobile DevSession launcher42 - **Runtime**: 1-2 minutes (includes Metro bundler)43 - **Common issues**: Android SDK path, emulator setup, gradle build failures44 - **Prerequisites**: Android Studio, SDK tools, emulator configured4546- Direct local native builds: `yarn workspace @onekeyhq/mobile ios` and47 `yarn workspace @onekeyhq/mobile android`. Use them only when explicitly48 requested or when diagnosing the launcher.4950- `yarn app:web-embed` - Start embeddable components development51 - **Runtime**: 15-30 seconds52 - **Usage**: For developing standalone wallet components5354- `yarn app:native-bundle` - Prepare iOS/Android development vendor bundles,55 then start Metro. Wait for `Dev server ready`; this does not install the app.5657## Build Commands5859**PRODUCTION BUILDS** (Use for final validation):6061- `yarn app:desktop:build` - Build desktop app for all platforms62 - **Runtime**: 5-10 minutes (multi-platform build)63 - **Output**: Platform-specific installers in `apps/desktop/dist/`64 - **Common issues**: Code signing, platform-specific dependencies65 - **Verification**: Test installers on target platforms6667- `yarn app:ext:build` - Build browser extension68 - **Runtime**: 2-3 minutes69 - **Output**: Unpacked extension in `apps/ext/build/chrome_v3/`70 - **Common issues**: Manifest validation, content security policy violations71 - **Verification**: Load extension in browser for testing7273- `yarn app:web:build` - Build web application74 - **Runtime**: 3-5 minutes75 - **Output**: Static files in `apps/web/dist/`76 - **Common issues**: Bundle size limits, missing environment variables77 - **Verification**: Serve built files and test functionality7879## Development Tools & Quality Assurance8081### Pre-commit Commands (Local Development)8283**Use this for fast agent pre-commit validation:**8485- `yarn agent:check --profile commit` - Runs staged lint and type checks with compact output8687**Pre-commit workflow:**8889```bash90yarn agent:check --profile commit && git commit -m "your message"91```9293### CI Commands (Full Project Check)9495**These run in CI pipeline or for comprehensive validation:**9697- `yarn lint` - Comprehensive linting (TypeScript, oxlint, folder structure, i18n)98 - **Expected runtime**: ~1 minute99 - **Zero tolerance**: ALL warnings and errors MUST be fixed100 - **Use case**: CI pipeline and comprehensive pre-PR checks101- Do not run `yarn eslint`, `npx eslint`, or `node_modules/.bin/eslint`.102 ESLint entries are legacy compatibility remnants; active lint validation uses103 oxlint through `agent:check` or `yarn lint`.104- `yarn test` - Jest test execution105 - **Use case**: CI pipeline and test validation106107### Other Tools108109- `yarn clean` - Clean all build artifacts and node_modules110- `yarn reinstall` - Full clean install (use when dependency issues occur)111112## Testing113114- Jest configuration in `jest.config.js`115- Test setup in `jest-setup.js`116- Tests located in `@tests/` directories within packages117- Mobile tests use `jest-expo` preset