Dirs Command

View all directories used internally by Kodezi CLI for configuration, credentials, logs, and session data.

The dirs command shows you where Kodezi CLI stores all internal files, including configuration, credentials, logs, and session history.

This command is especially useful if you want to:

  • Debug authentication issues
  • Access or edit configuration files
  • Delete session history
  • Backup your CLI state
  • Verify where data is stored on each platform

Command Purpose

Use this command to locate where kodezi-cli stores configuration, credentials, logs, and session data on your system. This is especially useful for troubleshooting, backing up data, or manually managing configuration files.

Usage

Run:

kodezi dirs

Output (TTY):

┌────────┬────────────────────────────────────┐
 Config /home/user/.config/kodezi-cli
 Data /home/user/.local/share/kodezi-cli
└────────┴────────────────────────────────────┘

Output (non-TTY/piped):

/home/user/.config/kodezi-cli
/home/user/.local/share/kodezi-cli

Non-TTY mode activates automatically when piping output:

kodezi dirs | grep kodezi

Subcommands

config

Shows the directory where global config files are stored:

kodezi dirs config

Output:

/home/user/.config/kodezi-cli

data

Shows the directory where dynamic data is stored:

kodezi dirs data

Output:

/home/user/.local/share/kodezi-cli

Platform Directory Structure

Kodezi CLI uses OS specific standard directories for configuration and data storage.

Below are the full directory trees visualized with <Files> components.

Linux

settings.json
config.json
credentials.json
kodezi-cli.log

macOS

settings.json
config.json
credentials.json
kodezi-cli.log

Windows

settings.json
config.json
credentials.json
kodezi-cli.log

Usage Examples

# View config directory
cd "$(kodezi dirs config)"

# Backup data directory
tar -czf backup.tar.gz "$(kodezi dirs data)"

# Check disk usage
du -sh "$(kodezi dirs data)"

Pro Tip

Combine dirs with other commands to automate directory management tasks. For example, you can create scripts to backup sessions, clean old logs, or reset configuration by directly accessing these directories.