Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

init

Initialize the database and configuration.

Usage

kakei init

Description

The init command sets up kakei for first-time use:

  1. Creates the database file at the platform-appropriate location:

    • Linux (XDG): ~/.local/share/kakei/kakei.db
    • macOS: ~/Library/Application Support/kakei/kakei.db
    • Windows: %APPDATA%\kakei\kakei.db
  2. Runs database migrations to create the necessary tables and schema

  3. Initializes default categories:

    • Food
    • Transport
    • Daily Goods
    • Hobby
    • Salary
  4. Initializes default accounts:

    • Cash
    • Bank

When to Use

  • Run this command once when you first install kakei
  • If you delete your database and want to start fresh
  • After moving kakei to a new system

Example

$ kakei init
Database initialized successfully!