Artifacts

What Artifacts Are

Artifacts are LLM session outputs – plans, research notes, design documents, session summaries – that you want to persist across sessions. AKM syncs these to a dedicated git repository, so your work products are versioned and accessible from any machine.

Setup

Enable artifacts during akm setup:

akm setup --artifacts

You will be asked to provide a git remote URL for your artifacts repository:

git@github.com:<user>/<artifacts-repo>.git

The local artifacts directory defaults to ~/.akm/artifacts/.

How It Works

AKM provides bidirectional sync between your local artifacts directory and the remote git repository:

  • On session start (via shell wrappers): pull latest artifacts from the remote
  • On session exit: commit and push any new or changed artifacts

This happens transparently when you use the shell wrappers (claude, copilot, opencode, pi).

Auto-Push

The artifacts.auto-push config key controls whether artifacts are automatically committed and pushed when a session exits:

# Enable auto-push (default)
akm config artifacts.auto-push true

# Disable auto-push
akm config artifacts.auto-push false

Browsing

akm artifacts with no subcommand opens a two-pane explorer on a terminal: a lazily-expanding tree on the left, a live plain-text preview on the right. Enter on a file opens it in $EDITOR and returns; directories expand with /Enter and collapse with . Press y to copy the selected entry’s absolute path to the clipboard — handy for pasting straight into an agent. The copy uses OSC 52, so it works over SSH; the path is also shown in the status line as a selectable fallback for terminals that drop the escape sequence.

# Two-pane explorer
akm artifacts

# Print the tree as plain text instead (agent/scripting)
akm artifacts --plain

Manual Sync

You can manually sync artifacts at any time:

akm artifacts sync

This performs a bidirectional sync: pulls from the remote, then commits and pushes local changes.

Configuration Keys

Key Description Default
artifacts.remote Git remote URL for artifacts repo (set during setup)
artifacts.dir Local artifacts directory ~/.akm/artifacts
artifacts.auto-push Auto commit+push on session exit true

See Configuration for details on managing all config keys.