Skip to content

matmaer/chezmoi-mousse

Repository files navigation

Python Version from PEP 621 TOML Framework: Textual Black Ruff

Note

It's safe to use the app to visualize your chezmoi repository, as no write operations are enabled by default. See the Use Case to disable dry-run or Test first with dummy files. The app is not packaged yet but you can simply run it as a Python module, see the Start section. Please share any issues on the Issues page, thanks!

Graphical user interface in the terminal for chezmoi, see the chezmoi docs.

The rich visualization is made possible thanks to textual, see the textual docs.

Commands are issued using Python its Subprocess management.

Screenshots

Check out the Wiki Screenshots!

Use Case

  • You have an initilazed or existing chezmoi repository.
  • To enable operations, press D, d or click the Remove --dry-run or Add --dry-run text in the footer. This will enable/disable commands changing your files or the chezmoi state. Test first in a VM or container, see the Test section.
  • Run the app with your own user. Running the app with sudo or elevated permissions is not needed and should be avoided. Chezmoi explicitly discourages operating outside of your home directory.
  • The current implementation has only been used or tested with autocommit enabled, feedback is welcome.

Start

Pre build binary for Linux

https://github.com/matmaer/chezmoi-mousse/releases/latest

wget https://github.com/matmaer/chezmoi-mousse/releases/latest/download/chezmoi-mousse
chmod +x chezmoi-mousse
./chezmoi-mousse

Run from source all platforms

Clone the repository: git clone https://github.com/matmaer/chezmoi-mousse.git

Change directory: cd chezmoi-mousse and cd src

The easiest way is to run the app with uv, install uv on your platform. Then in the chezmoi-mousse src directory, run:

uv run --no-dev --python 3.13 --with textual -m chezmoi_mousse

If Python 3.13 with textual is available in you env, in the src directory, you can run:

python -m chezmoi_mousse

Note

Navigate to the "Config" tab and check the output from chezmoi doctor

Test

To test the app without "real" dotfiles in a container or VM:

In the src directory of the cloned repository, you can run

CHEZMOI_MOUSSE_DEBUG_MODE=1 uv run --python 3.13 --with textual -m chezmoi_mousse

Then on the "Debug" tab, you can generate some files in the home directory, and offer the possibility to modify the generated files to have diffs. Files are generated using the Faker package

See the Debug tab screenshot

Platform packaging

Available chezmoi commands

Note

The lists for Write Operations and Read Operations below are a limited subset of available chezmoi commands, run chezmoi help in your terminal to see all commands. Commands below without a checkmark are being implemented,

See Implemented configuration options below, not all flags are implemented, however usage with default flag values should run without errors. If you find an issue, please share it on the Issues page.

Write Operations

  • chezmoi add directory
  • chezmoi add file
  • chezmoi archive
  • chezmoi apply directory
  • chezmoi apply file
  • chezmoi destroy directory
  • chezmoi destroy file
  • chezmoi edit
  • chezmoi forget directory
  • chezmoi forget file
  • chezmoi generate
  • chezmoi import
  • chezmoi init new repository
  • chezmoi init clone repository
  • chezmoi purge
  • chezmoi re-add file

Read Operations

  • chezmoi cat
  • chezmoi cat-config
  • chezmoi dump-config
  • chezmoi data
  • chezmoi diff
  • chezmoi doctor
  • chezmoi git log
  • chezmoi ignored
  • chezmoi managed
  • chezmoi source-dir
  • chezmoi status
  • chezmoi unmanaged

Implemented configuration options

Legend:

  • 🟒 Follow user configuration or chezmoi defaults
  • 🟩 Providing flags for the chezmoi command, managed by this app.
  • ❎ Not in scope
  • πŸ’‘ Follows user config with warning
  • ⚫ Under development, help wanted or to be documented

[!NOTE] chezmoi command flags can override your local config file. See the _run_cmd.py file for the exact flags in use.

Top level

  • 🟒 cacheDir
  • 🟩 color (--no-color, app manages color)
  • 🟒 data
  • 🟒 destDir
  • ⚫ encryption
  • ⚫ env
  • 🟒 format
  • 🟩 interactive (--interactive=false, app provides safeguards but overrides user config!)
  • ❎ mode (--mode=file, only file mode is supported)
  • 🟩 pager (--no-pager, app limits output)
  • 🟩 pagerArgs
  • ⚫ persistentState
  • 🟩 progress (--progress=false, app shows progress)
  • ⚫ scriptEnv
  • ⚫ scriptTempDir
  • 🟒 sourceDir
  • 🟒 tempDir (check the Config tab chezmoi doctor output for any issue)
  • 🟒 umask
  • ⚫ useBuiltinAge
  • 🟩 useBuiltinGit (--use-builtin-git=true)
  • ❎ verbose (outputs are parsed without verbose flag)
  • ⚫ workingTree

add

  • ⚫ add.encrypt
  • ⚫ add.secrets
  • ⚫ add.templateSymlinks

age

  • ⚫ age.args
  • ⚫ age.command
  • ⚫ age.identities
  • ⚫ age.identity
  • ⚫ age.passphrase
  • ⚫ age.recipient
  • ⚫ age.recipients
  • ⚫ age.recipientsFile
  • ⚫ age.recipientsFiles
  • ⚫ age.suffix
  • ⚫ age.symmetric

awsSecretsManager

  • ⚫ awsSecretsManager.profile
  • ⚫ awsSecretsManager.region

azureKeyVault

  • ⚫ azureKeyVault.defaultVault

bitwarden

  • ⚫ bitwarden.command
  • ⚫ bitwarden.unlock

bitwardenSecrets

  • ⚫ bitwardenSecrets.command

cd

  • ❎ cd.args
  • ❎ cd.command

diff

  • ❎ diff.args (Start a discussion if you have a use case)
  • 🟩 diff.command (chezmoi --use-builtin-diff)
  • ❎ diff.exclude (diffs are shown for a selected path)
  • 🟩 diff.pager (chezmoi --no-pager --use-builtin-diff)
  • ❎ diff.pagerArgs
  • 🟩 diff.reverse (--reverse flag is used to show diffs on the ReAdd tab)
  • ⚫ diff.scriptContents

edit

  • ⚫ edit.apply
  • ⚫ edit.args
  • ⚫ edit.command
  • ⚫ edit.hardlink
  • ⚫ edit.minDuration
  • ⚫ edit.watch

ejson

  • ⚫ ejson.key
  • ⚫ ejson.keyDir

git

  • ⚫ git.autoAdd
  • πŸ’‘ git.autoCommit
  • πŸ’‘ git.autoPush
  • 🟒 git.command (chezmoi git -- <git_command> is used to run git)
  • 🟒 git.commitMessageTemplate
  • 🟒 git.commitMessageTemplateFile
  • ❎ git.lfs (Start a discussion if you have a use case)

gitHub

  • 🟒 gitHub.refreshPeriod

gopass

  • ⚫ gopass.command
  • ⚫ gopass.mode

gpg

  • ⚫ gpg.args
  • ⚫ gpg.command
  • ⚫ gpg.recipient
  • ⚫ gpg.recipients
  • ⚫ gpg.suffix
  • ⚫ gpg.symmetric

hooks

  • ⚫ hooks.command.post.args
  • ⚫ hooks.command.post.command
  • ⚫ hooks.command.pre.args
  • ⚫ hooks.command.pre.command

interpreters

  • ⚫ interpreters.extension.args
  • ⚫ interpreters.extension.command

keepassxc

  • ⚫ keepassxc.args
  • ⚫ keepassxc.command
  • ⚫ keepassxc.database
  • ⚫ keepassxc.mode
  • ⚫ keepassxc.prompt

merge

  • ⚫ merge.args
  • ⚫ merge.command

pass

  • ⚫ pass.command

pinentry

  • ⚫ pinentry.args
  • ⚫ pinentry.command
  • ⚫ pinentry.options

rbw

  • ⚫ rbw.command

secret

  • ⚫ secret.args
  • ⚫ secret.command

status

  • 🟩 status.pathStyle
  • 🟩 status.exclude

template

  • chezmoi re-add directory
  • ⚫ template.options

textconv

  • ⚫ textconv

update

  • ⚫ update.apply
  • ⚫ update.args
  • ⚫ update.command
  • ⚫ update.recurseSubmodules

vault

  • ⚫ vault.command

verify

  • ❎ verify.exclude

warnings

  • ⚫ warnings

Textual themes

Pick any textual theme to change the look, for example tokyo-night, see Textual Themes to check out built in themes.

Textual themes example

Chezmoi or Git command not found

If the chezmoi or git command is not found by shutil.which, the app wil not start and only print a simple message to the terminal.

About

GUI for chezmoi in the terminal, with a wink to the mouse. Built with textual. Manage dotfiles.

Topics

Resources

License

Stars

30 stars

Watchers

3 watching

Forks

Contributors

Languages