Skip to content

agentstack init

Terminal window
agentstack init [options]

The init command is the primary entry point for AgentStack. It runs an interactive setup wizard that:

  1. Detects whether you want to export your current tool’s config or restore from an existing profile
  2. Runs readiness checks (verifies required tools are installed)
  3. Optionally installs missing tools via your package manager
  4. Creates or restores a canonical profile
  5. Activates the resulting profile in the local hub
  6. Optionally applies the profile to your target provider
FlagTypeDefaultDescription
--profile <name>stringmainProfile name to create or restore
--yesbooleanfalseSkip interactive prompts, accept defaults
--setup-mode <mode>export|restoreinteractiveExport current setup or restore from profile
--current-tool <tool>codex|claude|opencode|noneinteractiveCurrent AI tool to import from
--profile-template <path|url>stringSeed profile from a file or URL
--restore-to <tool>none|codex|claude|opencodeinteractiveTarget tool to restore config to
--sync-mode <mode>local|zero-config|gitinteractiveHow to sync the profile
--repo <url>stringGit remote URL (required for git sync mode)
--branch <name>stringmainGit branch (for git sync mode)
--package-manager <pm>brew|apt|chocoauto-detectPackage manager for installing missing tools
--install-missingbooleanfalseAuto-install missing tools without prompting

Interactive setup (recommended for first-time users):

Interactive wizard
agentstack init

Export current Codex setup to a local profile:

Export from Codex
agentstack init \
--profile main \
--yes \
--setup-mode export \
--current-tool codex \
--sync-mode local

Restore profile from zero-config sync (GitHub Gist):

Restore on a new machine
agentstack init \
--profile main \
--yes \
--setup-mode restore \
--sync-mode zero-config \
--restore-to codex

Restore from a git remote to a team setup:

Team restore
agentstack init \
--profile team \
--yes \
--setup-mode restore \
--sync-mode git \
--repo https://github.com/acme/agentstack-profiles \
--branch main \
--restore-to claude